summaryrefslogtreecommitdiff
path: root/include/cppunit
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-12-11 08:44:46 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-12-11 09:09:46 +0100
commit2b9f4b072bfb4129ee8eaaa86b3f068bdd2d581d (patch)
tree743ecbb456327ad21d7899eb93c06eb75d890956 /include/cppunit
parente8c0def96e6ca4370377747bda1d8a8c0dab4867 (diff)
downloadcppunit-2b9f4b072bfb4129ee8eaaa86b3f068bdd2d581d.tar.gz
remove support for old broken C++ compilers
Diffstat (limited to 'include/cppunit')
-rw-r--r--include/cppunit/Message.h8
-rw-r--r--include/cppunit/Portability.h14
-rw-r--r--include/cppunit/TestPath.h11
-rw-r--r--include/cppunit/TestResult.h8
-rw-r--r--include/cppunit/TestResultCollector.h11
-rw-r--r--include/cppunit/TestSuite.h6
-rw-r--r--include/cppunit/XmlOutputter.h8
-rw-r--r--include/cppunit/config/config-evc4.h4
-rw-r--r--include/cppunit/config/config-msvc6.h4
-rw-r--r--include/cppunit/extensions/TestFactoryRegistry.h9
-rw-r--r--include/cppunit/extensions/TestSuiteBuilderContext.h4
-rw-r--r--include/cppunit/plugin/PlugInManager.h2
-rw-r--r--include/cppunit/plugin/PlugInParameters.h2
-rw-r--r--include/cppunit/portability/CppUnitDeque.h25
-rw-r--r--include/cppunit/portability/CppUnitMap.h29
-rw-r--r--include/cppunit/portability/CppUnitSet.h28
-rw-r--r--include/cppunit/portability/CppUnitStack.h26
-rw-r--r--include/cppunit/portability/CppUnitVector.h25
-rw-r--r--include/cppunit/portability/Makefile.am5
-rw-r--r--include/cppunit/tools/StringTools.h4
-rw-r--r--include/cppunit/tools/XmlElement.h6
-rw-r--r--include/cppunit/ui/mfc/MfcTestRunner.h8
-rw-r--r--include/cppunit/ui/qt/QtTestRunner.h4
23 files changed, 36 insertions, 215 deletions
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 <cppunit/portability/CppUnitDeque.h>
+#include <deque>
#include <string>
CPPUNIT_NS_BEGIN
-#if CPPUNIT_NEED_DLL_DECL
-// template class CPPUNIT_API std::deque<std::string>;
-#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<std::string> Details;
+ typedef std::deque<std::string> 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<T>.
- */
-#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 <cppunit/portability/CppUnitDeque.h>
+#include <deque>
#include <string>
CPPUNIT_NS_BEGIN
@@ -16,11 +16,6 @@ CPPUNIT_NS_BEGIN
class Test;
-#if CPPUNIT_NEED_DLL_DECL
-// template class CPPUNIT_API std::deque<Test *>;
-#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<std::string> PathTestNames;
+ typedef std::deque<std::string> 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<Test *> Tests;
+ typedef std::deque<Test *> 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 <cppunit/SynchronizedObject.h>
-#include <cppunit/portability/CppUnitDeque.h>
+#include <deque>
#include <string>
CPPUNIT_NS_BEGIN
@@ -24,10 +24,6 @@ class TestFailure;
class TestListener;
-#if CPPUNIT_NEED_DLL_DECL
-// template class CPPUNIT_API std::deque<TestListener *>;
-#endif
-
/*! \brief Manages TestListener.
* \ingroup TrackingTestExecution
*
@@ -133,7 +129,7 @@ protected:
virtual void endTestRun( Test *test );
protected:
- typedef CppUnitDeque<TestListener *> TestListeners;
+ typedef std::deque<TestListener *> 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 <cppunit/TestSuccessListener.h>
-#include <cppunit/portability/CppUnitDeque.h>
+#include <deque>
CPPUNIT_NS_BEGIN
-#if CPPUNIT_NEED_DLL_DECL
-// template class CPPUNIT_API std::deque<TestFailure *>;
-// template class CPPUNIT_API std::deque<Test *>;
-#endif
-
/*! \brief Collects test result.
* \ingroup WritingTestResult
@@ -36,8 +31,8 @@ CPPUNIT_NS_BEGIN
class CPPUNIT_API TestResultCollector : public TestSuccessListener
{
public:
- typedef CppUnitDeque<TestFailure *> TestFailures;
- typedef CppUnitDeque<Test *> Tests;
+ typedef std::deque<TestFailure *> TestFailures;
+ typedef std::deque<Test *> 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 <cppunit/TestComposite.h>
-#include <cppunit/portability/CppUnitVector.h>
+#include <vector>
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<Test *> &getTests() const;
+ const std::vector<Test *> &getTests() const;
/*! Destroys all the tests of the suite.
*/
@@ -67,7 +67,7 @@ public:
Test *doGetChildTestAt( int index ) const;
private:
- CppUnitVector<Test *> m_tests;
+ std::vector<Test *> 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 <cppunit/Outputter.h>
-#include <cppunit/portability/CppUnitDeque.h>
-#include <cppunit/portability/CppUnitMap.h>
+#include <deque>
+#include <map>
#include <cppunit/portability/Stream.h>
@@ -85,7 +85,7 @@ public:
*/
virtual void setStandalone( bool standalone );
- typedef CppUnitMap<Test *,TestFailure*, std::less<Test*> > FailedTests;
+ typedef std::map<Test *,TestFailure*, std::less<Test*> > FailedTests;
/*! \brief Sets the root element and adds its children.
*
@@ -137,7 +137,7 @@ protected:
virtual void fillFailedTestsMap( FailedTests &failedTests );
protected:
- typedef CppUnitDeque<XmlOutputterHook *> Hooks;
+ typedef std::deque<XmlOutputterHook *> 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<T>
-//#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<T>
-//#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 <cppunit/portability/CppUnitSet.h>
+#include <set>
#include <cppunit/extensions/TestFactory.h>
#include <string>
@@ -17,11 +17,6 @@ CPPUNIT_NS_BEGIN
class TestSuite;
-#if CPPUNIT_NEED_DLL_DECL
-// template class CPPUNIT_API std::set<TestFactory *>;
-#endif
-
-
/*! \brief Registry for TestFactory.
* \ingroup CreatingTestSuite
*
@@ -165,7 +160,7 @@ private:
void operator =( const TestFactoryRegistry &copy );
private:
- typedef CppUnitSet<TestFactory *, std::less<TestFactory*> > Factories;
+ typedef std::set<TestFactory *, std::less<TestFactory*> > 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 <cppunit/Portability.h>
-#include <cppunit/portability/CppUnitMap.h>
+#include <map>
#include <string>
#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<std::string,std::string> Property;
- typedef CppUnitVector<Property> Properties;
+ typedef std::vector<Property> 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 &copy );
private:
- typedef CppUnitDeque<PlugInInfo> PlugIns;
+ typedef std::deque<PlugInInfo> 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 <cppunit/portability/CppUnitDeque.h>
+#include <deque>
#include <string>
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 <cppunit/Portability.h>
-#include <deque>
-
-
-#if CPPUNIT_STD_NEED_ALLOCATOR
-
-template<class T>
-class CppUnitDeque : public std::deque<T,CPPUNIT_STD_ALLOCATOR>
-{
-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 <cppunit/Portability.h>
-#include <functional>
-#include <map>
-
-
-#if CPPUNIT_STD_NEED_ALLOCATOR
-
-template<class Key, class T>
-class CppUnitMap : public std::map<Key
- ,T
- ,std::less<Key>
- ,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 <cppunit/Portability.h>
-#include <functional>
-#include <set>
-
-
-#if CPPUNIT_STD_NEED_ALLOCATOR
-
-template<class T>
-class CppUnitSet : public std::set<T
- ,std::less<T>
- ,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 <cppunit/Portability.h>
-#include <deque>
-#include <stack>
-
-
-#if CPPUNIT_STD_NEED_ALLOCATOR
-
-template<class T>
-class CppUnitStack : public std::stack<T
- ,std::deque<T,CPPUNIT_STD_ALLOCATOR> >
-{
-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 <cppunit/Portability.h>
-#include <vector>
-
-
-#if CPPUNIT_STD_NEED_ALLOCATOR
-
-template<class T>
-class CppUnitVector : public std::vector<T,CPPUNIT_STD_ALLOCATOR>
-{
-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 <cppunit/Portability.h>
#include <string>
-#include <cppunit/portability/CppUnitVector.h>
+#include <vector>
CPPUNIT_NS_BEGIN
@@ -14,7 +14,7 @@ CPPUNIT_NS_BEGIN
struct StringTools
{
- typedef CppUnitVector<std::string> Strings;
+ typedef std::vector<std::string> 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 <cppunit/portability/CppUnitDeque.h>
+#include <deque>
#include <string>
@@ -131,10 +131,10 @@ private:
std::string m_name;
std::string m_content;
- typedef CppUnitDeque<Attribute> Attributes;
+ typedef std::deque<Attribute> Attributes;
Attributes m_attributes;
- typedef CppUnitDeque<XmlElement *> Elements;
+ typedef std::deque<XmlElement *> 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 <cppunit/Portability.h>
-#include <cppunit/portability/CppUnitVector.h>
+#include <vector>
/* 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<Test *> &tests );
+ void addTests( const std::vector<Test *> &tests );
protected:
Test *getRootTest();
TestSuite *m_suite;
- typedef CppUnitVector<Test *> Tests;
+ typedef std::vector<Test *> 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 <cppunit/portability/CppUnitVector.h>
+#include <vector>
#include "Config.h"
CPPUNIT_NS_BEGIN
@@ -62,7 +62,7 @@ private:
Test *getRootTest();
private:
- typedef CppUnitVector<Test *> Tests;
+ typedef std::vector<Test *> Tests;
Tests *_tests;
TestSuite *_suite;