diff options
Diffstat (limited to 'sw')
-rw-r--r-- | sw/CppunitTest_sw_tox.mk | 30 | ||||
-rw-r--r-- | sw/qa/cppunit/tox/test_ToxLinkProcessor.cxx | 11 |
2 files changed, 32 insertions, 9 deletions
diff --git a/sw/CppunitTest_sw_tox.mk b/sw/CppunitTest_sw_tox.mk index 23c61fe8505f..960e94be1ecf 100644 --- a/sw/CppunitTest_sw_tox.mk +++ b/sw/CppunitTest_sw_tox.mk @@ -10,22 +10,22 @@ # This file contains the unit test definition for class in the sources/core/tox subfolder # The macro which defines the main method is contained in test_ToxWhitespaceStripper.cxx -$(eval $(call gb_CppunitTest_CppunitTest,sw_tox_test)) +$(eval $(call gb_CppunitTest_CppunitTest,sw_tox)) -$(eval $(call gb_CppunitTest_add_exception_objects,sw_tox_test, \ +$(eval $(call gb_CppunitTest_add_exception_objects,sw_tox, \ sw/qa/cppunit/tox/test_ToxWhitespaceStripper \ sw/qa/cppunit/tox/test_ToxLinkProcessor \ sw/qa/cppunit/tox/test_ToxTextGenerator \ )) -$(eval $(call gb_CppunitTest_use_libraries,sw_tox_test, \ +$(eval $(call gb_CppunitTest_use_libraries,sw_tox, \ comphelper \ cppu \ cppuhelper \ editeng \ sal \ svt \ - sw \ + svx \ test \ unotest \ vcl \ @@ -34,17 +34,33 @@ $(eval $(call gb_CppunitTest_use_libraries,sw_tox_test, \ $(gb_UWINAPI) \ )) -$(eval $(call gb_CppunitTest_use_externals,sw_tox_test, \ +$(eval $(call gb_CppunitTest_use_library_objects,sw_tox, \ + sw \ +)) + +$(eval $(call gb_CppunitTest_use_externals,sw_tox, \ boost_headers \ libxml2 \ )) -$(eval $(call gb_CppunitTest_use_api,sw_tox_test,\ +$(eval $(call gb_CppunitTest_use_api,sw_tox,\ offapi \ udkapi \ )) -$(eval $(call gb_CppunitTest_set_include,sw_tox_test,\ +$(eval $(call gb_CppunitTest_use_components,sw_tox, \ + configmgr/source/configmgr \ + framework/util/fwk \ + i18npool/util/i18npool \ + ucb/source/core/ucb1 \ + ucb/source/ucp/file/ucpfile1 \ +)) + +$(eval $(call gb_CppunitTest_use_configuration,sw_tox)) +$(eval $(call gb_CppunitTest_use_ure,sw_tox)) +$(eval $(call gb_CppunitTest_use_vcl,sw_tox)) + +$(eval $(call gb_CppunitTest_set_include,sw_tox,\ -I$(SRCDIR)/sw/inc \ -I$(SRCDIR)/sw/source/core/inc \ $$(INCLUDE) \ diff --git a/sw/qa/cppunit/tox/test_ToxLinkProcessor.cxx b/sw/qa/cppunit/tox/test_ToxLinkProcessor.cxx index 1873bb17ef50..e0ae1a1bd41e 100644 --- a/sw/qa/cppunit/tox/test_ToxLinkProcessor.cxx +++ b/sw/qa/cppunit/tox/test_ToxLinkProcessor.cxx @@ -16,13 +16,15 @@ #include <ToxLinkProcessor.hxx> #include <cppunit/TestAssert.h> -#include <cppunit/TestFixture.h> #include <cppunit/extensions/HelperMacros.h> #include <cppunit/plugin/TestPlugIn.h> +#include <test/bootstrapfixture.hxx> + +#include <swdll.hxx> using namespace sw; -class ToxLinkProcessorTest : public CppUnit::TestFixture +class ToxLinkProcessorTest : public test::BootstrapFixture { void ExceptionIsThrownIfTooManyLinksAreClosed(); void AddingAndClosingTwoLinksResultsInTwoClosedLinks(); @@ -36,6 +38,11 @@ class ToxLinkProcessorTest : public CppUnit::TestFixture CPPUNIT_TEST(LinkSequenceIsPreserved); CPPUNIT_TEST_SUITE_END(); public: + void setUp() SAL_OVERRIDE { + BootstrapFixture::setUp(); + SwGlobals::ensure(); + } + static const OUString STYLE_NAME_1; static const OUString STYLE_NAME_2; static const sal_uInt16 POOL_ID_1; |