cppunit: port these tests over to canonical cppunit
This commit is contained in:
parent
f2abd69d6a
commit
387b321092
6 changed files with 53 additions and 24 deletions
|
@ -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
|
||||
|
|
|
@ -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: */
|
||||
|
|
|
@ -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: */
|
||||
|
|
|
@ -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: */
|
||||
|
|
|
@ -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: */
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
UDK_3_0_0 {
|
||||
global:
|
||||
registerAllTestFunction;
|
||||
cppunitTestPlugIn;
|
||||
|
||||
local:
|
||||
*;
|
||||
|
|
Loading…
Reference in a new issue