From 0807889cb53679c5a9e741e8dedc3668ef59729b Mon Sep 17 00:00:00 2001 From: Baptiste Lepilleur Date: Sat, 13 Jul 2002 10:36:33 +0000 Subject: Include/cppunit/ui/text/TestRunner. include/cppunit/ui/text/TestRunner.h: * src/cppunit/TextTestRunner.cpp: Renamed TextUi::TestRunner TextTestRunner and moved it to the CppUnit namespace. Added a deprecated typedef for compatibility with previous version. * include/cppunit/ui/text/TextTestRunner.h: added. * include/cppunit/ui/mfc/TestRunner.h: * src/cppunit/msvc6/testrunner/TestRunner.cpp: Renamed MfcUi::TestRunner MfcTestRunner. Added deprecated typedef for compatibility. Renamed TestRunner.cpp to MfcTestRunner.cpp. * include/cppunit/ui/mfc/MfcTestRunner.h: added. * include/cppunit/ui/qt/TestRunner.h: * src/qttestrunner/TestRunner.cpp: renamed QtUi::TestRunner QtTestRunner and moved it to CppUnit namespace. Added a deprecated typedef for compatibility. Renamed TestRunner.cpp to QtTestRunner.cpp. * include/cppunit/ui/qt/TestRunner.h: * src/qttestrunner/TestRunner.h: Moved TestRunner to CppUnit namespace and renamed it QtTestRunner. Added deprecated typedef for compatibility. * include/cppunit/Asserter.h: * src/cppunit/Asserter.cpp: changed namespace Asserter to a struct and made all methods static. * include/cppunit/extensions/HelperMacros.h: * include/cppunit/extensions/SourceLine.h: * include/cppunit/extensions/TestAssert.h: * include/cppunit/extensions/TestPlugIn.h: * include/cppunit/Portability.h: changed CPPUNIT_NS(symbol) to a symbol macro that expand either to CppUnit or nothing. The symbol is no longer a parameter. * include/cppunit/portability/CppUnitVector.h: * include/cppunit/portability/CppUnitDeque.h: * include/cppunit/portability/CppUnitMap.h: added. STL Wrapper for compilers that do not support template default argumenent and need the allocator to be passed when instantiating STL container. * examples/cppunittest/*.h: * examples/cppunittest/*.cpp: * src/msvc6/testrunner/*.h: * src/msvc6/testrunner/*.cpp: * src/msvc6/testpluginrunner/*.h: * src/msvc6/testpluginrunner/*.cpp: * src/qttestrunner/*.h: * src/qttestrunner/*.cpp: replaced occurence of CppUnit:: by CPPUNIT_NS. * src/cppunit/TestSuite.h: replaced occurence of std::vector by CppUnitVector. --- include/cppunit/portability/CppUnitDeque.h | 28 +++++++++++++++++++++++++ include/cppunit/portability/CppUnitMap.h | 32 +++++++++++++++++++++++++++++ include/cppunit/portability/CppUnitVector.h | 28 +++++++++++++++++++++++++ include/cppunit/portability/Makefile.am | 6 ++++++ 4 files changed, 94 insertions(+) create mode 100644 include/cppunit/portability/CppUnitDeque.h create mode 100644 include/cppunit/portability/CppUnitMap.h create mode 100644 include/cppunit/portability/CppUnitVector.h create mode 100644 include/cppunit/portability/Makefile.am (limited to 'include/cppunit/portability') diff --git a/include/cppunit/portability/CppUnitDeque.h b/include/cppunit/portability/CppUnitDeque.h new file mode 100644 index 0000000..781c43e --- /dev/null +++ b/include/cppunit/portability/CppUnitDeque.h @@ -0,0 +1,28 @@ +#ifndef CPPUNIT_PORTABILITY_CPPUNITDEQUE_H +#define CPPUNIT_PORTABILITY_CPPUNITDEQUE_H + +// The technic used is similar to the wrapper of STLPort. + +#include +#include + + +#if CPPUNIT_STD_NEED_ALLOCATOR + +CPPUNIT_NS_BEGIN + +template +class CppUnitDeque : public std::deque +{ +public: +}; + +CPPUNIT_NS_END + +#else // CPPUNIT_STD_NEED_ALLOCATOR + +#define CppUnitDeque std::deque + +#endif + +#endif // CPPUNIT_PORTABILITY_CPPUNITDEQUE_H \ No newline at end of file diff --git a/include/cppunit/portability/CppUnitMap.h b/include/cppunit/portability/CppUnitMap.h new file mode 100644 index 0000000..24df4a5 --- /dev/null +++ b/include/cppunit/portability/CppUnitMap.h @@ -0,0 +1,32 @@ +#ifndef CPPUNIT_PORTABILITY_CPPUNITMAP_H +#define CPPUNIT_PORTABILITY_CPPUNITMAP_H + +// The technic used is similar to the wrapper of STLPort. + +#include +#include +#include + + +#if CPPUNIT_STD_NEED_ALLOCATOR + +CPPUNIT_NS_BEGIN + +template +class CppUnitMap : public std::map + ,CPPUNIT_STD_ALLOCATOR> +{ +public: +}; + +CPPUNIT_NS_END + +#else // CPPUNIT_STD_NEED_ALLOCATOR + +#define CppUnitMap std::map + +#endif + +#endif // CPPUNIT_PORTABILITY_CPPUNITMAP_H \ No newline at end of file diff --git a/include/cppunit/portability/CppUnitVector.h b/include/cppunit/portability/CppUnitVector.h new file mode 100644 index 0000000..f3157e6 --- /dev/null +++ b/include/cppunit/portability/CppUnitVector.h @@ -0,0 +1,28 @@ +#ifndef CPPUNIT_PORTABILITY_CPPUNITVECTOR_H +#define CPPUNIT_PORTABILITY_CPPUNITVECTOR_H + +// The technic used is similar to the wrapper of STLPort. + +#include +#include + + +#if CPPUNIT_STD_NEED_ALLOCATOR + +CPPUNIT_NS_BEGIN + +template +class CppUnitVector : public std::vector +{ +public: +}; + +CPPUNIT_NS_END + +#else // CPPUNIT_STD_NEED_ALLOCATOR + +#define CppUnitVector std::vector + +#endif + +#endif // CPPUNIT_PORTABILITY_CPPUNITVECTOR_H \ No newline at end of file diff --git a/include/cppunit/portability/Makefile.am b/include/cppunit/portability/Makefile.am new file mode 100644 index 0000000..c70aaf0 --- /dev/null +++ b/include/cppunit/portability/Makefile.am @@ -0,0 +1,6 @@ +libcppunitincludedir = $(includedir)/cppunit/portability + +libcppunitinclude_HEADERS = \ + CppUnitDeque.h \ + CppUnitVector.h \ + CppUnitMap.h -- cgit v1.2.1