From fda2ee3d87600ce7ecbec5528ea80b8e9758f584 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 20 Nov 2017 08:55:31 +0000 Subject: WaE: -Werror=unused-function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I773224bd332669c86648578a47612fa6d639c9c5 Reviewed-on: https://gerrit.libreoffice.org/44945 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- sccomp/qa/unit/solver.cxx | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/sccomp/qa/unit/solver.cxx b/sccomp/qa/unit/solver.cxx index 2ecc3282b17f..76d94fee88c3 100644 --- a/sccomp/qa/unit/solver.cxx +++ b/sccomp/qa/unit/solver.cxx @@ -26,18 +26,28 @@ class LpSolverTest: public test::BootstrapFixture { uno::Reference m_xDocument; +#ifdef ENABLE_LPSOLVE void testLpSolver(); +#endif +#ifdef ENABLE_COINMP void testCoinMPSolver(); +#endif +#if defined(ENABLE_LPSOLVE) || defined(ENABLE_COINMP) void testSolver(OUString const & rName); +#endif public: virtual void setUp() override; virtual void tearDown() override; CPPUNIT_TEST_SUITE(LpSolverTest); +#ifdef ENABLE_LPSOLVE CPPUNIT_TEST(testLpSolver); +#endif +#ifdef ENABLE_COINMP CPPUNIT_TEST(testCoinMPSolver); +#endif CPPUNIT_TEST_SUITE_END(); }; @@ -57,20 +67,21 @@ void LpSolverTest::tearDown() test::BootstrapFixture::tearDown(); } +#ifdef ENABLE_LPSOLVE void LpSolverTest::testLpSolver() { -#ifdef ENABLE_LPSOLVE testSolver("com.sun.star.comp.Calc.LpsolveSolver"); -#endif } +#endif +#ifdef ENABLE_COINMP void LpSolverTest::testCoinMPSolver() { -#ifdef ENABLE_COINMP testSolver("com.sun.star.comp.Calc.CoinMPSolver"); -#endif } +#endif +#if defined(ENABLE_LPSOLVE) || defined(ENABLE_COINMP) void LpSolverTest::testSolver(OUString const & rName) { uno::Reference xSolver(m_xContext->getServiceManager()-> @@ -106,6 +117,7 @@ void LpSolverTest::testSolver(OUString const & rName) const OString sMessage("Empty description for " + OUStringToOString(rName, RTL_TEXTENCODING_UTF8)); CPPUNIT_ASSERT_MESSAGE(sMessage.getStr(), !xDesc->getComponentDescription().isEmpty()); } +#endif CPPUNIT_TEST_SUITE_REGISTRATION(LpSolverTest); -- cgit v1.2.3