From 18be96dc73c64d16f63fc6d3382d7d7d3a8fee24 Mon Sep 17 00:00:00 2001 From: sb Date: Fri, 11 Dec 2009 14:29:59 +0100 Subject: sb118: Replace (heavily modified) CppUnit 1.8.0 with (unmodified) latest 1.12.1. - Old modifications were necessary for testshl2, which has simply been excluded from the build for now. - Tests in basebmp, basegfx, o3tl (that are executed during build) have been converted from using modified CppUnit/testshl2 to using unmodified CppUnit. - CppUnit's DllPlugInTester has problems with OOo tests on Windows, see #i107562#, so for now a new cppunittester from sal is used instead. --- o3tl/prj/build.lst | 2 +- o3tl/qa/export.map | 2 +- o3tl/qa/makefile.mk | 3 +-- o3tl/qa/test-cow_wrapper.cxx | 18 ++++++------------ o3tl/qa/test-heap_ptr.cxx | 6 ++++-- o3tl/qa/test-range.cxx | 7 ++++--- 6 files changed, 17 insertions(+), 21 deletions(-) (limited to 'o3tl') diff --git a/o3tl/prj/build.lst b/o3tl/prj/build.lst index 98293257e4bd..fe6b53d1c732 100644 --- a/o3tl/prj/build.lst +++ b/o3tl/prj/build.lst @@ -1,4 +1,4 @@ -ot o3tl : sal testshl2 BOOST:boost NULL +ot o3tl : sal cppunit BOOST:boost NULL ot o3tl usr1 - all ot_mkout NULL ot o3tl\inc get - all ot_inc NULL ot o3tl\prj get - all ot_prj NULL diff --git a/o3tl/qa/export.map b/o3tl/qa/export.map index bfd13f454044..ac406a4096dd 100644 --- a/o3tl/qa/export.map +++ b/o3tl/qa/export.map @@ -31,7 +31,7 @@ UDK_3.1 { global: - registerAllTestFunction; + cppunitTestPlugIn; local: *; diff --git a/o3tl/qa/makefile.mk b/o3tl/qa/makefile.mk index 70fe224cf6a9..778c24d6b9f2 100644 --- a/o3tl/qa/makefile.mk +++ b/o3tl/qa/makefile.mk @@ -68,7 +68,6 @@ SLOFILES=$(SHL1OBJS) .ENDIF # L10N_framework .INCLUDE : target.mk -.INCLUDE : _cppunit.mk # --- Enable test execution in normal build ------------------------ .IF "$(L10N_framework)"=="" @@ -76,7 +75,7 @@ unittest : $(SHL1TARGETN) @echo ---------------------------------------------------------- @echo - start unit test on library $(SHL1TARGETN) @echo ---------------------------------------------------------- - $(TESTSHL2) -sf $(mktmp ) $(SHL1TARGETN) + $(CPPUNITTESTER) $(SHL1TARGETN) ALLTAR : unittest .ENDIF # L10N_framework diff --git a/o3tl/qa/test-cow_wrapper.cxx b/o3tl/qa/test-cow_wrapper.cxx index 6bb169e951a4..84d615fca3db 100644 --- a/o3tl/qa/test-cow_wrapper.cxx +++ b/o3tl/qa/test-cow_wrapper.cxx @@ -1,6 +1,9 @@ // autogenerated file with codegen.pl -#include +#include "cppunit/TestAssert.h" +#include "cppunit/TestFixture.h" +#include "cppunit/extensions/HelperMacros.h" +#include "cppunit/plugin/TestPlugIn.h" #include "cow_wrapper_clients.hxx" @@ -119,15 +122,6 @@ public: }; // ----------------------------------------------------------------------------- -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(cow_wrapper_test, "cow_wrapper_test"); - - -// ----------------------------------------------------------------------------- - -// this macro creates an empty function, which will called by the RegisterAllFunctions() -// to let the user the possibility to also register some functions by hand. -void RegisterAdditionalFunctions(FktRegFuncPtr ) -{ -} -// NOADDITIONAL; +CPPUNIT_TEST_SUITE_REGISTRATION(cow_wrapper_test); +CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/o3tl/qa/test-heap_ptr.cxx b/o3tl/qa/test-heap_ptr.cxx index 5e247a8b9abc..3c50c68872d2 100644 --- a/o3tl/qa/test-heap_ptr.cxx +++ b/o3tl/qa/test-heap_ptr.cxx @@ -28,7 +28,9 @@ * ************************************************************************/ -#include +#include "cppunit/TestAssert.h" +#include "cppunit/TestFixture.h" +#include "cppunit/extensions/HelperMacros.h" #include @@ -163,4 +165,4 @@ class heap_ptr_test : public CppUnit::TestFixture }; // class heap_ptr_test // ----------------------------------------------------------------------------- -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(heap_ptr_test, "o3tltests"); +CPPUNIT_TEST_SUITE_REGISTRATION(heap_ptr_test); diff --git a/o3tl/qa/test-range.cxx b/o3tl/qa/test-range.cxx index 626d9b6e3a90..326f8d4e06ef 100644 --- a/o3tl/qa/test-range.cxx +++ b/o3tl/qa/test-range.cxx @@ -28,8 +28,9 @@ * ************************************************************************/ - -#include +#include "cppunit/TestAssert.h" +#include "cppunit/TestFixture.h" +#include "cppunit/extensions/HelperMacros.h" #include #include @@ -233,4 +234,4 @@ public: }; // class range_test // ----------------------------------------------------------------------------- -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(range_test, "o3tltests"); +CPPUNIT_TEST_SUITE_REGISTRATION(range_test); -- cgit v1.2.3