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. --- basebmp/test/basictest.cxx | 15 ++++++--------- basebmp/test/bmpmasktest.cxx | 6 ++++-- basebmp/test/bmptest.cxx | 6 ++++-- basebmp/test/cliptest.cxx | 6 ++++-- basebmp/test/export.map | 2 +- basebmp/test/filltest.cxx | 6 ++++-- basebmp/test/linetest.cxx | 6 ++++-- basebmp/test/makefile.mk | 3 +-- basebmp/test/masktest.cxx | 6 ++++-- basebmp/test/polytest.cxx | 6 ++++-- 10 files changed, 36 insertions(+), 26 deletions(-) (limited to 'basebmp') diff --git a/basebmp/test/basictest.cxx b/basebmp/test/basictest.cxx index 15d2da39851a..52693a41f129 100644 --- a/basebmp/test/basictest.cxx +++ b/basebmp/test/basictest.cxx @@ -30,7 +30,10 @@ // 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 #include @@ -294,13 +297,7 @@ public: }; // ----------------------------------------------------------------------------- -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(BasicTest, "BasicTest"); +CPPUNIT_TEST_SUITE_REGISTRATION(BasicTest); } - -// ----------------------------------------------------------------------------- - -// 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. -NOADDITIONAL; - +CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/basebmp/test/bmpmasktest.cxx b/basebmp/test/bmpmasktest.cxx index afadcad3b3fb..9c622157ca8f 100644 --- a/basebmp/test/bmpmasktest.cxx +++ b/basebmp/test/bmpmasktest.cxx @@ -30,7 +30,9 @@ // autogenerated file with codegen.pl -#include +#include "cppunit/TestAssert.h" +#include "cppunit/TestFixture.h" +#include "cppunit/extensions/HelperMacros.h" #include #include @@ -180,7 +182,7 @@ public: }; // ----------------------------------------------------------------------------- -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(BmpMaskTest, "BmpMaskTest"); +CPPUNIT_TEST_SUITE_REGISTRATION(BmpMaskTest); } diff --git a/basebmp/test/bmptest.cxx b/basebmp/test/bmptest.cxx index 33ed58c25402..92d0c9b50f67 100644 --- a/basebmp/test/bmptest.cxx +++ b/basebmp/test/bmptest.cxx @@ -30,7 +30,9 @@ // autogenerated file with codegen.pl -#include +#include "cppunit/TestAssert.h" +#include "cppunit/TestFixture.h" +#include "cppunit/extensions/HelperMacros.h" #include #include @@ -207,7 +209,7 @@ public: }; // ----------------------------------------------------------------------------- -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(BmpTest, "BmpTest"); +CPPUNIT_TEST_SUITE_REGISTRATION(BmpTest); } diff --git a/basebmp/test/cliptest.cxx b/basebmp/test/cliptest.cxx index 2172b0b667a7..89cd7ede6293 100644 --- a/basebmp/test/cliptest.cxx +++ b/basebmp/test/cliptest.cxx @@ -30,7 +30,9 @@ // autogenerated file with codegen.pl -#include +#include "cppunit/TestAssert.h" +#include "cppunit/TestFixture.h" +#include "cppunit/extensions/HelperMacros.h" #include #include @@ -274,7 +276,7 @@ public: }; // ----------------------------------------------------------------------------- -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(ClipTest, "ClipTest"); +CPPUNIT_TEST_SUITE_REGISTRATION(ClipTest); } diff --git a/basebmp/test/export.map b/basebmp/test/export.map index bfd13f454044..ac406a4096dd 100644 --- a/basebmp/test/export.map +++ b/basebmp/test/export.map @@ -31,7 +31,7 @@ UDK_3.1 { global: - registerAllTestFunction; + cppunitTestPlugIn; local: *; diff --git a/basebmp/test/filltest.cxx b/basebmp/test/filltest.cxx index fcc4e5df5fa3..e2e5b32f7fed 100644 --- a/basebmp/test/filltest.cxx +++ b/basebmp/test/filltest.cxx @@ -30,7 +30,9 @@ // autogenerated file with codegen.pl -#include +#include "cppunit/TestAssert.h" +#include "cppunit/TestFixture.h" +#include "cppunit/extensions/HelperMacros.h" #include #include @@ -268,7 +270,7 @@ public: }; // ----------------------------------------------------------------------------- -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(FillTest, "FillTest"); +CPPUNIT_TEST_SUITE_REGISTRATION(FillTest); } diff --git a/basebmp/test/linetest.cxx b/basebmp/test/linetest.cxx index 1a424864f893..488c6cf7c91b 100644 --- a/basebmp/test/linetest.cxx +++ b/basebmp/test/linetest.cxx @@ -30,7 +30,9 @@ // autogenerated file with codegen.pl -#include +#include "cppunit/TestAssert.h" +#include "cppunit/TestFixture.h" +#include "cppunit/extensions/HelperMacros.h" #include #include @@ -216,7 +218,7 @@ public: }; // ----------------------------------------------------------------------------- -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(LineTest, "LineTest"); +CPPUNIT_TEST_SUITE_REGISTRATION(LineTest); } diff --git a/basebmp/test/makefile.mk b/basebmp/test/makefile.mk index 3ea13868aeb4..7061a77a8e09 100644 --- a/basebmp/test/makefile.mk +++ b/basebmp/test/makefile.mk @@ -124,7 +124,6 @@ SLOFILES=$(SHL1OBJS) # --- Targets ------------------------------------------------------ .INCLUDE : target.mk -.INCLUDE : _cppunit.mk # --- Enable test execution in normal build ------------------------ .IF "$(L10N_framework)"=="" @@ -133,7 +132,7 @@ unittest : $(SHL1TARGETN) @echo ---------------------------------------------------------- @echo - start unit test on library $(SHL1TARGETN) @echo ---------------------------------------------------------- - $(TESTSHL2) -sf $(mktmp ) $(SHL1TARGETN) + $(CPPUNITTESTER) $(SHL1TARGETN) ALLTAR : unittest .ENDIF diff --git a/basebmp/test/masktest.cxx b/basebmp/test/masktest.cxx index 61f329f094f2..f00ac66aff39 100644 --- a/basebmp/test/masktest.cxx +++ b/basebmp/test/masktest.cxx @@ -30,7 +30,9 @@ // autogenerated file with codegen.pl -#include +#include "cppunit/TestAssert.h" +#include "cppunit/TestFixture.h" +#include "cppunit/extensions/HelperMacros.h" #include #include @@ -168,7 +170,7 @@ public: }; // ----------------------------------------------------------------------------- -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(MaskTest, "MaskTest"); +CPPUNIT_TEST_SUITE_REGISTRATION(MaskTest); } diff --git a/basebmp/test/polytest.cxx b/basebmp/test/polytest.cxx index e35c8c834bd9..c1e066eac562 100644 --- a/basebmp/test/polytest.cxx +++ b/basebmp/test/polytest.cxx @@ -30,7 +30,9 @@ // autogenerated file with codegen.pl -#include +#include "cppunit/TestAssert.h" +#include "cppunit/TestFixture.h" +#include "cppunit/extensions/HelperMacros.h" #include #include @@ -288,7 +290,7 @@ public: }; // ----------------------------------------------------------------------------- -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(PolyTest, "PolyTest"); +CPPUNIT_TEST_SUITE_REGISTRATION(PolyTest); } -- cgit v1.2.1