diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-01-14 15:36:53 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-01-14 15:36:53 +0000 |
commit | da953ad45c52e7307e8db9866a221e9a2a27a7b1 (patch) | |
tree | 9ef1a2bb0a5a0cf60de6d17eaf4a357f25036bf7 /cppu | |
parent | e5dd50766006e3baa32eed1efa7dec49016767ab (diff) |
cppunit: port these tests over to canonical cppunit
Diffstat (limited to 'cppu')
-rw-r--r-- | cppu/qa/makefile.mk | 23 | ||||
-rw-r--r-- | cppu/qa/test_any.cxx | 13 | ||||
-rw-r--r-- | cppu/qa/test_recursion.cxx | 13 | ||||
-rw-r--r-- | cppu/qa/test_reference.cxx | 13 | ||||
-rw-r--r-- | cppu/qa/test_unotype.cxx | 13 | ||||
-rw-r--r-- | cppu/qa/version.map | 2 |
6 files changed, 53 insertions, 24 deletions
diff --git a/cppu/qa/makefile.mk b/cppu/qa/makefile.mk index b40d3512e..f1b30660b 100644 --- a/cppu/qa/makefile.mk +++ b/cppu/qa/makefile.mk @@ -33,11 +33,18 @@ ENABLE_EXCEPTIONS := TRUE .INCLUDE: settings.mk -CFLAGSCXX += $(CPPUNIT_CFLAGS) +#building with stlport, but cppunit was not built with stlport +.IF "$(USE_SYSTEM_STL)"!="YES" +.IF "$(SYSTEM_CPPUNIT)"=="YES" +CFLAGSCXX+=-DADAPT_EXT_STL +.ENDIF +.ENDIF -DLLPRE = # no leading "lib" on .so files +CFLAGSCXX+=$(CPPUNIT_CFLAGS) -INCPRE += $(MISC)$/$(TARGET)$/inc +DLLPRE=# no leading "lib" on .so files + +INCPRE+=$(MISC)$/$(TARGET)$/inc SHL1TARGET = $(TARGET)_any SHL1OBJS = $(SLO)$/test_any.obj @@ -71,8 +78,6 @@ SLOFILES = $(SHL1OBJS) $(SHL2OBJS) $(SHL3OBJS) $(SHL4OBJS) .INCLUDE: target.mk -ALLTAR: test - $(SHL1OBJS): $(MISC)$/$(TARGET).cppumaker.flag $(MISC)$/$(TARGET).cppumaker.flag: $(MISC)$/$(TARGET).rdb @@ -82,15 +87,11 @@ $(MISC)$/$(TARGET).cppumaker.flag: $(MISC)$/$(TARGET).rdb $(TOUCH) $@ $(MISC)$/$(TARGET).rdb: $(MISC)$/$(TARGET)$/types.urd - - rm $@ + - $(RM) $@ $(REGMERGE) $@ /UCR $< $(MISC)$/$(TARGET)$/types.urd: types.idl - $(MKDIR) $(MISC)$/$(TARGET) $(IDLC) -O$(MISC)$/$(TARGET) -I$(SOLARIDLDIR) -cid -we $< -test .PHONY: $(SHL1TARGETN) $(SHL2TARGETN) $(SHL3TARGETN) $(SHL4TARGETN) - $(TESTSHL2) $(SHL1TARGETN) - $(TESTSHL2) $(SHL2TARGETN) - $(TESTSHL2) $(SHL3TARGETN) - $(TESTSHL2) $(SHL4TARGETN) +.INCLUDE : _cppunit.mk diff --git a/cppu/qa/test_any.cxx b/cppu/qa/test_any.cxx index 7f440065c..3d62d8931 100644 --- a/cppu/qa/test_any.cxx +++ b/cppu/qa/test_any.cxx @@ -33,6 +33,14 @@ #include <stdlib.h> // wntmsci10 does not like <cstdlib> +#include "preextstl.h" +#include <cppunit/TestSuite.h> +#include <cppunit/TestFixture.h> +#include <cppunit/TestCase.h> +#include <cppunit/plugin/TestPlugIn.h> +#include <cppunit/extensions/HelperMacros.h> +#include "postextstl.h" + #include "Enum1.hpp" #include "Enum2.hpp" #include "Exception1.hpp" @@ -56,7 +64,6 @@ #include "com/sun/star/uno/Sequence.hxx" #include "com/sun/star/uno/Type.hxx" #include "com/sun/star/uno/XInterface.hpp" -#include "testshl/simpleheader.hxx" #include "osl/diagnose.h" #include "osl/interlck.h" #include "rtl/string.h" @@ -2324,10 +2331,10 @@ void Test::testNull() { } } -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(Test, "alltests"); +CPPUNIT_TEST_SUITE_REGISTRATION(Test); } -NOADDITIONAL; +CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/qa/test_recursion.cxx b/cppu/qa/test_recursion.cxx index b5e12ca18..84a1ed245 100644 --- a/cppu/qa/test_recursion.cxx +++ b/cppu/qa/test_recursion.cxx @@ -29,7 +29,14 @@ #include "precompiled_cppu.hxx" #include "sal/config.h" -#include "testshl/simpleheader.hxx" +#include "preextstl.h" +#include <cppunit/TestSuite.h> +#include <cppunit/TestFixture.h> +#include <cppunit/TestCase.h> +#include <cppunit/plugin/TestPlugIn.h> +#include <cppunit/extensions/HelperMacros.h> +#include "postextstl.h" + #include "sal/types.h" #include "Rec.hpp" @@ -51,10 +58,10 @@ void Test::testRecursion() { CPPUNIT_ASSERT_EQUAL(static_cast< sal_Int32 >(0), Rec().x.getLength()); } -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(Test, "tests"); +CPPUNIT_TEST_SUITE_REGISTRATION(Test); } -NOADDITIONAL; +CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/qa/test_reference.cxx b/cppu/qa/test_reference.cxx index b4ef870b9..b299865c6 100644 --- a/cppu/qa/test_reference.cxx +++ b/cppu/qa/test_reference.cxx @@ -31,9 +31,16 @@ #include "sal/config.h" +#include "preextstl.h" +#include <cppunit/TestSuite.h> +#include <cppunit/TestFixture.h> +#include <cppunit/TestCase.h> +#include <cppunit/plugin/TestPlugIn.h> +#include <cppunit/extensions/HelperMacros.h> +#include "postextstl.h" + #include "Interface1.hpp" -#include "testshl/simpleheader.hxx" #include "rtl/ustring.hxx" #include "sal/types.h" @@ -150,10 +157,10 @@ void Test::testUnoSetThrow() CPPUNIT_ASSERT_EQUAL( false, bCaughtException ); } -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(Test, "alltests"); +CPPUNIT_TEST_SUITE_REGISTRATION(Test); } // namespace -NOADDITIONAL; +CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/qa/test_unotype.cxx b/cppu/qa/test_unotype.cxx index d6fe948be..218f22b85 100644 --- a/cppu/qa/test_unotype.cxx +++ b/cppu/qa/test_unotype.cxx @@ -31,6 +31,14 @@ #include "sal/config.h" +#include "preextstl.h" +#include <cppunit/TestSuite.h> +#include <cppunit/TestFixture.h> +#include <cppunit/TestCase.h> +#include <cppunit/plugin/TestPlugIn.h> +#include <cppunit/extensions/HelperMacros.h> +#include "postextstl.h" + #include <typeinfo> #include "com/sun/star/beans/Optional.hpp" @@ -45,7 +53,6 @@ #include "com/sun/star/uno/XComponentContext.hpp" #include "com/sun/star/uno/XInterface.hpp" #include "cppu/unotype.hxx" -#include "testshl/simpleheader.hxx" #include "rtl/ustring.h" #include "rtl/ustring.hxx" #include "sal/types.h" @@ -806,10 +813,10 @@ void Test::testGetTypeFavourChar() { #endif } -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(Test, "alltests"); +CPPUNIT_TEST_SUITE_REGISTRATION(Test); } -NOADDITIONAL; +CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/qa/version.map b/cppu/qa/version.map index f313c44bd..0dbbcc5a7 100644 --- a/cppu/qa/version.map +++ b/cppu/qa/version.map @@ -27,7 +27,7 @@ UDK_3_0_0 { global: - registerAllTestFunction; + cppunitTestPlugIn; local: *; |