[Mockpp-commits] mockpp/mockpp/compat Asserter.cpp,1.3,1.4 Exception.cpp,1.15,1.16 Exception.h,1.20,
Brought to you by:
ewald-arnold
From: Ewald A. <ewa...@us...> - 2006-04-05 17:04:42
|
Update of /cvsroot/mockpp/mockpp/mockpp/compat In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19970/mockpp/compat Modified Files: Asserter.cpp Exception.cpp Exception.h Formatter.cpp Formatter.h Log Message: more namespace disabling Index: Exception.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/compat/Exception.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- Exception.cpp 15 Mar 2006 21:34:02 -0000 1.15 +++ Exception.cpp 5 Apr 2006 17:03:38 -0000 1.16 @@ -38,7 +38,7 @@ MOCKPP_EXPORT Exception::Exception(unsigned line, const char *file, const String &msg) : #ifdef MOCKPP_USE_STD_EXCEPTION - std::exception(), + MOCKPP_STD_NS::exception(), #endif message(msg), srcline(line), Index: Formatter.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/compat/Formatter.h,v retrieving revision 1.40 retrieving revision 1.41 diff -u -d -r1.40 -r1.41 --- Formatter.h 15 Mar 2006 21:34:02 -0000 1.40 +++ Formatter.h 5 Apr 2006 17:03:38 -0000 1.41 @@ -342,16 +342,20 @@ template <class T> MOCKPP_NS::String ostreamed(const T& t) { - std::basic_ostringstream<char> oss; + MOCKPP_STD_NS::basic_ostringstream<char> oss; oss << t; #ifdef MOCKPP_UNICODE +# ifdef MOCKPP_ALTERNATIVE_STL + return MOCKPP_NS::getUnicode(oss.str().c_str()); +# else return MOCKPP_NS::getUnicode(oss.str()); +# endif #else -#ifdef MOCKPP_ALTERNATIVE_STL +# ifdef MOCKPP_ALTERNATIVE_STL return oss.str().c_str(); -#else +# else return oss.str(); -#endif +# endif #endif } @@ -375,7 +379,7 @@ template <class T> MOCKPP_NS::String owstreamed(const T& t) { - std::basic_ostringstream<wchar_t> oss; + MOCKPP_STD_NS::basic_ostringstream<wchar_t> oss; oss << t; #ifndef MOCKPP_ALTERNATIVE_STL return oss.str(); Index: Asserter.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/compat/Asserter.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Asserter.cpp 15 Mar 2006 21:34:02 -0000 1.3 +++ Asserter.cpp 5 Apr 2006 17:03:37 -0000 1.4 @@ -126,7 +126,7 @@ #if defined(_MSC_VER) if (strcmp(expected, actual) != 0) #else - if (std::strcmp(expected, actual) != 0) + if (MOCKPP_STD_NS::strcmp(expected, actual) != 0) #endif fail(srcline, srcfile, message); } @@ -149,7 +149,7 @@ #if !defined(HAVE_STD_WCSCMP) if (wcscmp(expected, actual) != 0) #else - if (std::wcscmp(expected, actual) != 0) + if (MOCKPP_STD_NS::wcscmp(expected, actual) != 0) #endif fail(srcline, srcfile, message); } @@ -165,7 +165,7 @@ // the following test fails #ifdef HAVE_LIMITS - if (expected == std::numeric_limits<double>::infinity()) + if (expected == MOCKPP_STD_NS::numeric_limits<double>::infinity()) { if (!(expected == actual)) fail(srcline, srcfile, message); @@ -175,7 +175,7 @@ #if defined(_MSC_VER) if (!(fabs(expected-actual) <= fabs(delta))) // Because comparison with NaN always returns false #else - if (!(std::fabs(expected-actual) <= std::fabs(delta))) // Because comparison with NaN always returns false + if (!(MOCKPP_STD_NS::fabs(expected-actual) <= MOCKPP_STD_NS::fabs(delta))) // Because comparison with NaN always returns false #endif fail(srcline, srcfile, message); } @@ -195,7 +195,7 @@ // the following test fails #ifdef HAVE_LIMITS - if (expected == std::numeric_limits<float>::infinity()) + if (expected == MOCKPP_STD_NS::numeric_limits<float>::infinity()) { if (!(expected == actual)) fail(srcline, srcfile, message); @@ -206,7 +206,7 @@ #if defined(_MSC_VER) if (!(fabs(expected-actual) <= fabs(delta))) #else - if (!(std::fabs(expected-actual) <= std::fabs(delta))) + if (!(MOCKPP_STD_NS::fabs(expected-actual) <= MOCKPP_STD_NS::fabs(delta))) #endif fail(srcline, srcfile, message); } Index: Exception.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/compat/Exception.h,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- Exception.h 15 Mar 2006 21:34:02 -0000 1.20 +++ Exception.h 5 Apr 2006 17:03:38 -0000 1.21 @@ -44,7 +44,7 @@ */ class Exception #ifdef MOCKPP_USE_STD_EXCEPTION - : public std::exception + : public MOCKPP_STD_NS::exception #endif { public: Index: Formatter.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/compat/Formatter.cpp,v retrieving revision 1.50 retrieving revision 1.51 diff -u -d -r1.50 -r1.51 --- Formatter.cpp 15 Mar 2006 21:34:02 -0000 1.50 +++ Formatter.cpp 5 Apr 2006 17:03:38 -0000 1.51 @@ -65,7 +65,7 @@ { neg = true; #ifdef HAVE_LIMITS - if ( n == std::numeric_limits<T>::min() ) + if ( n == MOCKPP_STD_NS::numeric_limits<T>::min() ) #else if ( n == INT_MIN ) #endif @@ -187,7 +187,7 @@ #if defined HAVE_SPRINTF_S sprintf_s( buf, format, n ); #else - std::sprintf( buf, format, n ); + MOCKPP_STD_NS::sprintf( buf, format, n ); #endif #ifdef MOCKPP_UNICODE @@ -250,7 +250,7 @@ #if (defined (_MSC_VER) && (_MSC_VER <= 1300)) || (defined (__GNUC__) && (__GNUC__ < 3)) if (!isalnum(x)) #else - if (!std::isalnum(x)) + if (!MOCKPP_STD_NS::isalnum(x)) #endif { text += MOCKPP_PCHAR("0x") + number((unsigned long)x, 16); |