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>
This commit is contained in:
116
sc/CppunitTest_sc_database_functions_test.mk
Normal file
116
sc/CppunitTest_sc_database_functions_test.mk
Normal file
@@ -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:
|
@@ -7,18 +7,18 @@
|
|||||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
# 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, \
|
$(eval $(call gb_CppunitTest_add_exception_objects,sc_functions_test_old, \
|
||||||
sc/qa/unit/functions_test \
|
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 \
|
boost_headers \
|
||||||
mdds_headers \
|
mdds_headers \
|
||||||
))
|
))
|
||||||
|
|
||||||
$(eval $(call gb_CppunitTest_use_libraries,sc_functions_test, \
|
$(eval $(call gb_CppunitTest_use_libraries,sc_functions_test_old, \
|
||||||
basegfx \
|
basegfx \
|
||||||
comphelper \
|
comphelper \
|
||||||
cppu \
|
cppu \
|
||||||
@@ -52,22 +52,22 @@ $(eval $(call gb_CppunitTest_use_libraries,sc_functions_test, \
|
|||||||
$(gb_UWINAPI) \
|
$(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/source/ui/inc \
|
||||||
-I$(SRCDIR)/sc/inc \
|
-I$(SRCDIR)/sc/inc \
|
||||||
$$(INCLUDE) \
|
$$(INCLUDE) \
|
||||||
))
|
))
|
||||||
|
|
||||||
$(eval $(call gb_CppunitTest_use_api,sc_functions_test,\
|
$(eval $(call gb_CppunitTest_use_api,sc_functions_test_old,\
|
||||||
offapi \
|
offapi \
|
||||||
udkapi \
|
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 \
|
basic/util/sb \
|
||||||
chart2/source/chartcore \
|
chart2/source/chartcore \
|
||||||
chart2/source/controller/chartcontroller \
|
chart2/source/controller/chartcontroller \
|
||||||
@@ -111,6 +111,6 @@ $(eval $(call gb_CppunitTest_use_components,sc_functions_test,\
|
|||||||
xmlscript/util/xmlscript \
|
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:
|
# vim: set noet sw=4 ts=4:
|
@@ -61,6 +61,7 @@ $(eval $(call gb_Library_use_libraries,scqahelper,\
|
|||||||
$(eval $(call gb_Library_add_exception_objects,scqahelper,\
|
$(eval $(call gb_Library_add_exception_objects,scqahelper,\
|
||||||
sc/qa/unit/helper/qahelper \
|
sc/qa/unit/helper/qahelper \
|
||||||
sc/qa/unit/helper/xpath \
|
sc/qa/unit/helper/xpath \
|
||||||
|
sc/qa/unit/functions_test \
|
||||||
))
|
))
|
||||||
|
|
||||||
# vim: set noet sw=4 ts=4:
|
# vim: set noet sw=4 ts=4:
|
||||||
|
@@ -74,7 +74,8 @@ $(eval $(call gb_Module_add_slowcheck_targets,sc, \
|
|||||||
|
|
||||||
ifneq ($(PLATFORMID),linux_x86)
|
ifneq ($(PLATFORMID),linux_x86)
|
||||||
$(eval $(call gb_Module_add_slowcheck_targets,sc, \
|
$(eval $(call gb_Module_add_slowcheck_targets,sc, \
|
||||||
CppunitTest_sc_functions_test \
|
CppunitTest_sc_functions_test_old \
|
||||||
|
CppunitTest_sc_database_functions_test \
|
||||||
))
|
))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
33
sc/qa/unit/functions_database.cxx
Normal file
33
sc/qa/unit/functions_database.cxx
Normal file
@@ -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: */
|
@@ -7,42 +7,12 @@
|
|||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* 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"
|
#include "document.hxx"
|
||||||
|
|
||||||
class FunctionsTest : public ScBootstrapFixture, public test::FiltersTest
|
FunctionsTest::FunctionsTest(const OUString& rPath):
|
||||||
{
|
ScBootstrapFixture(rPath)
|
||||||
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")
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -77,17 +47,4 @@ bool FunctionsTest::load(const OUString& rFilter, const OUString& rURL,
|
|||||||
return true;
|
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: */
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||||
|
36
sc/qa/unit/functions_test.hxx
Normal file
36
sc/qa/unit/functions_test.hxx
Normal file
@@ -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: */
|
33
sc/qa/unit/functions_test_old.cxx
Normal file
33
sc/qa/unit/functions_test_old.cxx
Normal file
@@ -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: */
|
Reference in New Issue
Block a user