editeng/CppunitTest_editeng_core.mk | 3 +++ editeng/qa/unit/core-test.cxx | 10 ++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-)
New commits: commit 8b216a7aa3c88a6b18f62079757567a2d4e4d737 Author: Kohei Yoshida <kohei.yosh...@gmail.com> Date: Wed Apr 11 20:46:45 2012 -0400 Set default items to the item pool, do this and that, and now the test passes. diff --git a/editeng/CppunitTest_editeng_core.mk b/editeng/CppunitTest_editeng_core.mk index 77e203d..c94ff95 100644 --- a/editeng/CppunitTest_editeng_core.mk +++ b/editeng/CppunitTest_editeng_core.mk @@ -35,6 +35,8 @@ $(eval $(call gb_CppunitTest_add_exception_objects,editeng_core, \ editeng/qa/unit/core-test \ )) +$(eval $(call gb_CppunitTest_use_library_objects,editeng_core,editeng)) + $(eval $(call gb_CppunitTest_use_libraries,editeng_core, \ basegfx \ comphelper \ @@ -64,6 +66,7 @@ $(eval $(call gb_CppunitTest_use_externals,editeng_core,\ )) $(eval $(call gb_CppunitTest_set_include,editeng_core,\ + -I$(SRCDIR)/editeng/source \ $$(INCLUDE) \ )) diff --git a/editeng/qa/unit/core-test.cxx b/editeng/qa/unit/core-test.cxx index d631923..27af952 100644 --- a/editeng/qa/unit/core-test.cxx +++ b/editeng/qa/unit/core-test.cxx @@ -35,6 +35,8 @@ #include <cppunit/extensions/HelperMacros.h> #include "svl/itempool.hxx" +#include "editeng/eerdll.hxx" +#include "editeng/eerdll2.hxx" #include "editeng/editeng.hxx" #include "editeng/eeitem.hxx" #include "editeng/editids.hrc" @@ -99,7 +101,11 @@ const SfxItemInfo aItemInfos[] = { class TestPool : public SfxItemPool { public: - TestPool() : SfxItemPool("TestPool", EE_ITEMS_START, EE_ITEMS_END, aItemInfos, NULL, true) {} + TestPool() : SfxItemPool("TestPool", EE_ITEMS_START, EE_ITEMS_END, aItemInfos, NULL, true) + { + SfxPoolItem** ppDefItems = EditDLL::Get().GetGlobalData()->GetDefItems(); + SetDefaults(ppDefItems); + } virtual ~TestPool() {} }; @@ -122,7 +128,7 @@ void Test::testConstruction() TestPool aPool; // TODO: fix me -// EditEngine aEngine(&aPool); + EditEngine aEngine(&aPool); } CPPUNIT_TEST_SUITE_REGISTRATION(Test); _______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits