diff options
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/CppunitTest_editeng_core.mk | 1 | ||||
-rw-r--r-- | editeng/qa/unit/core-test.cxx | 30 |
2 files changed, 26 insertions, 5 deletions
diff --git a/editeng/CppunitTest_editeng_core.mk b/editeng/CppunitTest_editeng_core.mk index c94ff95e417f..90117c8d386d 100644 --- a/editeng/CppunitTest_editeng_core.mk +++ b/editeng/CppunitTest_editeng_core.mk @@ -42,7 +42,6 @@ $(eval $(call gb_CppunitTest_use_libraries,editeng_core, \ comphelper \ cppu \ cppuhelper \ - editeng \ i18nisolang1 \ i18nutil \ lng \ diff --git a/editeng/qa/unit/core-test.cxx b/editeng/qa/unit/core-test.cxx index e5c556fea151..b8e31119f9eb 100644 --- a/editeng/qa/unit/core-test.cxx +++ b/editeng/qa/unit/core-test.cxx @@ -49,20 +49,42 @@ class Test : public test::BootstrapFixture public: Test(); + virtual void setUp(); + virtual void tearDown(); + void testConstruction(); CPPUNIT_TEST_SUITE(Test); CPPUNIT_TEST(testConstruction); CPPUNIT_TEST_SUITE_END(); + +private: + EditEngineItemPool* mpItemPool; }; -Test::Test() {} +Test::Test() : mpItemPool(NULL) {} + +void Test::setUp() +{ + test::BootstrapFixture::setUp(); + + mpItemPool = new EditEngineItemPool(true); +} + +void Test::tearDown() +{ + SfxItemPool::Free(mpItemPool); + + test::BootstrapFixture::tearDown(); +} void Test::testConstruction() { - EditEngineItemPool* pPool = new EditEngineItemPool(true); - EditEngine aEngine(pPool); - SfxItemPool::Free(pPool); + EditEngine aEngine(mpItemPool); + + // TODO: This currently causes segfault in vcl. +// rtl::OUString aParaText = "I am Edit Engine."; +// aEngine.SetText(aParaText); } CPPUNIT_TEST_SUITE_REGISTRATION(Test); |