diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-11-30 21:01:31 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-11-30 22:33:25 +0000 |
commit | f45af7c8093dae17bada71e33a2c32023a2c1986 (patch) | |
tree | 07949459b2720a2bd6623039c31260d8b70e79cc /sc | |
parent | 64e6e7c6e7b881bf240de82ef020b290036e7e0e (diff) |
start to split the functions test by category
Change-Id: Ib06eaee7cf5eeb3dbe95ad42afc2a17caa0359c2
Reviewed-on: https://gerrit.libreoffice.org/31440
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/CppunitTest_sc_database_functions_test.mk | 116 | ||||
-rw-r--r-- | sc/CppunitTest_sc_functions_test_old.mk (renamed from sc/CppunitTest_sc_functions_test.mk) | 22 | ||||
-rw-r--r-- | sc/Library_scqahelper.mk | 1 | ||||
-rw-r--r-- | sc/Module_sc.mk | 3 | ||||
-rw-r--r-- | sc/qa/unit/data/functions/database/fods/dmax.fods (renamed from sc/qa/unit/data/functions/fods/dmax.fods) | 0 | ||||
-rw-r--r-- | sc/qa/unit/data/functions/database/fods/dmin.fods (renamed from sc/qa/unit/data/functions/fods/dmin.fods) | 0 | ||||
-rw-r--r-- | sc/qa/unit/functions_database.cxx | 33 | ||||
-rw-r--r-- | sc/qa/unit/functions_test.cxx | 49 | ||||
-rw-r--r-- | sc/qa/unit/functions_test.hxx | 36 | ||||
-rw-r--r-- | sc/qa/unit/functions_test_old.cxx | 33 |
10 files changed, 235 insertions, 58 deletions
diff --git a/sc/CppunitTest_sc_database_functions_test.mk b/sc/CppunitTest_sc_database_functions_test.mk new file mode 100644 index 000000000000..4596080dfe31 --- /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 index 9a4a77d51ef8..2981bf87b8fb 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 3cfd6d4b5abc..767ef7a9e714 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 ce7e4c135a3c..96458d12d408 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 index f89e9751bf37..f89e9751bf37 100644 --- a/sc/qa/unit/data/functions/fods/dmax.fods +++ b/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 index 97dba4e43d0d..97dba4e43d0d 100644 --- a/sc/qa/unit/data/functions/fods/dmin.fods +++ b/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 000000000000..c1b83c25087d --- /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 35387c79030d..0cc94007364b 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 000000000000..37cde97e315e --- /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 000000000000..f858e8b26c55 --- /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: */ |