From 387b32109267cc855f1c127e3d4f6d316fb8cfaf Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 14 Jan 2011 15:36:53 +0000 Subject: cppunit: port these tests over to canonical cppunit --- cppu/qa/makefile.mk | 23 ++++++++++++----------- cppu/qa/test_any.cxx | 13 ++++++++++--- cppu/qa/test_recursion.cxx | 13 ++++++++++--- cppu/qa/test_reference.cxx | 13 ++++++++++--- cppu/qa/test_unotype.cxx | 13 ++++++++++--- cppu/qa/version.map | 2 +- 6 files changed, 53 insertions(+), 24 deletions(-) (limited to 'cppu/qa') diff --git a/cppu/qa/makefile.mk b/cppu/qa/makefile.mk index b40d3512e575..f1b30660b09c 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 e3cd60b6a41d..84f5fb638efa 100644 --- a/cppu/qa/test_any.cxx +++ b/cppu/qa/test_any.cxx @@ -33,6 +33,14 @@ #include // wntmsci10 does not like +#include "preextstl.h" +#include +#include +#include +#include +#include +#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 977fdba1e062..463b8077ddba 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 +#include +#include +#include +#include +#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 968978af92fe..7572673aad32 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 +#include +#include +#include +#include +#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 c7cca12ff955..f324616bbe39 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 +#include +#include +#include +#include +#include "postextstl.h" + #include #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 7321bbca16ad..3308588ef6f8 100644 --- a/cppu/qa/version.map +++ b/cppu/qa/version.map @@ -27,7 +27,7 @@ UDK_3_0_0 { global: - registerAllTestFunction; + cppunitTestPlugIn; local: *; -- cgit v1.2.3