summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2019-06-25 19:56:13 +0000
committerJan-Marek Glogowski <glogow@fbihome.de>2019-07-05 20:05:59 +0200
commit3f7e8ddea89f6340cd18b5b34f5a7c5f503962be (patch)
tree32b7a033e628e5493fb5e18a8593f442eed23389 /sc
parent368c996b24e09c427a30972b3405493328db6779 (diff)
Enable many more unit tests on all archs
This depends on commit "Make font-based unit test depend on instdir fonts, not that it's sure that this really fixes the problem, as its origin is really unknown. It especially enables all the font-based tests I could find on all archs. Same for many more test where I couldn't see any reason they don't work generally. To get rid of even more ifdefs, it moves these from the class to the functions, so there is actually just one needed for any test. As a result some few tests run but do nothing. There is still some problem with embedded fonts on MacOS and with delayed graphics loading on Windows, so these ifdefs are kept. Change-Id: I63f8424e9debda6cbf3e5777c93245e09f8eb0f2 Reviewed-on: https://gerrit.libreoffice.org/74719 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'sc')
-rw-r--r--sc/qa/extras/macros-test.cxx11
-rw-r--r--sc/qa/unit/subsequent_export-test.cxx17
2 files changed, 5 insertions, 23 deletions
diff --git a/sc/qa/extras/macros-test.cxx b/sc/qa/extras/macros-test.cxx
index de71456f1b79..475320d470f9 100644
--- a/sc/qa/extras/macros-test.cxx
+++ b/sc/qa/extras/macros-test.cxx
@@ -38,29 +38,22 @@ class ScMacrosTest : public UnoApiTest
public:
ScMacrosTest();
-#if !defined MACOSX
void testStarBasic();
void testVba();
void testMSP();
void testPasswordProtectedStarBasic();
void testRowColumn();
-#endif
+
CPPUNIT_TEST_SUITE(ScMacrosTest);
-#if !defined(MACOSX)
- //enable this test if you want to play with star basic macros in unit tests
- //works but does nothing useful yet
CPPUNIT_TEST(testStarBasic);
CPPUNIT_TEST(testMSP);
CPPUNIT_TEST(testVba);
CPPUNIT_TEST(testPasswordProtectedStarBasic);
CPPUNIT_TEST(testRowColumn);
-#endif
CPPUNIT_TEST_SUITE_END();
};
-#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
@@ -389,8 +382,6 @@ void ScMacrosTest::testRowColumn()
pDocSh->DoClose();
}
-#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 06eaf398407f..462320794754 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -165,18 +165,14 @@ public:
void testCustomXml();
-#if !defined _WIN32
void testRelativePathsODS();
-#endif
void testSheetProtectionODS();
void testSwappedOutImageExport();
void testLinkedGraphicRT();
void testImageWithSpecialID();
-#if !defined _WIN32
void testSupBookVirtualPathXLS();
-#endif
void testAbsNamedRangeHTML();
void testSheetLocalRangeNameXLS();
void testRelativeNamedExpressionsXLS();
@@ -298,13 +294,9 @@ public:
CPPUNIT_TEST(testCeilingFloorXLS);
CPPUNIT_TEST(testCeilingFloorODS);
CPPUNIT_TEST(testCustomXml);
-#if !defined(_WIN32)
CPPUNIT_TEST(testRelativePathsODS);
-#endif
CPPUNIT_TEST(testSheetProtectionODS);
-#if !defined(_WIN32)
CPPUNIT_TEST(testSupBookVirtualPathXLS);
-#endif
CPPUNIT_TEST(testSwappedOutImageExport);
CPPUNIT_TEST(testLinkedGraphicRT);
CPPUNIT_TEST(testImageWithSpecialID);
@@ -3081,7 +3073,6 @@ void ScExportTest::testCustomXml()
CPPUNIT_ASSERT(pStream);
}
-#if !defined _WIN32
void ScExportTest::testRelativePathsODS()
{
ScDocShellRef xDocSh = loadDoc("fdo79305.", FORMAT_ODS);
@@ -3094,7 +3085,6 @@ void ScExportTest::testRelativePathsODS()
// make sure that the URL is relative
CPPUNIT_ASSERT(aURL.startsWith(".."));
}
-#endif
namespace {
@@ -3222,7 +3212,6 @@ void ScExportTest::tearDown()
test::BootstrapFixture::tearDown();
}
-#if !defined _WIN32
void ScExportTest::testSupBookVirtualPathXLS()
{
ScDocShellRef xShell = loadDoc("external-ref.", FORMAT_XLS);
@@ -3234,11 +3223,13 @@ void ScExportTest::testSupBookVirtualPathXLS()
ScDocument& rDoc = xDocSh->GetDocument();
+#ifdef _WIN32
+ ASSERT_FORMULA_EQUAL(rDoc, ScAddress(0,0,0), "'file:///C:/home/timar/Documents/external.xls'#$Sheet1.A1", "Wrong SupBook VirtualPath URL");
+#else
ASSERT_FORMULA_EQUAL(rDoc, ScAddress(0,0,0), "'file:///home/timar/Documents/external.xls'#$Sheet1.A1", "Wrong SupBook VirtualPath URL");
-
+#endif
xDocSh->DoClose();
}
-#endif
void ScExportTest::testLinkedGraphicRT()
{