[Libreoffice-commits] core.git: sc/qa sw/qa

Stephan Bergmann sbergman at redhat.com
Tue Apr 15 14:29:51 PDT 2014


 sc/qa/extras/macros-test.cxx           |    6 ++++++
 sc/qa/unit/subsequent_export-test.cxx  |    8 ++++++++
 sc/qa/unit/subsequent_filters-test.cxx |    7 +++++++
 sw/qa/core/macros-test.cxx             |    8 ++++++++
 sw/qa/extras/rtfimport/rtfimport.cxx   |    2 ++
 5 files changed, 31 insertions(+)

New commits:
commit 1f742c520d0cca536d1e8f59a435b014577b7b4c
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Apr 15 23:29:14 2014 +0200

    Properly #ifdef some per-platform test code
    
    Change-Id: I286fb35e223f205ecc649aa388471ef1b0823d86

diff --git a/sc/qa/extras/macros-test.cxx b/sc/qa/extras/macros-test.cxx
index a353380..e682d6a 100644
--- a/sc/qa/extras/macros-test.cxx
+++ b/sc/qa/extras/macros-test.cxx
@@ -36,9 +36,11 @@ class ScMacrosTest : public UnoApiTest
 public:
     ScMacrosTest();
 
+#if !defined MACOSX
     void testStarBasic();
     void testVba();
     void testMSP();
+#endif
     CPPUNIT_TEST_SUITE(ScMacrosTest);
 #if !defined(MACOSX)
     //enable this test if you want to play with star basic macros in unit tests
@@ -54,6 +56,8 @@ private:
     uno::Reference<uno::XInterface> m_xCalcComponent;
 };
 
+#if !defined MACOSX
+
 // I suppose you could say this test doesn't really belong here, OTOH
 // we need a full document to run the test ( it related originally to an
 // imported Excel VBA macro ) It's convenient and fast to unit test
@@ -276,6 +280,8 @@ void ScMacrosTest::testVba()
     }
 }
 
+#endif
+
 ScMacrosTest::ScMacrosTest()
       : UnoApiTest("/sc/qa/extras/testdocuments")
 {
diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx
index 2ed1eaa..228a161 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -59,10 +59,14 @@ public:
     virtual void setUp() SAL_OVERRIDE;
     virtual void tearDown() SAL_OVERRIDE;
 
+#if !defined MACOSX && !defined DRAGONFLY
     ScDocShellRef saveAndReloadPassword( ScDocShell*, const OUString&, const OUString&, const OUString&, sal_uLong );
+#endif
 
     void test();
+#if !defined MACOSX && !defined DRAGONFLY
     void testPasswordExport();
+#endif
     void testConditionalFormatExportODS();
     void testConditionalFormatExportXLSX();
     void testColorScaleExportODS();
@@ -132,6 +136,7 @@ private:
 
 };
 
+#if !defined MACOSX && !defined DRAGONFLY
 ScDocShellRef ScExportTest::saveAndReloadPassword(ScDocShell* pShell, const OUString &rFilter,
     const OUString &rUserData, const OUString& rTypeName, sal_uLong nFormatType)
 {
@@ -168,6 +173,7 @@ ScDocShellRef ScExportTest::saveAndReloadPassword(ScDocShell* pShell, const OUSt
     OUString aPass("test");
     return load(aTempFile.GetURL(), rFilter, rUserData, rTypeName, nFormatType, nFormat, SOFFICE_FILEFORMAT_CURRENT, &aPass);
 }
+#endif
 
 void ScExportTest::test()
 {
@@ -190,6 +196,7 @@ void ScExportTest::test()
     ASSERT_DOUBLES_EQUAL(aVal, 1.0);
 }
 
+#if !defined MACOSX && !defined DRAGONFLY
 void ScExportTest::testPasswordExport()
 {
     ScDocShell* pShell = new ScDocShell(
@@ -215,6 +222,7 @@ void ScExportTest::testPasswordExport()
 
     xDocSh->DoClose();
 }
+#endif
 
 void ScExportTest::testConditionalFormatExportODS()
 {
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index 437b2ac..318cd68 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -136,9 +136,11 @@ public:
     void testRowIndex1BasedXLSX();
 
     //misc tests unrelated to the import filters
+#if !defined(MACOSX) && !defined(DRAGONFLY) && !defined(WNT)
     void testPasswordNew();
     void testPasswordOld();
     void testPasswordWrongSHA();
+#endif
 
     //test shape import
     void testControlImport();
@@ -247,7 +249,10 @@ public:
     CPPUNIT_TEST_SUITE_END();
 
 private:
+#if !defined(MACOSX) && !defined(DRAGONFLY) && !defined(WNT)
     void testPassword_Impl(const OUString& rFileNameBase);
+#endif
+
     uno::Reference<uno::XInterface> m_xCalcComponent;
 };
 
@@ -1486,6 +1491,7 @@ void ScFiltersTest::testRowIndex1BasedXLSX()
     xDocSh->DoClose();
 }
 
+#if !defined(MACOSX) && !defined(DRAGONFLY) && !defined(WNT)
 void ScFiltersTest::testPassword_Impl(const OUString& aFileNameBase)
 {
     OUString aFileExtension(getFileFormats()[0].pName, strlen(getFileFormats()[0].pName), RTL_TEXTENCODING_UTF8 );
@@ -1541,6 +1547,7 @@ void ScFiltersTest::testPasswordWrongSHA()
     const OUString aFileNameBase("passwordWrongSHA.");
     testPassword_Impl(aFileNameBase);
 }
+#endif
 
 void ScFiltersTest::testControlImport()
 {
diff --git a/sw/qa/core/macros-test.cxx b/sw/qa/core/macros-test.cxx
index 9e9ed6f..d8ad141 100644
--- a/sw/qa/core/macros-test.cxx
+++ b/sw/qa/core/macros-test.cxx
@@ -51,13 +51,17 @@ class SwMacrosTest : public test::BootstrapFixture, public unotest::MacrosTest
 public:
     SwMacrosTest();
 
+#if !defined MACOSX && !defined WNT
     void createFileURL(const OUString& aFileBase, const OUString& aFileExtension, OUString& rFilePath);
+#endif
 
     virtual void setUp() SAL_OVERRIDE;
     virtual void tearDown() SAL_OVERRIDE;
 
     //void testStarBasic();
+#if !defined MACOSX && !defined WNT
     void testVba();
+#endif
     void testFdo55289();
     CPPUNIT_TEST_SUITE(SwMacrosTest);
 #if !defined(MACOSX) && !defined(WNT)
@@ -75,6 +79,7 @@ private:
     OUString m_aBaseString;
 };
 
+#if !defined MACOSX && !defined WNT
 void SwMacrosTest::createFileURL(const OUString& aFileBase, const OUString& aFileExtension, OUString& rFilePath)
 {
     OUString aSep("/");
@@ -83,6 +88,7 @@ void SwMacrosTest::createFileURL(const OUString& aFileBase, const OUString& aFil
     aBuffer.append(aSep).append(aFileBase).append(aFileExtension);
     rFilePath = aBuffer.makeStringAndClear();
 }
+#endif
 
 #if 0
 
@@ -113,6 +119,7 @@ void SwMacrosTest::testStarBasic()
 
 #endif
 
+#if !defined MACOSX && !defined WNT
 void SwMacrosTest::testVba()
 {
     TestMacroInfo testInfo[] = {
@@ -148,6 +155,7 @@ void SwMacrosTest::testVba()
         pFoundShell->DoClose();
     }
 }
+#endif
 
 void SwMacrosTest::testFdo55289()
 {
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index 7ebd83e..19196a0 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -84,6 +84,7 @@ public:
 
 protected:
     /// Copy&paste helper.
+#if !defined MACOSX && !defined WNT
     void paste(const OUString& aFilename, uno::Reference<text::XTextRange> xTextRange = uno::Reference<text::XTextRange>())
     {
         uno::Reference<document::XFilter> xFilter(m_xSFactory->createInstance("com.sun.star.comp.Writer.RtfFilter"), uno::UNO_QUERY_THROW);
@@ -103,6 +104,7 @@ protected:
         }
         xFilter->filter(aDescriptor);
     }
+#endif
 
     AllSettings m_aSavedSettings;
 };


More information about the Libreoffice-commits mailing list