[Mockpp-commits] mockpp/3party/cxxtest/cxxtest Flags.h,1.2,1.3 Makefile.am,1.3,1.4 StdHeaders.h,1.1,
Brought to you by:
ewald-arnold
From: Ewald A. <ewa...@us...> - 2005-12-18 16:56:42
|
Update of /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27352/3party/cxxtest/cxxtest Modified Files: Flags.h Makefile.am StdHeaders.h StdValueTraits.h Log Message: integration cxxtest + ministl Index: Flags.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/Flags.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Flags.h 17 Dec 2005 18:38:44 -0000 1.2 +++ Flags.h 18 Dec 2005 16:56:22 -0000 1.3 @@ -5,12 +5,72 @@ // These are the flags that control CxxTest // +#ifdef _MSC_VER +# include <mockpp/mockpp_config-msvc_71.h> + +#elif defined(__BORLANDC__) +# include <mockpp/mockpp_config-bcb5.h> + +#elif defined(__CYGWIN__) +# ifdef HAVE_CONFIG_H +# include <config.h> +# else +# include <mockpp/mockpp_config.h> +# endif + +#else +# ifdef HAVE_CONFIG_H +# include <config.h> +# else +# include <mockpp/mockpp_config.h> +# endif +#endif + +////////////////////////////////////////////////// +// + +#ifdef CXXTEST_USE_MINI_STL + +#define CXXTEST_STRING_H <ministl/string> +#define CXXTEST_VECTOR_H <ministl/vector> +#define CXXTEST_MAP_H <ministl/map> +#define CXXTEST_SET_H <ministl/set> +#define CXXTEST_LIST_H <ministl/list> +#define CXXTEST_ALGORITHM_H <ministl/algorithm> +#define CXXTEST_FUNCTION_H <ministl/function> + +// namespace ministl +#define CXXTEST_STL ministl +#define CXXTEST_ALTERNATIVE_STL + +#else + +#define CXXTEST_STRING_H <string> +#define CXXTEST_VECTOR_H <vector> +#define CXXTEST_MAP_H <map> +#define CXXTEST_SET_H <set> +#define CXXTEST_LIST_H <list> +#define CXXTEST_FUNCTION_H <function> +#define CXXTEST_ALGORITHM_H <algorithm> + +// namespace std +#define CXXTEST_STL std +#undef CXXTEST_ALTERNATIVE_STL + +#endif + +////////////////////////////////////////////////// +// + #ifdef __WIN32__ #define CXXTEST_EXPORT __declspec(dllexport) #else -#define CXXTEST_EXPORT +#define CXXTEST_EXPORT #endif +////////////////////////////////////////////////// +// + #if !defined(CXXTEST_FLAGS) # define CXXTEST_FLAGS #endif // !CXXTEST_FLAGS @@ -28,7 +88,10 @@ #endif // CXXTEST_OLD_TEMPLATE_SYNTAX #if defined(CXXTEST_OLD_STD) && !defined(_CXXTEST_OLD_STD) -# define _CXXTEST_OLD_STD +# define _CXXTEST_OLD_STD +# ifdef CXXTEST_USE_MINI_STL +# error ministl namespace always need to avoid abiguity with default STL +# endif #endif // CXXTEST_OLD_STD #if defined(CXXTEST_ABORT_TEST_ON_FAIL) && !defined(_CXXTEST_ABORT_TEST_ON_FAIL) @@ -71,6 +134,9 @@ # undef _CXXTEST_ABORT_TEST_ON_FAIL #endif // _CXXTEST_ABORT_TEST_ON_FAIL && !_CXXTEST_HAVE_EH +////////////////////////////////////////////////// +// + // // Some minimal per-compiler configuration to allow us to compile // @@ -94,6 +160,9 @@ # endif #endif // __BORLANDC__ +////////////////////////////////////////////////// +// + #ifdef _MSC_VER // Visual C++ # ifndef _CXXTEST_LONGLONG # define _CXXTEST_LONGLONG __int64 @@ -110,6 +179,9 @@ # pragma warning( disable : 4514 ) #endif // _MSC_VER +////////////////////////////////////////////////// +// + #ifdef __GNUC__ # if (__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 9) # ifndef _CXXTEST_PARTIAL_TEMPLATE_SPECIALIZATION @@ -118,6 +190,9 @@ # endif #endif // __GNUC__ +////////////////////////////////////////////////// +// + #ifdef __DMC__ // Digital Mars # ifndef _CXXTEST_OLD_STD # define _CXXTEST_OLD_STD Index: Makefile.am =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/Makefile.am,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Makefile.am 10 Dec 2005 20:07:21 -0000 1.3 +++ Makefile.am 18 Dec 2005 16:56:22 -0000 1.4 @@ -6,7 +6,7 @@ libmockpp_cxxtest_la_LDFLAGS = -no-undefined -version-info \ $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) -libmockpp_cxxtestincludedir = $(includedir)/mockpp/cxxtest +libmockpp_cxxtestincludedir = $(includedir)/mockpp/3party/cxxtest libmockpp_cxxtest_la_SOURCES = \ Descriptions.cpp \ Index: StdHeaders.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/StdHeaders.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- StdHeaders.h 9 Dec 2005 15:57:51 -0000 1.1 +++ StdHeaders.h 18 Dec 2005 16:56:22 -0000 1.2 @@ -6,17 +6,21 @@ // It exists to support warning level 4 in Visual C++ // +#include <cxxtest/Flags.h> + #ifdef _MSC_VER # pragma warning( push, 1 ) #endif // _MSC_VER #include <complex> -#include <deque> -#include <list> -#include <map> -#include <set> -#include <string> -#include <vector> + +#include CXXTEST_STRING_H +#include CXXTEST_VECTOR_H +#include CXXTEST_MAP_H +#include CXXTEST_SET_H +#include CXXTEST_LIST_H +// #include CXXTEST_ALGORITHM_H +// #include CXXTEST_FUNCTION_H #ifdef _MSC_VER # pragma warning( pop ) Index: StdValueTraits.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/StdValueTraits.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- StdValueTraits.h 10 Dec 2005 15:13:16 -0000 1.2 +++ StdValueTraits.h 18 Dec 2005 16:56:22 -0000 1.3 @@ -33,21 +33,21 @@ class StdTraitsBase { public: - StdTraitsBase &operator<<( const CXXTEST_STD(string) &s ) { _s += s; return *this; } + StdTraitsBase &operator<<( const CXXTEST_STL::string &s ) { _s += s; return *this; } const char *asString() const { return _s.c_str(); } private: - CXXTEST_STD(string) _s; + CXXTEST_STL::string _s; }; // // std::string // CXXTEST_TEMPLATE_INSTANTIATION - class ValueTraits<const CXXTEST_STD(string)> : public StdTraitsBase + class ValueTraits<const CXXTEST_STL::string> : public StdTraitsBase { public: - ValueTraits( const CXXTEST_STD(string) &s ) + ValueTraits( const CXXTEST_STL::string &s ) { *this << "\""; for ( unsigned i = 0; i < s.length(); ++ i ) { @@ -59,17 +59,17 @@ } }; - CXXTEST_COPY_CONST_TRAITS( CXXTEST_STD(string) ); + CXXTEST_COPY_CONST_TRAITS( CXXTEST_STL::string); #ifndef _CXXTEST_OLD_STD // // std::wstring // CXXTEST_TEMPLATE_INSTANTIATION - class ValueTraits<const CXXTEST_STD(basic_string<wchar_t>)> : public StdTraitsBase + class ValueTraits<const CXXTEST_STL::basic_string<wchar_t> > : public StdTraitsBase { public: - ValueTraits( const CXXTEST_STD(basic_string<wchar_t>) &s ) + ValueTraits( const CXXTEST_STL::basic_string<wchar_t> &s ) { *this << "L\""; for ( unsigned i = 0; i < s.length(); ++ i ) { @@ -81,7 +81,7 @@ } }; - CXXTEST_COPY_CONST_TRAITS( CXXTEST_STD(basic_string<wchar_t>) ); + CXXTEST_COPY_CONST_TRAITS( CXXTEST_STL::basic_string<wchar_t> ); #endif // _CXXTEST_OLD_STD // @@ -104,10 +104,10 @@ // std::pair // template<class First, class Second> - class ValueTraits< CXXTEST_STD(pair)<First, Second> > : public StdTraitsBase + class ValueTraits< CXXTEST_STL::pair<First, Second> > : public StdTraitsBase { public: - ValueTraits( const CXXTEST_STD(pair)<First, Second> &p ) + ValueTraits( const CXXTEST_STL::pair<First, Second> &p ) { *this << "<" << TS_AS_STRING( p.first ) << ", " << TS_AS_STRING( p.second ) << ">"; } @@ -117,10 +117,10 @@ // std::vector // template<class Element> - class ValueTraits< CXXTEST_STD(vector)<Element> > : public StdTraitsBase + class ValueTraits< CXXTEST_STL::vector<Element> > : public StdTraitsBase { public: - ValueTraits( const CXXTEST_STD(vector)<Element> &v ) + ValueTraits( const CXXTEST_STL::vector<Element> &v ) { dumpRange( *this, v.begin(), v.end() ); } @@ -130,10 +130,10 @@ // std::list // template<class Element> - class ValueTraits< CXXTEST_STD(list)<Element> > : public StdTraitsBase + class ValueTraits< CXXTEST_STL::list<Element> > : public StdTraitsBase { public: - ValueTraits( const CXXTEST_STD(list)<Element> &l ) + ValueTraits( const CXXTEST_STL::list<Element> &l ) { dumpRange( *this, l.begin(), l.end() ); } @@ -143,10 +143,10 @@ // std::set // template<class Element> - class ValueTraits< CXXTEST_STD(set)<Element> > : public StdTraitsBase + class ValueTraits< CXXTEST_STL::set<Element> > : public StdTraitsBase { public: - ValueTraits( const CXXTEST_STD(set)<Element> &s ) + ValueTraits( const CXXTEST_STL::set<Element> &s ) { dumpRange( *this, s.begin(), s.end() ); } @@ -156,49 +156,53 @@ // std::map // template<class Key, class Value> - class ValueTraits< CXXTEST_STD(map)<Key, Value> > : public StdTraitsBase + class ValueTraits< CXXTEST_STL::map<Key, Value> > : public StdTraitsBase { public: - ValueTraits( const CXXTEST_STD(map)<Key, Value> &m ) + ValueTraits( const CXXTEST_STL::map<Key, Value> &m ) { dumpRange( *this, m.begin(), m.end() ); } }; +#ifndef CXXTEST_USE_MINI_STL // // std::deque // template<class Element> - class ValueTraits< CXXTEST_STD(deque)<Element> > : public StdTraitsBase + class ValueTraits< CXXTEST_STL::deque<Element> > : public StdTraitsBase { public: - ValueTraits( const CXXTEST_STD(deque)<Element> &d ) + ValueTraits( const CXXTEST_STL::deque<Element> &d ) { dumpRange( *this, d.begin(), d.end() ); } }; +#endif +#ifndef CXXTEST_USE_MINI_STL // // std::multiset // template<class Element> - class ValueTraits< CXXTEST_STD(multiset)<Element> > : public StdTraitsBase + class ValueTraits< CXXTEST_STL::multiset<Element> > : public StdTraitsBase { public: - ValueTraits( const CXXTEST_STD(multiset)<Element> &ms ) + ValueTraits( const CXXTEST_STL::multiset<Element> &ms ) { dumpRange( *this, ms.begin(), ms.end() ); } }; +#endif // // std::multimap // template<class Key, class Value> - class ValueTraits< CXXTEST_STD(multimap)<Key, Value> > : public StdTraitsBase + class ValueTraits< CXXTEST_STL::multimap<Key, Value> > : public StdTraitsBase { public: - ValueTraits( const CXXTEST_STD(multimap)<Key, Value> &mm ) + ValueTraits( const CXXTEST_STL::multimap<Key, Value> &mm ) { dumpRange( *this, mm.begin(), mm.end() ); } |