[Libreoffice-commits] core.git: sc/CppunitTest_sc_database_functions_test.mk sc/CppunitTest_sc_functions_test.mk sc/CppunitTest_sc_functions_test_old.mk sc/Library_scqahelper.mk sc/Module_sc.mk sc/qa

Markus Mohrhard markus.mohrhard at googlemail.com
Wed Nov 30 22:33:51 UTC 2016


 sc/CppunitTest_sc_database_functions_test.mk      |  116 +
 sc/CppunitTest_sc_functions_test.mk               |  116 -
 sc/CppunitTest_sc_functions_test_old.mk           |  116 +
 sc/Library_scqahelper.mk                          |    1 
 sc/Module_sc.mk                                   |    3 
 sc/qa/unit/data/functions/database/fods/dmax.fods | 1602 ++++++++++++++++++++++
 sc/qa/unit/data/functions/database/fods/dmin.fods | 1602 ++++++++++++++++++++++
 sc/qa/unit/data/functions/fods/dmax.fods          | 1602 ----------------------
 sc/qa/unit/data/functions/fods/dmin.fods          | 1602 ----------------------
 sc/qa/unit/functions_database.cxx                 |   33 
 sc/qa/unit/functions_test.cxx                     |   49 
 sc/qa/unit/functions_test.hxx                     |   36 
 sc/qa/unit/functions_test_old.cxx                 |   33 
 13 files changed, 3544 insertions(+), 3367 deletions(-)

New commits:
commit f45af7c8093dae17bada71e33a2c32023a2c1986
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Wed Nov 30 21:01:31 2016 +0100

    start to split the functions test by category
    
    Change-Id: Ib06eaee7cf5eeb3dbe95ad42afc2a17caa0359c2
    Reviewed-on: https://gerrit.libreoffice.org/31440
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/sc/CppunitTest_sc_database_functions_test.mk b/sc/CppunitTest_sc_database_functions_test.mk
new file mode 100644
index 0000000..4596080
--- /dev/null
+++ b/sc/CppunitTest_sc_database_functions_test.mk
@@ -0,0 +1,116 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_CppunitTest_CppunitTest,sc_database_functions_test))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,sc_database_functions_test, \
+    sc/qa/unit/functions_database \
+))
+
+$(eval $(call gb_CppunitTest_use_externals,sc_database_functions_test, \
+	boost_headers \
+	mdds_headers \
+))
+
+$(eval $(call gb_CppunitTest_use_libraries,sc_database_functions_test, \
+    basegfx \
+    comphelper \
+    cppu \
+    cppuhelper \
+    drawinglayer \
+    editeng \
+    for \
+    forui \
+    i18nlangtag \
+    msfilter \
+    oox \
+    sal \
+    salhelper \
+    sax \
+    sc \
+    scqahelper \
+    sfx \
+    sot \
+    svl \
+    svt \
+    svx \
+    svxcore \
+	test \
+    tk \
+    tl \
+    ucbhelper \
+	unotest \
+    utl \
+    vcl \
+    xo \
+	$(gb_UWINAPI) \
+))
+
+$(eval $(call gb_CppunitTest_set_include,sc_database_functions_test,\
+    -I$(SRCDIR)/sc/source/ui/inc \
+    -I$(SRCDIR)/sc/inc \
+    $$(INCLUDE) \
+))
+
+$(eval $(call gb_CppunitTest_use_api,sc_database_functions_test,\
+    offapi \
+    udkapi \
+))
+
+$(eval $(call gb_CppunitTest_use_ure,sc_database_functions_test))
+
+$(eval $(call gb_CppunitTest_use_vcl,sc_database_functions_test))
+
+$(eval $(call gb_CppunitTest_use_components,sc_database_functions_test,\
+    basic/util/sb \
+    chart2/source/chartcore \
+    chart2/source/controller/chartcontroller \
+    comphelper/util/comphelp \
+    configmgr/source/configmgr \
+    connectivity/source/manager/sdbc2 \
+    dbaccess/util/dba \
+    embeddedobj/util/embobj \
+    eventattacher/source/evtatt \
+    filter/source/config/cache/filterconfig1 \
+	filter/source/odfflatxml/odfflatxml \
+	filter/source/xmlfilteradaptor/xmlfa \
+    forms/util/frm \
+    framework/util/fwk \
+    i18npool/util/i18npool \
+	i18npool/source/search/i18nsearch \
+    linguistic/source/lng \
+    oox/util/oox \
+    package/source/xstor/xstor \
+    package/util/package2 \
+    sax/source/expatwrap/expwrap \
+    scaddins/source/analysis/analysis \
+    scaddins/source/datefunc/date \
+    sc/util/sc \
+    sc/util/scfilt \
+    sfx2/util/sfx \
+    sot/util/sot \
+    svl/util/svl \
+    svtools/util/svt \
+    svx/util/svx \
+    svx/util/svxcore \
+    toolkit/util/tk \
+    ucb/source/core/ucb1 \
+    ucb/source/ucp/file/ucpfile1 \
+    ucb/source/ucp/tdoc/ucptdoc1 \
+    unotools/util/utl \
+    unoxml/source/rdf/unordf \
+    unoxml/source/service/unoxml \
+    uui/util/uui \
+    xmloff/util/xo \
+	xmlscript/util/xmlscript \
+))
+
+$(eval $(call gb_CppunitTest_use_configuration,sc_database_functions_test))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sc/CppunitTest_sc_functions_test.mk b/sc/CppunitTest_sc_functions_test_old.mk
similarity index 79%
rename from sc/CppunitTest_sc_functions_test.mk
rename to sc/CppunitTest_sc_functions_test_old.mk
index 9a4a77d..2981bf8 100644
--- a/sc/CppunitTest_sc_functions_test.mk
+++ b/sc/CppunitTest_sc_functions_test_old.mk
@@ -7,18 +7,18 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 #
 
-$(eval $(call gb_CppunitTest_CppunitTest,sc_functions_test))
+$(eval $(call gb_CppunitTest_CppunitTest,sc_functions_test_old))
 
-$(eval $(call gb_CppunitTest_add_exception_objects,sc_functions_test, \
-    sc/qa/unit/functions_test \
+$(eval $(call gb_CppunitTest_add_exception_objects,sc_functions_test_old, \
+    sc/qa/unit/functions_test_old \
 ))
 
-$(eval $(call gb_CppunitTest_use_externals,sc_functions_test, \
+$(eval $(call gb_CppunitTest_use_externals,sc_functions_test_old, \
 	boost_headers \
 	mdds_headers \
 ))
 
-$(eval $(call gb_CppunitTest_use_libraries,sc_functions_test, \
+$(eval $(call gb_CppunitTest_use_libraries,sc_functions_test_old, \
     basegfx \
     comphelper \
     cppu \
@@ -52,22 +52,22 @@ $(eval $(call gb_CppunitTest_use_libraries,sc_functions_test, \
 	$(gb_UWINAPI) \
 ))
 
-$(eval $(call gb_CppunitTest_set_include,sc_functions_test,\
+$(eval $(call gb_CppunitTest_set_include,sc_functions_test_old,\
     -I$(SRCDIR)/sc/source/ui/inc \
     -I$(SRCDIR)/sc/inc \
     $$(INCLUDE) \
 ))
 
-$(eval $(call gb_CppunitTest_use_api,sc_functions_test,\
+$(eval $(call gb_CppunitTest_use_api,sc_functions_test_old,\
     offapi \
     udkapi \
 ))
 
-$(eval $(call gb_CppunitTest_use_ure,sc_functions_test))
+$(eval $(call gb_CppunitTest_use_ure,sc_functions_test_old))
 
-$(eval $(call gb_CppunitTest_use_vcl,sc_functions_test))
+$(eval $(call gb_CppunitTest_use_vcl,sc_functions_test_old))
 
-$(eval $(call gb_CppunitTest_use_components,sc_functions_test,\
+$(eval $(call gb_CppunitTest_use_components,sc_functions_test_old,\
     basic/util/sb \
     chart2/source/chartcore \
     chart2/source/controller/chartcontroller \
@@ -111,6 +111,6 @@ $(eval $(call gb_CppunitTest_use_components,sc_functions_test,\
 	xmlscript/util/xmlscript \
 ))
 
-$(eval $(call gb_CppunitTest_use_configuration,sc_functions_test))
+$(eval $(call gb_CppunitTest_use_configuration,sc_functions_test_old))
 
 # vim: set noet sw=4 ts=4:
diff --git a/sc/Library_scqahelper.mk b/sc/Library_scqahelper.mk
index 3cfd6d4..767ef7a 100644
--- a/sc/Library_scqahelper.mk
+++ b/sc/Library_scqahelper.mk
@@ -61,6 +61,7 @@ $(eval $(call gb_Library_use_libraries,scqahelper,\
 $(eval $(call gb_Library_add_exception_objects,scqahelper,\
 	sc/qa/unit/helper/qahelper \
 	sc/qa/unit/helper/xpath \
+	sc/qa/unit/functions_test \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/sc/Module_sc.mk b/sc/Module_sc.mk
index ce7e4c1..96458d1 100644
--- a/sc/Module_sc.mk
+++ b/sc/Module_sc.mk
@@ -74,7 +74,8 @@ $(eval $(call gb_Module_add_slowcheck_targets,sc, \
 
 ifneq ($(PLATFORMID),linux_x86)
 $(eval $(call gb_Module_add_slowcheck_targets,sc, \
-	CppunitTest_sc_functions_test \
+	CppunitTest_sc_functions_test_old \
+	CppunitTest_sc_database_functions_test \
 ))
 endif
 
diff --git a/sc/qa/unit/data/functions/fods/dmax.fods b/sc/qa/unit/data/functions/database/fods/dmax.fods
similarity index 100%
rename from sc/qa/unit/data/functions/fods/dmax.fods
rename to sc/qa/unit/data/functions/database/fods/dmax.fods
diff --git a/sc/qa/unit/data/functions/fods/dmin.fods b/sc/qa/unit/data/functions/database/fods/dmin.fods
similarity index 100%
rename from sc/qa/unit/data/functions/fods/dmin.fods
rename to sc/qa/unit/data/functions/database/fods/dmin.fods
diff --git a/sc/qa/unit/functions_database.cxx b/sc/qa/unit/functions_database.cxx
new file mode 100644
index 0000000..c1b83c2
--- /dev/null
+++ b/sc/qa/unit/functions_database.cxx
@@ -0,0 +1,33 @@
+#include "functions_test.hxx"
+
+class DatabaseFunctionsTest : public FunctionsTest
+{
+public:
+    DatabaseFunctionsTest();
+
+    void testDatabaseFormulasFODS();
+
+    CPPUNIT_TEST_SUITE(DatabaseFunctionsTest);
+    CPPUNIT_TEST(testDatabaseFormulasFODS);
+    CPPUNIT_TEST_SUITE_END();
+
+};
+
+void DatabaseFunctionsTest::testDatabaseFormulasFODS()
+{
+    OUString aDirectoryURL = m_directories.getURLFromSrc("/sc/qa/unit/data/functions/database/fods/");
+    recursiveScan(test::pass, "OpenDocument Spreadsheet Flat XML", aDirectoryURL,
+            "com.sun.star.comp.filter.OdfFlatXml,,com.sun.star.comp.Calc.XMLOasisImporter,com.sun.star.comp.Calc.XMLOasisExporter,,,true",
+            FODS_FORMAT_TYPE, SotClipboardFormatId::NONE, 0, false);
+}
+
+DatabaseFunctionsTest::DatabaseFunctionsTest():
+    FunctionsTest("sc/qa/unit/data/functions/database/fods/")
+{
+}
+
+CPPUNIT_TEST_SUITE_REGISTRATION(DatabaseFunctionsTest);
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/qa/unit/functions_test.cxx b/sc/qa/unit/functions_test.cxx
index 35387c7..0cc9400 100644
--- a/sc/qa/unit/functions_test.cxx
+++ b/sc/qa/unit/functions_test.cxx
@@ -7,42 +7,12 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-#include <sal/config.h>
-
-#include <unotest/filters-test.hxx>
-#include "scdll.hxx"
-#include "helper/qahelper.hxx"
 
+#include "functions_test.hxx"
 #include "document.hxx"
 
-class FunctionsTest : public ScBootstrapFixture, public test::FiltersTest
-{
-public:
-
-    FunctionsTest();
-
-    virtual void setUp() override;
-
-    virtual bool load(
-        const OUString &rFilter,
-        const OUString &rURL,
-        const OUString &rUserData,
-        SfxFilterFlags nFilterFlags,
-        SotClipboardFormatId nClipboardID,
-        unsigned int nFilterVersion) override;
-
-    void testFormulasFODS();
-
-    CPPUNIT_TEST_SUITE(FunctionsTest);
-    CPPUNIT_TEST(testFormulasFODS);
-    CPPUNIT_TEST_SUITE_END();
-
-private:
-    uno::Reference<uno::XInterface> m_xCalcComponent;
-};
-
-FunctionsTest::FunctionsTest():
-    ScBootstrapFixture("sc/qa/unit/data/functions/fods")
+FunctionsTest::FunctionsTest(const OUString& rPath):
+    ScBootstrapFixture(rPath)
 {
 }
 
@@ -77,17 +47,4 @@ bool FunctionsTest::load(const OUString& rFilter, const OUString& rURL,
     return true;
 }
 
-void FunctionsTest::testFormulasFODS()
-{
-    OUString aDirectoryURL = m_directories.getURLFromSrc("/sc/qa/unit/data/functions/fods/");
-    recursiveScan(test::pass, "OpenDocument Spreadsheet Flat XML", aDirectoryURL,
-            "com.sun.star.comp.filter.OdfFlatXml,,com.sun.star.comp.Calc.XMLOasisImporter,com.sun.star.comp.Calc.XMLOasisExporter,,,true",
-            FODS_FORMAT_TYPE, SotClipboardFormatId::NONE, 0, false);
-}
-
-CPPUNIT_TEST_SUITE_REGISTRATION(FunctionsTest);
-
-
-CPPUNIT_PLUGIN_IMPLEMENT();
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/qa/unit/functions_test.hxx b/sc/qa/unit/functions_test.hxx
new file mode 100644
index 0000000..37cde97
--- /dev/null
+++ b/sc/qa/unit/functions_test.hxx
@@ -0,0 +1,36 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <sal/config.h>
+
+#include <unotest/filters-test.hxx>
+#include "scdll.hxx"
+#include "helper/qahelper.hxx"
+
+class SCQAHELPER_DLLPUBLIC FunctionsTest : public ScBootstrapFixture, public test::FiltersTest
+{
+public:
+
+    FunctionsTest(const OUString& rPath);
+
+    virtual void setUp() override;
+
+    virtual bool load(
+        const OUString &rFilter,
+        const OUString &rURL,
+        const OUString &rUserData,
+        SfxFilterFlags nFilterFlags,
+        SotClipboardFormatId nClipboardID,
+        unsigned int nFilterVersion) override;
+
+private:
+    uno::Reference<uno::XInterface> m_xCalcComponent;
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/qa/unit/functions_test_old.cxx b/sc/qa/unit/functions_test_old.cxx
new file mode 100644
index 0000000..f858e8b
--- /dev/null
+++ b/sc/qa/unit/functions_test_old.cxx
@@ -0,0 +1,33 @@
+#include "functions_test.hxx"
+
+class FunctionsTestOld : public FunctionsTest
+{
+public:
+    FunctionsTestOld();
+
+    void testFormulasFODS();
+
+    CPPUNIT_TEST_SUITE(FunctionsTestOld);
+    CPPUNIT_TEST(testFormulasFODS);
+    CPPUNIT_TEST_SUITE_END();
+
+};
+
+FunctionsTestOld::FunctionsTestOld():
+    FunctionsTest("sc/qq/unit/data/functions/fods")
+{
+}
+
+void FunctionsTestOld::testFormulasFODS()
+{
+    OUString aDirectoryURL = m_directories.getURLFromSrc("/sc/qa/unit/data/functions/fods/");
+    recursiveScan(test::pass, "OpenDocument Spreadsheet Flat XML", aDirectoryURL,
+            "com.sun.star.comp.filter.OdfFlatXml,,com.sun.star.comp.Calc.XMLOasisImporter,com.sun.star.comp.Calc.XMLOasisExporter,,,true",
+            FODS_FORMAT_TYPE, SotClipboardFormatId::NONE, 0, false);
+}
+
+CPPUNIT_TEST_SUITE_REGISTRATION(FunctionsTestOld);
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list