From 2b9f4b072bfb4129ee8eaaa86b3f068bdd2d581d Mon Sep 17 00:00:00 2001 From: Markus Mohrhard Date: Sun, 11 Dec 2016 08:44:46 +0100 Subject: remove support for old broken C++ compilers --- include/cppunit/Message.h | 8 ++---- include/cppunit/Portability.h | 14 ----------- include/cppunit/TestPath.h | 11 +++----- include/cppunit/TestResult.h | 8 ++---- include/cppunit/TestResultCollector.h | 11 +++----- include/cppunit/TestSuite.h | 6 ++--- include/cppunit/XmlOutputter.h | 8 +++--- include/cppunit/config/config-evc4.h | 4 +-- include/cppunit/config/config-msvc6.h | 4 +-- include/cppunit/extensions/TestFactoryRegistry.h | 9 ++----- .../cppunit/extensions/TestSuiteBuilderContext.h | 4 +-- include/cppunit/plugin/PlugInManager.h | 2 +- include/cppunit/plugin/PlugInParameters.h | 2 +- include/cppunit/portability/CppUnitDeque.h | 25 ------------------- include/cppunit/portability/CppUnitMap.h | 29 ---------------------- include/cppunit/portability/CppUnitSet.h | 28 --------------------- include/cppunit/portability/CppUnitStack.h | 26 ------------------- include/cppunit/portability/CppUnitVector.h | 25 ------------------- include/cppunit/portability/Makefile.am | 5 ---- include/cppunit/tools/StringTools.h | 4 +-- include/cppunit/tools/XmlElement.h | 6 ++--- include/cppunit/ui/mfc/MfcTestRunner.h | 8 +++--- include/cppunit/ui/qt/QtTestRunner.h | 4 +-- 23 files changed, 36 insertions(+), 215 deletions(-) delete mode 100644 include/cppunit/portability/CppUnitDeque.h delete mode 100644 include/cppunit/portability/CppUnitMap.h delete mode 100644 include/cppunit/portability/CppUnitSet.h delete mode 100644 include/cppunit/portability/CppUnitStack.h delete mode 100644 include/cppunit/portability/CppUnitVector.h (limited to 'include/cppunit') diff --git a/include/cppunit/Message.h b/include/cppunit/Message.h index 5b5e4ec..c3d8d92 100644 --- a/include/cppunit/Message.h +++ b/include/cppunit/Message.h @@ -8,17 +8,13 @@ #pragma warning( disable: 4251 ) // X needs to have dll-interface to be used by clients of class Z #endif -#include +#include #include CPPUNIT_NS_BEGIN -#if CPPUNIT_NEED_DLL_DECL -// template class CPPUNIT_API std::deque; -#endif - /*! \brief Message associated to an Exception. * \ingroup CreatingNewAssertions * A message is composed of two items: @@ -143,7 +139,7 @@ public: private: std::string m_shortDescription; - typedef CppUnitDeque Details; + typedef std::deque Details; Details m_details; }; diff --git a/include/cppunit/Portability.h b/include/cppunit/Portability.h index fa7df25..d7c4c11 100644 --- a/include/cppunit/Portability.h +++ b/include/cppunit/Portability.h @@ -61,20 +61,6 @@ # endif // !defined(CPPUNIT_NO_STD_NAMESPACE) #endif // !defined(CPPUNIT_HAVE_NAMESPACES) -/* Define CPPUNIT_STD_NEED_ALLOCATOR to 1 if you need to specify - * the allocator you used when instantiating STL container. Typically - * used for compilers that do not support template default parameter. - * CPPUNIT_STD_ALLOCATOR will be used as the allocator. Default is - * std::allocator. On some compilers, you may need to change this to - * std::allocator. - */ -#if CPPUNIT_STD_NEED_ALLOCATOR -# if !defined(CPPUNIT_STD_ALLOCATOR) -# define CPPUNIT_STD_ALLOCATOR std::allocator -# endif // !defined(CPPUNIT_STD_ALLOCATOR) -#endif // defined(CPPUNIT_STD_NEED_ALLOCATOR) - - // Compiler error location format for CompilerOutputter // If not define, assumes that it's gcc // See class CompilerOutputter for format. diff --git a/include/cppunit/TestPath.h b/include/cppunit/TestPath.h index c3c851c..8934479 100644 --- a/include/cppunit/TestPath.h +++ b/include/cppunit/TestPath.h @@ -8,7 +8,7 @@ #pragma warning( disable: 4251 ) // X needs to have dll-interface to be used by clients of class Z #endif -#include +#include #include CPPUNIT_NS_BEGIN @@ -16,11 +16,6 @@ CPPUNIT_NS_BEGIN class Test; -#if CPPUNIT_NEED_DLL_DECL -// template class CPPUNIT_API std::deque; -#endif - - /*! \brief A List of Test representing a path to access a Test. * \ingroup ExecutingTest * @@ -174,7 +169,7 @@ protected: void checkIndexValid( int index ) const; /// A list of test names. - typedef CppUnitDeque PathTestNames; + typedef std::deque PathTestNames; /*! \brief Splits a path string into its test name components. * \param pathAsString Path string created with toString(). @@ -199,7 +194,7 @@ protected: PathTestNames &testNames ); protected: - typedef CppUnitDeque Tests; + typedef std::deque Tests; Tests m_tests; }; diff --git a/include/cppunit/TestResult.h b/include/cppunit/TestResult.h index e7e1050..aabd80b 100644 --- a/include/cppunit/TestResult.h +++ b/include/cppunit/TestResult.h @@ -9,7 +9,7 @@ #endif #include -#include +#include #include CPPUNIT_NS_BEGIN @@ -24,10 +24,6 @@ class TestFailure; class TestListener; -#if CPPUNIT_NEED_DLL_DECL -// template class CPPUNIT_API std::deque; -#endif - /*! \brief Manages TestListener. * \ingroup TrackingTestExecution * @@ -133,7 +129,7 @@ protected: virtual void endTestRun( Test *test ); protected: - typedef CppUnitDeque TestListeners; + typedef std::deque TestListeners; TestListeners m_listeners; ProtectorChain *m_protectorChain; bool m_stop; diff --git a/include/cppunit/TestResultCollector.h b/include/cppunit/TestResultCollector.h index 01b0a54..b78c978 100644 --- a/include/cppunit/TestResultCollector.h +++ b/include/cppunit/TestResultCollector.h @@ -9,16 +9,11 @@ #endif #include -#include +#include CPPUNIT_NS_BEGIN -#if CPPUNIT_NEED_DLL_DECL -// template class CPPUNIT_API std::deque; -// template class CPPUNIT_API std::deque; -#endif - /*! \brief Collects test result. * \ingroup WritingTestResult @@ -36,8 +31,8 @@ CPPUNIT_NS_BEGIN class CPPUNIT_API TestResultCollector : public TestSuccessListener { public: - typedef CppUnitDeque TestFailures; - typedef CppUnitDeque Tests; + typedef std::deque TestFailures; + typedef std::deque Tests; /*! Constructs a TestResultCollector object. diff --git a/include/cppunit/TestSuite.h b/include/cppunit/TestSuite.h index 2b9cd8d..63c0a6b 100644 --- a/include/cppunit/TestSuite.h +++ b/include/cppunit/TestSuite.h @@ -9,7 +9,7 @@ #endif #include -#include +#include CPPUNIT_NS_BEGIN @@ -56,7 +56,7 @@ public: * TestComposite interface instead. * \return Reference on a vector that contains the tests of the suite. */ - const CppUnitVector &getTests() const; + const std::vector &getTests() const; /*! Destroys all the tests of the suite. */ @@ -67,7 +67,7 @@ public: Test *doGetChildTestAt( int index ) const; private: - CppUnitVector m_tests; + std::vector m_tests; }; diff --git a/include/cppunit/XmlOutputter.h b/include/cppunit/XmlOutputter.h index da8164a..2bf9411 100644 --- a/include/cppunit/XmlOutputter.h +++ b/include/cppunit/XmlOutputter.h @@ -9,8 +9,8 @@ #endif #include -#include -#include +#include +#include #include @@ -85,7 +85,7 @@ public: */ virtual void setStandalone( bool standalone ); - typedef CppUnitMap > FailedTests; + typedef std::map > FailedTests; /*! \brief Sets the root element and adds its children. * @@ -137,7 +137,7 @@ protected: virtual void fillFailedTestsMap( FailedTests &failedTests ); protected: - typedef CppUnitDeque Hooks; + typedef std::deque Hooks; TestResultCollector *m_result; OStream &m_stream; diff --git a/include/cppunit/config/config-evc4.h b/include/cppunit/config/config-evc4.h index ae93ff3..dd1aeec 100644 --- a/include/cppunit/config/config-evc4.h +++ b/include/cppunit/config/config-evc4.h @@ -58,9 +58,7 @@ // Uncomment to turn on STL wrapping => use this to test compilation. // This will make CppUnit subclass std::vector & co to provide default // parameter. -/*#define CPPUNIT_STD_NEED_ALLOCATOR 1 -#define CPPUNIT_STD_ALLOCATOR std::allocator -//#define CPPUNIT_NO_NAMESPACE 1 +/* #define CPPUNIT_NO_NAMESPACE 1 */ diff --git a/include/cppunit/config/config-msvc6.h b/include/cppunit/config/config-msvc6.h index 2607a46..0edc059 100644 --- a/include/cppunit/config/config-msvc6.h +++ b/include/cppunit/config/config-msvc6.h @@ -59,9 +59,7 @@ // Uncomment to turn on STL wrapping => use this to test compilation. // This will make CppUnit subclass std::vector & co to provide default // parameter. -/*#define CPPUNIT_STD_NEED_ALLOCATOR 1 -#define CPPUNIT_STD_ALLOCATOR std::allocator -//#define CPPUNIT_NO_NAMESPACE 1 +/*#define CPPUNIT_NO_NAMESPACE 1 */ #if _MSC_VER >= 1300 // VS 7.0 diff --git a/include/cppunit/extensions/TestFactoryRegistry.h b/include/cppunit/extensions/TestFactoryRegistry.h index fc8723e..9d10c94 100644 --- a/include/cppunit/extensions/TestFactoryRegistry.h +++ b/include/cppunit/extensions/TestFactoryRegistry.h @@ -8,7 +8,7 @@ #pragma warning( disable: 4251) // X needs to have dll-interface to be used by clients of class Z #endif -#include +#include #include #include @@ -17,11 +17,6 @@ CPPUNIT_NS_BEGIN class TestSuite; -#if CPPUNIT_NEED_DLL_DECL -// template class CPPUNIT_API std::set; -#endif - - /*! \brief Registry for TestFactory. * \ingroup CreatingTestSuite * @@ -165,7 +160,7 @@ private: void operator =( const TestFactoryRegistry © ); private: - typedef CppUnitSet > Factories; + typedef std::set > Factories; Factories m_factories; std::string m_name; diff --git a/include/cppunit/extensions/TestSuiteBuilderContext.h b/include/cppunit/extensions/TestSuiteBuilderContext.h index db26926..b62eeb8 100644 --- a/include/cppunit/extensions/TestSuiteBuilderContext.h +++ b/include/cppunit/extensions/TestSuiteBuilderContext.h @@ -2,7 +2,7 @@ #define CPPUNIT_HELPER_TESTSUITEBUILDERCONTEXT_H #include -#include +#include #include #if CPPUNIT_NEED_DLL_DECL @@ -81,7 +81,7 @@ protected: // shared std::map in dll bug in VC6. // See http://www.dinkumware.com/vc_fixes.html for detail. typedef std::pair Property; - typedef CppUnitVector Properties; + typedef std::vector Properties; TestSuite &m_suite; const TestNamer &m_namer; diff --git a/include/cppunit/plugin/PlugInManager.h b/include/cppunit/plugin/PlugInManager.h index 6ecedc8..c9d72d8 100644 --- a/include/cppunit/plugin/PlugInManager.h +++ b/include/cppunit/plugin/PlugInManager.h @@ -96,7 +96,7 @@ private: void operator =( const PlugInManager © ); private: - typedef CppUnitDeque PlugIns; + typedef std::deque PlugIns; PlugIns m_plugIns; }; diff --git a/include/cppunit/plugin/PlugInParameters.h b/include/cppunit/plugin/PlugInParameters.h index c67d0f1..ca08943 100644 --- a/include/cppunit/plugin/PlugInParameters.h +++ b/include/cppunit/plugin/PlugInParameters.h @@ -5,7 +5,7 @@ #if !defined(CPPUNIT_NO_TESTPLUGIN) -#include +#include #include CPPUNIT_NS_BEGIN diff --git a/include/cppunit/portability/CppUnitDeque.h b/include/cppunit/portability/CppUnitDeque.h deleted file mode 100644 index bbab21f..0000000 --- a/include/cppunit/portability/CppUnitDeque.h +++ /dev/null @@ -1,25 +0,0 @@ -#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 - -template -class CppUnitDeque : public std::deque -{ -public: -}; - -#else // CPPUNIT_STD_NEED_ALLOCATOR - -#define CppUnitDeque std::deque - -#endif - -#endif // CPPUNIT_PORTABILITY_CPPUNITDEQUE_H - diff --git a/include/cppunit/portability/CppUnitMap.h b/include/cppunit/portability/CppUnitMap.h deleted file mode 100644 index 0cdc723..0000000 --- a/include/cppunit/portability/CppUnitMap.h +++ /dev/null @@ -1,29 +0,0 @@ -#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 - -template -class CppUnitMap : public std::map - ,CPPUNIT_STD_ALLOCATOR> -{ -public: -}; - -#else // CPPUNIT_STD_NEED_ALLOCATOR - -#define CppUnitMap std::map - -#endif - -#endif // CPPUNIT_PORTABILITY_CPPUNITMAP_H - diff --git a/include/cppunit/portability/CppUnitSet.h b/include/cppunit/portability/CppUnitSet.h deleted file mode 100644 index 18b8662..0000000 --- a/include/cppunit/portability/CppUnitSet.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef CPPUNIT_PORTABILITY_CPPUNITSET_H -#define CPPUNIT_PORTABILITY_CPPUNITSET_H - -// The technic used is similar to the wrapper of STLPort. - -#include -#include -#include - - -#if CPPUNIT_STD_NEED_ALLOCATOR - -template -class CppUnitSet : public std::set - ,CPPUNIT_STD_ALLOCATOR> -{ -public: -}; - -#else // CPPUNIT_STD_NEED_ALLOCATOR - -#define CppUnitSet std::set - -#endif - -#endif // CPPUNIT_PORTABILITY_CPPUNITSET_H - diff --git a/include/cppunit/portability/CppUnitStack.h b/include/cppunit/portability/CppUnitStack.h deleted file mode 100644 index bc7785b..0000000 --- a/include/cppunit/portability/CppUnitStack.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef CPPUNIT_PORTABILITY_CPPUNITSTACK_H -#define CPPUNIT_PORTABILITY_CPPUNITSTACK_H - -// The technic used is similar to the wrapper of STLPort. - -#include -#include -#include - - -#if CPPUNIT_STD_NEED_ALLOCATOR - -template -class CppUnitStack : public std::stack > -{ -public: -}; - -#else // CPPUNIT_STD_NEED_ALLOCATOR - -#define CppUnitStack std::stack - -#endif - -#endif // CPPUNIT_PORTABILITY_CPPUNITSTACK_H \ No newline at end of file diff --git a/include/cppunit/portability/CppUnitVector.h b/include/cppunit/portability/CppUnitVector.h deleted file mode 100644 index 6666a63..0000000 --- a/include/cppunit/portability/CppUnitVector.h +++ /dev/null @@ -1,25 +0,0 @@ -#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 - -template -class CppUnitVector : public std::vector -{ -public: -}; - -#else // CPPUNIT_STD_NEED_ALLOCATOR - -#define CppUnitVector std::vector - -#endif - -#endif // CPPUNIT_PORTABILITY_CPPUNITVECTOR_H - diff --git a/include/cppunit/portability/Makefile.am b/include/cppunit/portability/Makefile.am index 8311d00..ce85cd6 100644 --- a/include/cppunit/portability/Makefile.am +++ b/include/cppunit/portability/Makefile.am @@ -1,11 +1,6 @@ libcppunitincludedir = $(includedir)/cppunit/portability libcppunitinclude_HEADERS = \ - CppUnitDeque.h \ - CppUnitMap.h \ - CppUnitSet.h \ - CppUnitStack.h \ - CppUnitVector.h \ FloatingPoint.h \ Stream.h \ SmartPtr.h diff --git a/include/cppunit/tools/StringTools.h b/include/cppunit/tools/StringTools.h index 7a6b6d7..d08c6e0 100644 --- a/include/cppunit/tools/StringTools.h +++ b/include/cppunit/tools/StringTools.h @@ -3,7 +3,7 @@ #include #include -#include +#include CPPUNIT_NS_BEGIN @@ -14,7 +14,7 @@ CPPUNIT_NS_BEGIN struct StringTools { - typedef CppUnitVector Strings; + typedef std::vector Strings; static std::string CPPUNIT_API toString( int value ); diff --git a/include/cppunit/tools/XmlElement.h b/include/cppunit/tools/XmlElement.h index 0b36bd2..70e21f8 100644 --- a/include/cppunit/tools/XmlElement.h +++ b/include/cppunit/tools/XmlElement.h @@ -8,7 +8,7 @@ #pragma warning( disable: 4251 ) // X needs to have dll-interface to be used by clients of class Z #endif -#include +#include #include @@ -131,10 +131,10 @@ private: std::string m_name; std::string m_content; - typedef CppUnitDeque Attributes; + typedef std::deque Attributes; Attributes m_attributes; - typedef CppUnitDeque Elements; + typedef std::deque Elements; Elements m_elements; }; diff --git a/include/cppunit/ui/mfc/MfcTestRunner.h b/include/cppunit/ui/mfc/MfcTestRunner.h index 6a5f7b7..b2a7ed7 100644 --- a/include/cppunit/ui/mfc/MfcTestRunner.h +++ b/include/cppunit/ui/mfc/MfcTestRunner.h @@ -6,7 +6,7 @@ #endif // _MSC_VER >= 1000 #include -#include +#include /* Refer to MSDN documentation to know how to write and use MFC extension DLL: mk:@MSITStore:h:\DevStudio\MSDN\98VSa\1036\vcmfc.chm::/html/_mfcnotes_tn033.htm#_mfcnotes_how_to_write_an_mfc_extension_dll @@ -59,18 +59,18 @@ public: void addTest( Test *test ); - void addTests( const CppUnitVector &tests ); + void addTests( const std::vector &tests ); protected: Test *getRootTest(); TestSuite *m_suite; - typedef CppUnitVector Tests; + typedef std::vector Tests; Tests m_tests; }; CPPUNIT_NS_END -#endif // CPPUNITUI_MFC_MFCTESTRUNNER_H \ No newline at end of file +#endif // CPPUNITUI_MFC_MFCTESTRUNNER_H diff --git a/include/cppunit/ui/qt/QtTestRunner.h b/include/cppunit/ui/qt/QtTestRunner.h index 4b6ab4e..3ae602f 100644 --- a/include/cppunit/ui/qt/QtTestRunner.h +++ b/include/cppunit/ui/qt/QtTestRunner.h @@ -6,7 +6,7 @@ #ifndef CPPUNIT_QTUI_QTTESTRUNNER_H #define CPPUNIT_QTUI_QTTESTRUNNER_H -#include +#include #include "Config.h" CPPUNIT_NS_BEGIN @@ -62,7 +62,7 @@ private: Test *getRootTest(); private: - typedef CppUnitVector Tests; + typedef std::vector Tests; Tests *_tests; TestSuite *_suite; -- cgit v1.2.1