[Libreoffice-commits] core.git: sccomp/qa

Caolán McNamara caolanm at redhat.com
Mon Nov 20 10:59:16 UTC 2017


 sccomp/qa/unit/solver.cxx |   20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

New commits:
commit fda2ee3d87600ce7ecbec5528ea80b8e9758f584
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Nov 20 08:55:31 2017 +0000

    WaE: -Werror=unused-function
    
    Change-Id: I773224bd332669c86648578a47612fa6d639c9c5
    Reviewed-on: https://gerrit.libreoffice.org/44945
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

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<sheet::XSpreadsheetDocument> 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<sheet::XSolver> 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);
 


More information about the Libreoffice-commits mailing list