Kaydet (Commit) a9448bd1 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Avoid duplicate symbols & use setUp() and tearDown() for the item pool.

üst 1bcd2c94
...@@ -42,7 +42,6 @@ $(eval $(call gb_CppunitTest_use_libraries,editeng_core, \ ...@@ -42,7 +42,6 @@ $(eval $(call gb_CppunitTest_use_libraries,editeng_core, \
comphelper \ comphelper \
cppu \ cppu \
cppuhelper \ cppuhelper \
editeng \
i18nisolang1 \ i18nisolang1 \
i18nutil \ i18nutil \
lng \ lng \
......
...@@ -49,20 +49,42 @@ class Test : public test::BootstrapFixture ...@@ -49,20 +49,42 @@ class Test : public test::BootstrapFixture
public: public:
Test(); Test();
virtual void setUp();
virtual void tearDown();
void testConstruction(); void testConstruction();
CPPUNIT_TEST_SUITE(Test); CPPUNIT_TEST_SUITE(Test);
CPPUNIT_TEST(testConstruction); CPPUNIT_TEST(testConstruction);
CPPUNIT_TEST_SUITE_END(); 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() void Test::testConstruction()
{ {
EditEngineItemPool* pPool = new EditEngineItemPool(true); EditEngine aEngine(mpItemPool);
EditEngine aEngine(pPool);
SfxItemPool::Free(pPool); // TODO: This currently causes segfault in vcl.
// rtl::OUString aParaText = "I am Edit Engine.";
// aEngine.SetText(aParaText);
} }
CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_TEST_SUITE_REGISTRATION(Test);
......
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