Kaydet (Commit) f741a605 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

ToxLinkProcessorTest needs SwGlobals::ensure to set pSwResMgr

...derefernced in

(anonymous namespace)::lcl_NewUINameArray
SwStyleNameMapper::GetChrFmtUINameArray
SwStyleNameMapper::getNameFromId
SwStyleNameMapper::fillNameFromId
SwStyleNameMapper::FillUIName
SwFmtINetFmt::SwFmtINetFmt
sw::ToxLinkProcessor::ClosedLink::ClosedLink
sw::ToxLinkProcessor::CloseLink
ToxLinkProcessorTest::ExceptionIsThrownIfTooManyLinksAreClosed
...

Also, fix the name from sw_tox_test to sw_tox.

Change-Id: I48ea9fb6322df3725b089538fd67b2e24578b668
üst f8c5a61e
......@@ -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) \
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment