mockpp-commits Mailing List for Mock Objects for C++ (Page 3)
Brought to you by:
ewald-arnold
You can subscribe to this list here.
2005 |
Jan
|
Feb
(17) |
Mar
(178) |
Apr
(119) |
May
(60) |
Jun
(3) |
Jul
(60) |
Aug
(16) |
Sep
(55) |
Oct
(156) |
Nov
(136) |
Dec
(255) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(98) |
Feb
(8) |
Mar
(57) |
Apr
(43) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Ewald A. <ewa...@us...> - 2006-03-19 16:26:54
|
Update of /cvsroot/mockpp/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv549 Modified Files: configure.in run-configure-unicode.sh Log Message: cleanup namespace disabling Index: run-configure-unicode.sh =================================================================== RCS file: /cvsroot/mockpp/mockpp/run-configure-unicode.sh,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- run-configure-unicode.sh 19 Mar 2006 11:09:36 -0000 1.19 +++ run-configure-unicode.sh 19 Mar 2006 16:26:49 -0000 1.20 @@ -17,8 +17,8 @@ #OPTS="--enable-doxygen --enable-docbook" #OPTS="$OPTS --enable-builtin-stl" # --disable-exceptions --disable-rtti OPTS="$OPTS --enable-debug=full" -#OPTS="$OPTS --disable-namespace" -OPTS="$OPTS --disable-builtin-cxxtest --enable-cppunit" +OPTS="$OPTS --disable-namespace" +#OPTS="$OPTS --disable-builtin-cxxtest --enable-cppunit" #OPTS="$OPTS --disable-builtin-cxxtest --enable-boosttest" CFLAGS="$MYFLAGS" CXXFLAGS="$MYFLAGS" CXX=$MYCC CC=$MYCC ${0%/*}/configure --enable-unicode $OPTS --prefix=/tmp/mockpp-install Index: configure.in =================================================================== RCS file: /cvsroot/mockpp/mockpp/configure.in,v retrieving revision 1.115 retrieving revision 1.116 diff -u -d -r1.115 -r1.116 --- configure.in 19 Mar 2006 11:09:36 -0000 1.115 +++ configure.in 19 Mar 2006 16:26:49 -0000 1.116 @@ -310,24 +310,26 @@ AC_DEFUN([EA_DISABLE_NAMESPACE], [ -AC_ARG_ENABLE(disable_namespace, [ --disable-namespace do NOT use namespaces (no)], [disable_namespace=yes]) +AC_ARG_ENABLE(namespace, [ --disable-namespace do NOT use namespaces (no)], [disable_namespace=yes]) -if test x$disable_namespace = xyes; then - echo "*******************************************************" - echo "** NOT using namespaces" - echo "*******************************************************" - AC_DEFINE(MOCKPP_NO_TYPENAME_FOR_STL_NS, 1, [restricted use of "typedef typename".]) - AC_DEFINE(MOCKPP_NO_NAMESPACE, 1, [Define if you don't use mockpp namespace.]) - AC_DEFINE(MINISTL_NO_NAMESPACE, 1, [Define if you don't use ministl namespace.]) - AC_DEFINE(CXXTEST_NO_NAMESPACE, 1, [Define if you don't use CxxTest namespace.]) -else +if test x$disable_namespace != xyes; then echo "*******************************************************" echo "** normally using namespaces" echo "*******************************************************" + AH_TEMPLATE([MOCKPP_NO_STD_NUMERICLIMITS], [Define if std::numeric_limits is not working.]) AH_TEMPLATE([MOCKPP_NO_TYPENAME_FOR_STL_NS], [restricted use of "typedef typename".]) - AH_TEMPLATE([MOCKPP_NO_NAMESPACE], [Define if you don't use mockpp namespace.]) + AH_TEMPLATE([MOCKPP_NO_NAMESPACE], [Define if you don't use mockpp namespace.]) AH_TEMPLATE([MINISTL_NO_NAMESPACE], [Define if you don't use ministl namespace.]) AH_TEMPLATE([CXXTEST_NO_NAMESPACE], [Define if you don't use CxxTest namespace.]) +else + echo "*******************************************************" + echo "** NOT using namespaces" + echo "*******************************************************" + AC_DEFINE(MOCKPP_NO_STD_NUMERICLIMITS, 1, [Define if std::numeric_limits is not working.]) + AC_DEFINE(MOCKPP_NO_TYPENAME_FOR_STL_NS, 1, [restricted use of "typedef typename".]) + AC_DEFINE(MOCKPP_NO_NAMESPACE, 1, [Define if you don't use mockpp namespace.]) + AC_DEFINE(MINISTL_NO_NAMESPACE, 1, [Define if you don't use ministl namespace.]) + AC_DEFINE(CXXTEST_NO_NAMESPACE, 1, [Define if you don't use CxxTest namespace.]) fi ]) AM_CONDITIONAL(DISABLE_NAMESPACE, test x$disable_namespace != xyes) @@ -443,6 +445,36 @@ # ---------------------------------------------------------------------------- +AC_DEFUN([EA_CHECK_STD_NS], +[ + +AC_MSG_CHECKING([for std namespace]) +AC_LANG_SAVE +AC_LANG_CPLUSPLUS + +cat > conftest.$ac_ext <<EOF +#include <string.h> +int main() +{ + using namespace std; + return 0; +} +EOF + +ac_compile_link='${CXX} $CXXFLAGS $all_includes $all_libraries $CPPFLAGS conftest.$ac_ext' +if AC_TRY_EVAL(ac_compile_link); then + AC_MSG_RESULT(yes) +else + AC_DEFINE(MOCKPP_NO_STD_NS, 1, [Define if the std namespace is missing.]) + AC_MSG_RESULT(no) +fi + +AC_SUBST(MOCKPP_NO_STD_NS) +AC_LANG_RESTORE +]) + +# ---------------------------------------------------------------------------- + AC_CXX_RTTI EA_DISABLE_EXCEPTIONS @@ -459,6 +491,7 @@ EA_CHECK_WCSCMP EA_CHECK_STD_WCSCMP EA_CHECK_STD_NUMERICLIMITS +EA_CHECK_STD_NS EA_CHECK_LIBCPPUNIT EA_CHECK_BOOSTTEST |
From: Ewald A. <ewa...@us...> - 2006-03-19 16:26:53
|
Update of /cvsroot/mockpp/mockpp/mockpp/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv549/mockpp/tests Modified Files: mock_test.cpp Log Message: cleanup namespace disabling Index: mock_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/mock_test.cpp,v retrieving revision 1.43 retrieving revision 1.44 diff -u -d -r1.43 -r1.44 --- mock_test.cpp 19 Mar 2006 11:09:37 -0000 1.43 +++ mock_test.cpp 19 Mar 2006 16:26:50 -0000 1.44 @@ -91,6 +91,35 @@ #endif +///////////////////////////////////////////////////// + + +#ifndef MOCKPP_NS +# define MOCKPP_NS n/a +#endif + +#ifndef MINISTL_NS +# define MINISTL_NS n/a +#endif + +#ifndef CXXTEST_NS +# define CXXTEST_NS n/a +#endif + +#define STRINGIZE(text) STRINGIZE_I(text) +#define STRINGIZE_I(text) #text + +#define PRINT_NS \ + std::cout << " - namespace mockpp : " << STRINGIZE(MOCKPP_NS) << std::endl \ + << " - namespace stl : " << STRINGIZE(MOCKPP_STL) << std::endl \ + << " - namespace std : " << STRINGIZE(MOCKPP_STD_NS) << std::endl \ + << " - namespace ministl: " << STRINGIZE(MINISTL_NS) << std::endl \ + << " - namespace CxxTest: " << STRINGIZE(CXXTEST_NS) << std::endl + + +///////////////////////////////////////////////////// + + #if defined(MOCKPP_USE_CXXTEST) class MyErrorPrinter : public CXXTEST_NS::ErrorPrinter @@ -114,6 +143,7 @@ bool show; }; + int run_cxxtest(int argc, char **argv) { #if defined(GUI_QT) @@ -224,6 +254,8 @@ std::cout << " - support pti-weakness disabled\n"; #endif + PRINT_NS; + std::cout << " - size of <char> is " << sizeof(MOCKPP_CHAR('x')) << std::endl; std::cout << "\n"; /* @@ -264,6 +296,8 @@ std::cout << " - using cppunit framework\n"; #endif + PRINT_NS; + #ifdef MOCKPP_PTI_WEAKNESS std::cout << " - support pti-weakness enabled\n"; #else |
From: Ewald A. <ewa...@us...> - 2006-03-19 16:26:53
|
Update of /cvsroot/mockpp/mockpp/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv549/mockpp Modified Files: mockpp.h Log Message: cleanup namespace disabling Index: mockpp.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/mockpp.h,v retrieving revision 1.80 retrieving revision 1.81 diff -u -d -r1.80 -r1.81 --- mockpp.h 19 Mar 2006 11:09:36 -0000 1.80 +++ mockpp.h 19 Mar 2006 16:26:50 -0000 1.81 @@ -203,13 +203,20 @@ # define MOCKPP_NS_START /* nothing */ # define MOCKPP_NS_END /* nothing */ # define USING_NAMESPACE_MOCKPP /* nothing */ -# define MOCKPP_STD_NS /* nothing */ #else # define MOCKPP_ANON_NS_START namespace { # define MOCKPP_NS mockpp # define MOCKPP_NS_START namespace mockpp { # define MOCKPP_NS_END } # define USING_NAMESPACE_MOCKPP using namespace mockpp; +#endif + +////////////////////////////////////////////////// +// + +#ifdef MOCKPP_NO_STD_NS +# define MOCKPP_STD_NS /* nothing */ +#else # define MOCKPP_STD_NS std #endif |
From: Ewald A. <ewa...@us...> - 2006-03-19 11:09:54
|
Update of /cvsroot/mockpp/mockpp/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16313/mockpp Modified Files: mockpp.h Log Message: optionally disable namespace Index: mockpp.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/mockpp.h,v retrieving revision 1.79 retrieving revision 1.80 diff -u -d -r1.79 -r1.80 --- mockpp.h 17 Mar 2006 08:42:46 -0000 1.79 +++ mockpp.h 19 Mar 2006 11:09:36 -0000 1.80 @@ -267,8 +267,8 @@ * Value representing an @p unlimited number. */ -#ifdef HAVE_LIMITS -# define MOCKPP_UNLIMITED (MOCKPP_STD_NS::numeric_limits<unsigned>::max()) +#if defined(HAVE_LIMITS) && !defined (MOCKPP_NO_STD_NUMERICLIMITS) +# define MOCKPP_UNLIMITED (std::numeric_limits<unsigned>::max()) #else # define MOCKPP_UNLIMITED (UINT_MAX) #endif @@ -581,4 +581,10 @@ * Makes member public for Borland BCB5 otherwise protected. */ +/** @def MOCKPP_NO_TYPENAME_FOR_STL_NS + * @ingroup grp_config + * Using typename yields an error in certain cases when stl is in + * global the namespace. + */ + #endif // MOCKPP_H |
From: Ewald A. <ewa...@us...> - 2006-03-19 11:09:52
|
Update of /cvsroot/mockpp/mockpp/3party/ministl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16313/3party/ministl Modified Files: ministl.h Log Message: optionally disable namespace Index: ministl.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/ministl/ministl.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- ministl.h 17 Mar 2006 08:40:52 -0000 1.5 +++ ministl.h 19 Mar 2006 11:09:36 -0000 1.6 @@ -23,7 +23,7 @@ * mi...@in... */ -//#define MINISTL_NO_NAMESPACE +// #define MINISTL_NO_NAMESPACE #ifndef __ministl_ministl_h__ #define __ministl_ministl_h__ |
From: Ewald A. <ewa...@us...> - 2006-03-19 11:09:51
|
Update of /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16313/3party/cxxtest/cxxtest Modified Files: Mock.h TestSuite.h ValueTraits.h Log Message: optionally disable namespace Index: TestSuite.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/TestSuite.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- TestSuite.h 17 Mar 2006 08:41:51 -0000 1.3 +++ TestSuite.h 19 Mar 2006 11:09:36 -0000 1.4 @@ -27,7 +27,7 @@ class AbortTest {}; void doAbortTest(); -# define TS_ABORT() CxxTest::doAbortTest() +# define TS_ABORT() CXXTEST_NS::doAbortTest() bool abortTestOnFail(); void setAbortTestOnFail( bool value = CXXTEST_DEFAULT_ABORT ); @@ -189,12 +189,12 @@ # ifdef _CXXTEST_HAVE_EH # define _TS_TRY try # define _TS_CATCH_TYPE(t, b) catch t b -# define _TS_CATCH_ABORT(b) _TS_CATCH_TYPE( (const CxxTest::AbortTest &), b ) +# define _TS_CATCH_ABORT(b) _TS_CATCH_TYPE( (const CXXTEST_NS::AbortTest &), b ) # define _TS_LAST_CATCH(b) _TS_CATCH_TYPE( (...), b ) -# define _TSM_LAST_CATCH(f,l,m) _TS_LAST_CATCH( { (CxxTest::tracker()).failedTest(f,l,m); } ) +# define _TSM_LAST_CATCH(f,l,m) _TS_LAST_CATCH( { (CXXTEST_NS::tracker()).failedTest(f,l,m); } ) # ifdef _CXXTEST_HAVE_STD # define ___TSM_CATCH(f,l,m) \ - catch(const std::exception &e) { (CxxTest::tracker()).failedTest(f,l,e.what()); } \ + catch(const std::exception &e) { (CXXTEST_NS::tracker()).failedTest(f,l,e.what()); } \ _TSM_LAST_CATCH(f,l,m) # else // !_CXXTEST_HAVE_STD # define ___TSM_CATCH(f,l,m) _TSM_LAST_CATCH(f,l,m) @@ -216,19 +216,19 @@ # endif // _CXXTEST_HAVE_EH // TS_TRACE -# define _TS_TRACE(f,l,e) CxxTest::doTrace( (f), (l), TS_AS_STRING(e) ) +# define _TS_TRACE(f,l,e) CXXTEST_NS::doTrace( (f), (l), TS_AS_STRING(e) ) # define TS_TRACE(e) _TS_TRACE( __FILE__, __LINE__, e ) // TS_WARN -# define _TS_WARN(f,l,e) CxxTest::doWarn( (f), (l), TS_AS_STRING(e) ) +# define _TS_WARN(f,l,e) CXXTEST_NS::doWarn( (f), (l), TS_AS_STRING(e) ) # define TS_WARN(e) _TS_WARN( __FILE__, __LINE__, e ) // TS_FAIL -# define _TS_FAIL(f,l,e) CxxTest::doFailTest( (f), (l), TS_AS_STRING(e) ) +# define _TS_FAIL(f,l,e) CXXTEST_NS::doFailTest( (f), (l), TS_AS_STRING(e) ) # define TS_FAIL(e) _TS_FAIL( __FILE__, __LINE__, e ) // TS_ASSERT -# define ___ETS_ASSERT(f,l,e,m) { if ( !(e) ) CxxTest::doFailAssert( (f), (l), #e, (m) ); } +# define ___ETS_ASSERT(f,l,e,m) { if ( !(e) ) CXXTEST_NS::doFailAssert( (f), (l), #e, (m) ); } # define ___TS_ASSERT(f,l,e,m) { _TS_TRY { ___ETS_ASSERT(f,l,e,m); } __TS_CATCH(f,l) } # define _ETS_ASSERT(f,l,e) ___ETS_ASSERT(f,l,e,0) @@ -244,7 +244,7 @@ # define TSM_ASSERT(m,e) _TSM_ASSERT(__FILE__,__LINE__,m,e) // TS_ASSERT_EQUALS -# define ___ETS_ASSERT_EQUALS(f,l,x,y,m) CxxTest::doAssertEquals( (f), (l), #x, (x), #y, (y), (m) ) +# define ___ETS_ASSERT_EQUALS(f,l,x,y,m) CXXTEST_NS::doAssertEquals( (f), (l), #x, (x), #y, (y), (m) ) # define ___TS_ASSERT_EQUALS(f,l,x,y,m) { _TS_TRY { ___ETS_ASSERT_EQUALS(f,l,x,y,m); } __TS_CATCH(f,l) } # define _ETS_ASSERT_EQUALS(f,l,x,y) ___ETS_ASSERT_EQUALS(f,l,x,y,0) @@ -260,7 +260,7 @@ # define TSM_ASSERT_EQUALS(m,x,y) _TSM_ASSERT_EQUALS(__FILE__,__LINE__,m,x,y) // TS_ASSERT_SAME_DATA -# define ___ETS_ASSERT_SAME_DATA(f,l,x,y,s,m) CxxTest::doAssertSameData( (f), (l), #x, (x), #y, (y), #s, (s), (m) ) +# define ___ETS_ASSERT_SAME_DATA(f,l,x,y,s,m) CXXTEST_NS::doAssertSameData( (f), (l), #x, (x), #y, (y), #s, (s), (m) ) # define ___TS_ASSERT_SAME_DATA(f,l,x,y,s,m) { _TS_TRY { ___ETS_ASSERT_SAME_DATA(f,l,x,y,s,m); } __TS_CATCH(f,l) } # define _ETS_ASSERT_SAME_DATA(f,l,x,y,s) ___ETS_ASSERT_SAME_DATA(f,l,x,y,s,0) @@ -276,7 +276,7 @@ # define TSM_ASSERT_SAME_DATA(m,x,y,s) _TSM_ASSERT_SAME_DATA(__FILE__,__LINE__,m,x,y,s) // TS_ASSERT_DIFFERS -# define ___ETS_ASSERT_DIFFERS(f,l,x,y,m) CxxTest::doAssertDiffers( (f), (l), #x, (x), #y, (y), (m) ) +# define ___ETS_ASSERT_DIFFERS(f,l,x,y,m) CXXTEST_NS::doAssertDiffers( (f), (l), #x, (x), #y, (y), (m) ) # define ___TS_ASSERT_DIFFERS(f,l,x,y,m) { _TS_TRY { ___ETS_ASSERT_DIFFERS(f,l,x,y,m); } __TS_CATCH(f,l) } # define _ETS_ASSERT_DIFFERS(f,l,x,y) ___ETS_ASSERT_DIFFERS(f,l,x,y,0) @@ -292,7 +292,7 @@ # define TSM_ASSERT_DIFFERS(m,x,y) _TSM_ASSERT_DIFFERS(__FILE__,__LINE__,m,x,y) // TS_ASSERT_LESS_THAN -# define ___ETS_ASSERT_LESS_THAN(f,l,x,y,m) CxxTest::doAssertLessThan( (f), (l), #x, (x), #y, (y), (m) ) +# define ___ETS_ASSERT_LESS_THAN(f,l,x,y,m) CXXTEST_NS::doAssertLessThan( (f), (l), #x, (x), #y, (y), (m) ) # define ___TS_ASSERT_LESS_THAN(f,l,x,y,m) { _TS_TRY { ___ETS_ASSERT_LESS_THAN(f,l,x,y,m); } __TS_CATCH(f,l) } # define _ETS_ASSERT_LESS_THAN(f,l,x,y) ___ETS_ASSERT_LESS_THAN(f,l,x,y,0) @@ -309,7 +309,7 @@ // TS_ASSERT_LESS_THAN_EQUALS # define ___ETS_ASSERT_LESS_THAN_EQUALS(f,l,x,y,m) \ - CxxTest::doAssertLessThanEquals( (f), (l), #x, (x), #y, (y), (m) ) + CXXTEST_NS::doAssertLessThanEquals( (f), (l), #x, (x), #y, (y), (m) ) # define ___TS_ASSERT_LESS_THAN_EQUALS(f,l,x,y,m) \ { _TS_TRY { ___ETS_ASSERT_LESS_THAN_EQUALS(f,l,x,y,m); } __TS_CATCH(f,l) } @@ -327,7 +327,7 @@ // TS_ASSERT_PREDICATE # define ___ETS_ASSERT_PREDICATE(f,l,p,x,m) \ - CxxTest::doAssertPredicate( (f), (l), #p, p(), #x, (x), (m) ) + CXXTEST_NS::doAssertPredicate( (f), (l), #p, p(), #x, (x), (m) ) # define ___TS_ASSERT_PREDICATE(f,l,p,x,m) \ { _TS_TRY { ___ETS_ASSERT_PREDICATE(f,l,p,x,m); } __TS_CATCH(f,l) } @@ -345,7 +345,7 @@ // TS_ASSERT_RELATION # define ___ETS_ASSERT_RELATION(f,l,r,x,y,m) \ - CxxTest::doAssertRelation( (f), (l), #r, r(), #x, (x), #y, (y), (m) ) + CXXTEST_NS::doAssertRelation( (f), (l), #r, r(), #x, (x), #y, (y), (m) ) # define ___TS_ASSERT_RELATION(f,l,r,x,y,m) \ { _TS_TRY { ___ETS_ASSERT_RELATION(f,l,r,x,y,m); } __TS_CATCH(f,l) } @@ -362,7 +362,7 @@ # define TSM_ASSERT_RELATION(m,r,x,y) _TSM_ASSERT_RELATION(__FILE__,__LINE__,m,r,x,y) // TS_ASSERT_DELTA -# define ___ETS_ASSERT_DELTA(f,l,x,y,d,m) CxxTest::doAssertDelta( (f), (l), #x, (x), #y, (y), #d, (d), (m) ) +# define ___ETS_ASSERT_DELTA(f,l,x,y,d,m) CXXTEST_NS::doAssertDelta( (f), (l), #x, (x), #y, (y), #d, (d), (m) ) # define ___TS_ASSERT_DELTA(f,l,x,y,d,m) { _TS_TRY { ___ETS_ASSERT_DELTA(f,l,x,y,d,m); } __TS_CATCH(f,l) } # define _ETS_ASSERT_DELTA(f,l,x,y,d) ___ETS_ASSERT_DELTA(f,l,x,y,d,0) @@ -384,7 +384,7 @@ _TS_CATCH_TYPE( (t), { _ts_threw_expected = true; } ) \ _TS_CATCH_ABORT( { throw; } ) \ _TS_LAST_CATCH( { _ts_threw_else = true; } ) \ - if ( !_ts_threw_expected ) { CxxTest::doFailAssertThrows( (f), (l), #e, #t, _ts_threw_else, (m) ); } } + if ( !_ts_threw_expected ) { CXXTEST_NS::doFailAssertThrows( (f), (l), #e, #t, _ts_threw_else, (m) ); } } # define _TS_ASSERT_THROWS(f,l,e,t) ___TS_ASSERT_THROWS(f,l,e,t,0) # define TS_ASSERT_THROWS(e,t) _TS_ASSERT_THROWS(__FILE__,__LINE__,e,t) @@ -399,7 +399,7 @@ _TS_CATCH_TYPE( (t), { a; _ts_threw_expected = true; } ) \ _TS_CATCH_ABORT( { throw; } ) \ _TS_LAST_CATCH( { _ts_threw_else = true; } ) \ - if ( !_ts_threw_expected ) { CxxTest::doFailAssertThrows( (f), (l), #e, #t, _ts_threw_else, (m) ); } } + if ( !_ts_threw_expected ) { CXXTEST_NS::doFailAssertThrows( (f), (l), #e, #t, _ts_threw_else, (m) ); } } # define _TS_ASSERT_THROWS_ASSERT(f,l,e,t,a) ___TS_ASSERT_THROWS_ASSERT(f,l,e,t,a,0) # define TS_ASSERT_THROWS_ASSERT(e,t,a) _TS_ASSERT_THROWS_ASSERT(__FILE__,__LINE__,e,t,a) @@ -444,7 +444,7 @@ bool _ts_threw = false; \ _TS_TRY { e; } \ _TS_LAST_CATCH( { _ts_threw = true; } ) \ - if ( !_ts_threw ) { CxxTest::doFailAssertThrows( (f), (l), #e, "...", false, (m) ); } } + if ( !_ts_threw ) { CXXTEST_NS::doFailAssertThrows( (f), (l), #e, "...", false, (m) ); } } # define _TS_ASSERT_THROWS_ANYTHING(f,l,e) ___TS_ASSERT_THROWS_ANYTHING(f,l,e,0) # define TS_ASSERT_THROWS_ANYTHING(e) _TS_ASSERT_THROWS_ANYTHING(__FILE__, __LINE__, e) @@ -456,7 +456,7 @@ # define ___TS_ASSERT_THROWS_NOTHING(f,l,e,m) { \ _TS_TRY { e; } \ _TS_CATCH_ABORT( { throw; } ) \ - _TS_LAST_CATCH( { CxxTest::doFailAssertThrowsNot( (f), (l), #e, (m) ); } ) } + _TS_LAST_CATCH( { CXXTEST_NS::doFailAssertThrowsNot( (f), (l), #e, (m) ); } ) } # define _TS_ASSERT_THROWS_NOTHING(f,l,e) ___TS_ASSERT_THROWS_NOTHING(f,l,e,0) # define TS_ASSERT_THROWS_NOTHING(e) _TS_ASSERT_THROWS_NOTHING(__FILE__,__LINE__,e) Index: ValueTraits.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/ValueTraits.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- ValueTraits.h 17 Mar 2006 08:41:51 -0000 1.4 +++ ValueTraits.h 19 Mar 2006 11:09:36 -0000 1.5 @@ -22,7 +22,7 @@ // // This is how we use the value traits // -# define TS_AS_STRING(x) CxxTest::traits(x).asString() +# define TS_AS_STRING(x) CXXTEST_NS::traits(x).asString() // // Char representation of a digit Index: Mock.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/Mock.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Mock.h 17 Mar 2006 08:41:51 -0000 1.2 +++ Mock.h 19 Mar 2006 11:09:36 -0000 1.3 @@ -50,7 +50,7 @@ // #define __CXXTEST_MOCK__CLASS_DECLARATION( MOCK, TYPE, NAME, ARGS, REAL, CALL ) \ CXXTEST_NS_START \ - class Base_##MOCK : public CxxTest::Link \ + class Base_##MOCK : public CXXTEST_NS::Link \ { \ public: \ Base_##MOCK(); \ @@ -63,7 +63,7 @@ virtual TYPE NAME ARGS = 0; \ \ private: \ - static CxxTest::List _list; \ + static CXXTEST_NS::List _list; \ }; \ \ class Real_##MOCK : public Base_##MOCK \ @@ -84,7 +84,7 @@ #define __CXXTEST_SUPPLY__CLASS_DECLARATION( MOCK, TYPE, NAME, ARGS, REAL, CALL ) \ CXXTEST_NS_START \ - class Base_##MOCK : public CxxTest::Link \ + class Base_##MOCK : public CXXTEST_NS::Link \ { \ public: \ Base_##MOCK(); \ @@ -97,7 +97,7 @@ virtual TYPE NAME ARGS = 0; \ \ private: \ - static CxxTest::List _list; \ + static CXXTEST_NS::List _list; \ }; \ \ class _Unimplemented_##MOCK : public Base_##MOCK \ @@ -116,7 +116,7 @@ #define __CXXTEST_MOCK__COMMON_CLASS_IMPLEMENTATION( MOCK, NAME ) \ CXXTEST_NS_START \ \ - CxxTest::List Base_##MOCK::_list = { 0, 0 }; \ + CXXTEST_NS::List Base_##MOCK::_list = { 0, 0 }; \ \ Base_##MOCK::Base_##MOCK() { attach( _list ); } \ Base_##MOCK::~Base_##MOCK() { detach( _list ); } \ |
From: Ewald A. <ewa...@us...> - 2006-03-19 11:09:49
|
Update of /cvsroot/mockpp/mockpp/mockpp/framework In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16313/mockpp/framework Modified Files: CxxTestRunner.h CxxTestSupport.h SelectUnittestFramework.h Log Message: optionally disable namespace Index: CxxTestRunner.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/framework/CxxTestRunner.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- CxxTestRunner.h 15 Mar 2006 21:34:05 -0000 1.6 +++ CxxTestRunner.h 19 Mar 2006 11:09:37 -0000 1.7 @@ -1,5 +1,5 @@ /** @file - @brief Run tests based on CxxTest::TestRunner + @brief Run tests based on CXXTEST_NS::TestRunner $Id$ @@ -45,28 +45,28 @@ /** Helper class to run tests with CxxTest framework. * @ingroup grp_framework */ -class CxxTestRunner : public CxxTest::TestRunner +class CxxTestRunner : public CXXTEST_NS::TestRunner { public: /** Internal method wihich runs all the tests. * @param listener pointer to test listener */ - static void runAllTests( CxxTest::TestListener &listener ) + static void runAllTests( CXXTEST_NS::TestListener &listener ) { - CxxTest::tracker().setListener( &listener ); + CXXTEST_NS::tracker().setListener( &listener ); _TS_TRY { CxxTestRunner().runWorld(); } _TS_CATCH_TYPE( (MOCKPP_NS::Exception &ex), - {CxxTest::tracker().failedTest( MOCKPP_NS::getLatin1(ex.getSrcFile()).c_str(), ex.getSrcLine(), MOCKPP_NS::getLatin1(ex.getMessage()).c_str() ); } ) + {CXXTEST_NS::tracker().failedTest( MOCKPP_NS::getLatin1(ex.getSrcFile()).c_str(), ex.getSrcLine(), MOCKPP_NS::getLatin1(ex.getMessage()).c_str() ); } ) _TS_CATCH_TYPE( (std::exception &ex), - {CxxTest::tracker().failedTest( __FILE__, __LINE__, ex.what() ); } ) + {CXXTEST_NS::tracker().failedTest( __FILE__, __LINE__, ex.what() ); } ) - _TS_LAST_CATCH( { CxxTest::tracker().failedTest( __FILE__, __LINE__, "Exception thrown from world" ); } ); + _TS_LAST_CATCH( { CXXTEST_NS::tracker().failedTest( __FILE__, __LINE__, "Exception thrown from world" ); } ); - CxxTest::tracker().setListener( 0 ); + CXXTEST_NS::tracker().setListener( 0 ); } }; Index: SelectUnittestFramework.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/framework/SelectUnittestFramework.h,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- SelectUnittestFramework.h 6 Jan 2006 12:17:35 -0000 1.13 +++ SelectUnittestFramework.h 19 Mar 2006 11:09:37 -0000 1.14 @@ -79,7 +79,7 @@ #if defined(MOCKPP_USE_CXXTEST) //================================================= -# define MOCKPP_DERIVE_PUBLIC_UNITFRAMEWORK : public CxxTest::TestSuite +# define MOCKPP_DERIVE_PUBLIC_UNITFRAMEWORK : public CXXTEST_NS::TestSuite #define MOCKPP_TESTMETHOD_DECL /* static or not */ Index: CxxTestSupport.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/framework/CxxTestSupport.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- CxxTestSupport.h 3 Jan 2006 15:12:34 -0000 1.3 +++ CxxTestSupport.h 19 Mar 2006 11:09:37 -0000 1.4 @@ -40,9 +40,9 @@ #define MOCKPP_CXXTEST_SUITE_REGISTRATION(classname) \ static classname suite_ ## classname; \ \ - static CxxTest::List tests_ ## classname = { 0, 0 }; \ + static CXXTEST_NS::List tests_ ## classname = { 0, 0 }; \ \ - CxxTest::StaticSuiteDescription suiteDescription_ ## classname( __FILE__, \ + CXXTEST_NS::StaticSuiteDescription suiteDescription_ ## classname( __FILE__, \ __LINE__, \ #classname, \ suite_ ## classname, \ @@ -58,10 +58,10 @@ */ #define MOCKPP_CXXTEST(classname, meth) \ static class TestDescription_ ## classname ## _ ## meth \ - : public CxxTest::RealTestDescription { \ + : public CXXTEST_NS::RealTestDescription { \ public: \ TestDescription_ ## classname ## _ ## meth() \ - : CxxTest::RealTestDescription( tests_ ## classname, \ + : CXXTEST_NS::RealTestDescription( tests_ ## classname, \ suiteDescription_ ##classname, \ __LINE__, \ #meth ) \ |
From: Ewald A. <ewa...@us...> - 2006-03-19 11:09:48
|
Update of /cvsroot/mockpp/mockpp/mockpp/chaining In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16313/mockpp/chaining Modified Files: AbstractDynamicChainingMock.h InvocationMocker.h Log Message: optionally disable namespace Index: InvocationMocker.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/InvocationMocker.h,v retrieving revision 1.40 retrieving revision 1.41 diff -u -d -r1.40 -r1.41 --- InvocationMocker.h 15 Mar 2006 21:34:02 -0000 1.40 +++ InvocationMocker.h 19 Mar 2006 11:09:37 -0000 1.41 @@ -82,7 +82,11 @@ public: +#ifdef MOCKPP_NO_TYPENAME_FOR_STL_NS + typedef MOCKPP_STL::vector<InvocationMatcher<I>*> List; +#else typedef typename MOCKPP_STL::vector<InvocationMatcher<I>*> List; +#endif typedef typename List::iterator Iterator; typedef typename List::const_iterator ConstIterator; @@ -208,7 +212,11 @@ * @return The current content of the buffer data */ virtual String describeTo( String &result, +#ifdef MOCKPP_NO_TYPENAME_FOR_STL_NS + const MOCKPP_STL::vector<InvocationMatcher<I>*> &matchers, +#else const typename MOCKPP_STL::vector<InvocationMatcher<I>*> &matchers, +#endif Stub<R, I> *stub, const String &name ) const = 0; @@ -220,7 +228,11 @@ * @return The current content of the buffer data */ String describeTo( String &result, +#ifdef MOCKPP_NO_TYPENAME_FOR_STL_NS + const MOCKPP_STL::vector<InvocationMatcher<I>*> &matchers, +#else const typename MOCKPP_STL::vector<InvocationMatcher<I>*> &matchers, +#endif TypelessStub<R>* stub, const String &name ) const { @@ -256,7 +268,11 @@ * @return The current content of the buffer data */ virtual String describeTo( String &result, +#ifdef MOCKPP_NO_TYPENAME_FOR_STL_NS + const MOCKPP_STL::vector<InvocationMatcher<I>*> &matchers, +#else const typename MOCKPP_STL::vector<InvocationMatcher<I>*> &matchers, +#endif Stub<R, I> *stub, const String &name ) const { @@ -311,7 +327,11 @@ * @return The current content of the buffer data */ String describeTo( String &result, +#ifdef MOCKPP_NO_TYPENAME_FOR_STL_NS + const MOCKPP_STL::vector<InvocationMatcher<I>*> &matchers, +#else const typename MOCKPP_STL::vector<InvocationMatcher<I>*> &matchers, +#endif Stub<R, I> *stub, const String &name ) const { Index: AbstractDynamicChainingMock.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/AbstractDynamicChainingMock.h,v retrieving revision 1.41 retrieving revision 1.42 diff -u -d -r1.41 -r1.42 --- AbstractDynamicChainingMock.h 15 Mar 2006 21:34:01 -0000 1.41 +++ AbstractDynamicChainingMock.h 19 Mar 2006 11:09:37 -0000 1.42 @@ -94,7 +94,11 @@ * @return The current content of the buffer data */ virtual String describeTo( String &result, +#ifdef MOCKPP_NO_TYPENAME_FOR_STL_NS + const MOCKPP_STL::vector<InvocationMatcher<I>*> &matchers, +#else const typename MOCKPP_STL::vector<InvocationMatcher<I>*> &matchers, +#endif Stub<R, I> *stub, const String &name ) const { |
From: Ewald A. <ewa...@us...> - 2006-03-19 11:09:48
|
Update of /cvsroot/mockpp/mockpp/mockpp/examples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16313/mockpp/examples Modified Files: mock_greeter.cpp Log Message: optionally disable namespace Index: mock_greeter.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/examples/mock_greeter.cpp,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- mock_greeter.cpp 15 Mar 2006 21:34:04 -0000 1.23 +++ mock_greeter.cpp 19 Mar 2006 11:09:37 -0000 1.24 @@ -455,16 +455,16 @@ int run_cxxtest(int argc, char **argv) { #if defined(GUI_QT) - return CxxTest::GuiTuiRunner<CxxTest::QtGui, CxxTest::StdioPrinter>( argc, argv ).run(); + return CXXTEST_NS::GuiTuiRunner<CXXTEST_NS::QtGui, CXXTEST_NS::StdioPrinter>( argc, argv ).run(); #elif defined(GUI_X11) - return CxxTest::GuiTuiRunner<CxxTest::X11Gui, CxxTest::StdioPrinter>( argc, argv ).run(); + return CXXTEST_NS::GuiTuiRunner<CXXTEST_NS::X11Gui, CXXTEST_NS::StdioPrinter>( argc, argv ).run(); #elif defined(GUI_WIN32) - return CxxTest::GuiTuiRunner<CxxTest::Win32Gui, CxxTest::StdioPrinter>( argc, argv ).run(); + return CXXTEST_NS::GuiTuiRunner<CXXTEST_NS::Win32Gui, CXXTEST_NS::StdioPrinter>( argc, argv ).run(); #else - CxxTest::ErrorPrinter ep; + CXXTEST_NS::ErrorPrinter ep; MOCKPP_NS::CxxTestRunner::runAllTests(ep); - return CxxTest::tracker().failedTests(); - //return CxxTest::ErrorPrinter().run(); + return CXXTEST_NS::tracker().failedTests(); + //return CXXTEST_NS::ErrorPrinter().run(); #endif } |
From: Ewald A. <ewa...@us...> - 2006-03-19 11:09:46
|
Update of /cvsroot/mockpp/mockpp/mockpp/docs/en In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16313/mockpp/docs/en Modified Files: appendix.docbook index.docbook Log Message: optionally disable namespace Index: appendix.docbook =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/docs/en/appendix.docbook,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- appendix.docbook 12 Mar 2006 08:25:55 -0000 1.24 +++ appendix.docbook 19 Mar 2006 11:09:37 -0000 1.25 @@ -92,6 +92,17 @@ </varlistentry> <varlistentry> + <term>--disable-namespace</term> + <listitem><para>Disables the use of namespaces. For that reason &mockpp; + resides in the global namespace. Additionally the built-in components &ministl; + and &cxxtest; are in the global namespace as well. This may lead to problems + when using other libraries which contain classes like <classname>Exception</classname> + or <classname>String</classname>. There are also workarounds for certain elements + in the <literal>std</literal> namespace.</para> + </listitem> + </varlistentry> + + <varlistentry> <term>--enable-cppunit</term> <listitem><para>This option enables &cppunit; as test framework.</para> </listitem> @@ -233,7 +244,7 @@ <para>If you want to use another STL you have to extend the according section in <filename>mockpp.h</filename>. Search for <literal>MOCKPP_USE_MINI_STL</literal> and add an appropriate section similar to the one for - <literal>ministl</literal>. Do the same for &cxxtest; in + &ministl;. Do the same for &cxxtest; in <filename>3party/cxxtest/cxxtest/Flags.h</filename></para> </listitem> </varlistentry> Index: index.docbook =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/docs/en/index.docbook,v retrieving revision 1.40 retrieving revision 1.41 diff -u -d -r1.40 -r1.41 --- index.docbook 12 Mar 2006 08:25:55 -0000 1.40 +++ index.docbook 19 Mar 2006 11:09:37 -0000 1.41 @@ -9,6 +9,7 @@ <!ENTITY mockpp '<application>mockpp</application>' > <!ENTITY cppunit '<application>CppUnit</application>' > <!ENTITY cxxtest '<application>CxxTest</application>' > + <!ENTITY ministl '<application>ministl</application>' > <!ENTITY boost.test '<application>Boost.Test</application>' > <!ENTITY cygwin '<application>Cygwin</application>' > <!ENTITY copyyears '2002-2006' > |
From: Ewald A. <ewa...@us...> - 2006-03-19 11:09:46
|
Update of /cvsroot/mockpp/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16313 Modified Files: ChangeLog configure.in run-configure-unicode.sh Log Message: optionally disable namespace Index: run-configure-unicode.sh =================================================================== RCS file: /cvsroot/mockpp/mockpp/run-configure-unicode.sh,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- run-configure-unicode.sh 15 Mar 2006 21:33:55 -0000 1.18 +++ run-configure-unicode.sh 19 Mar 2006 11:09:36 -0000 1.19 @@ -15,8 +15,9 @@ echo MYCC: $MYCC #OPTS="--enable-doxygen --enable-docbook" -OPTS="$OPTS --enable-builtin-stl" # --disable-exceptions --disable-rtti +#OPTS="$OPTS --enable-builtin-stl" # --disable-exceptions --disable-rtti OPTS="$OPTS --enable-debug=full" +#OPTS="$OPTS --disable-namespace" OPTS="$OPTS --disable-builtin-cxxtest --enable-cppunit" #OPTS="$OPTS --disable-builtin-cxxtest --enable-boosttest" Index: ChangeLog =================================================================== RCS file: /cvsroot/mockpp/mockpp/ChangeLog,v retrieving revision 1.101 retrieving revision 1.102 diff -u -d -r1.101 -r1.102 --- ChangeLog 15 Mar 2006 21:33:55 -0000 1.101 +++ ChangeLog 19 Mar 2006 11:09:36 -0000 1.102 @@ -5,8 +5,8 @@ 2006-03-16 1.11.4 - added script to retrieve data from configure - - added compiler switch to disable mockpp namespace - to enable older compilers + - added compiler switch to disable namespaces + for built-in sources to support older compilers 2006-03-05 1.11.3 Index: configure.in =================================================================== RCS file: /cvsroot/mockpp/mockpp/configure.in,v retrieving revision 1.114 retrieving revision 1.115 diff -u -d -r1.114 -r1.115 --- configure.in 12 Mar 2006 08:25:53 -0000 1.114 +++ configure.in 19 Mar 2006 11:09:36 -0000 1.115 @@ -307,6 +307,32 @@ AM_CONDITIONAL(BUILTIN_CXXTEST, test x$disable_builtin_cxxtest != xyes) dnl ------------------------------------------------------------------------ + +AC_DEFUN([EA_DISABLE_NAMESPACE], +[ +AC_ARG_ENABLE(disable_namespace, [ --disable-namespace do NOT use namespaces (no)], [disable_namespace=yes]) + +if test x$disable_namespace = xyes; then + echo "*******************************************************" + echo "** NOT using namespaces" + echo "*******************************************************" + AC_DEFINE(MOCKPP_NO_TYPENAME_FOR_STL_NS, 1, [restricted use of "typedef typename".]) + AC_DEFINE(MOCKPP_NO_NAMESPACE, 1, [Define if you don't use mockpp namespace.]) + AC_DEFINE(MINISTL_NO_NAMESPACE, 1, [Define if you don't use ministl namespace.]) + AC_DEFINE(CXXTEST_NO_NAMESPACE, 1, [Define if you don't use CxxTest namespace.]) +else + echo "*******************************************************" + echo "** normally using namespaces" + echo "*******************************************************" + AH_TEMPLATE([MOCKPP_NO_TYPENAME_FOR_STL_NS], [restricted use of "typedef typename".]) + AH_TEMPLATE([MOCKPP_NO_NAMESPACE], [Define if you don't use mockpp namespace.]) + AH_TEMPLATE([MINISTL_NO_NAMESPACE], [Define if you don't use ministl namespace.]) + AH_TEMPLATE([CXXTEST_NO_NAMESPACE], [Define if you don't use CxxTest namespace.]) +fi +]) +AM_CONDITIONAL(DISABLE_NAMESPACE, test x$disable_namespace != xyes) + +dnl ------------------------------------------------------------------------ dnl Find a file (or one of more files in a list of dirs) dnl params: filename path result(NO = none) dnl ------------------------------------------------------------------------ @@ -388,12 +414,42 @@ # ---------------------------------------------------------------------------- +AC_DEFUN([EA_CHECK_STD_NUMERICLIMITS], +[ + +AC_MSG_CHECKING([for std::numeric_limits]) +AC_LANG_SAVE +AC_LANG_CPLUSPLUS + +cat > conftest.$ac_ext <<EOF +#include <limits> +int main() +{ + return (int) std::numeric_limits<unsigned>::max(); +} +EOF + +ac_compile_link='${CXX} $CXXFLAGS $all_includes $all_libraries $CPPFLAGS conftest.$ac_ext' +if AC_TRY_EVAL(ac_compile_link); then + AC_MSG_RESULT(yes) +else + AC_DEFINE(MOCKPP_NO_STD_NUMERICLIMITS, 1, [Define if the std::numeric_limits templates are missing.]) + AC_MSG_RESULT(no) +fi + +AC_SUBST(MOCKPP_NO_STD_NUMERICLIMITS) +AC_LANG_RESTORE +]) + +# ---------------------------------------------------------------------------- + AC_CXX_RTTI EA_DISABLE_EXCEPTIONS EA_DISABLE_RTTI EA_BUILTIN_STL EA_BUILTIN_CXXTEST +EA_DISABLE_NAMESPACE EA_ENABLE_DOCBOOK EA_CHECK_LIBDL EA_ENABLE_DOXYGEN @@ -402,6 +458,7 @@ EA_CHECK_WSTRING EA_CHECK_WCSCMP EA_CHECK_STD_WCSCMP +EA_CHECK_STD_NUMERICLIMITS EA_CHECK_LIBCPPUNIT EA_CHECK_BOOSTTEST |
From: Ewald A. <ewa...@us...> - 2006-03-19 11:09:46
|
Update of /cvsroot/mockpp/mockpp/mockpp/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16313/mockpp/tests Modified Files: mock_test.cpp Log Message: optionally disable namespace Index: mock_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/mock_test.cpp,v retrieving revision 1.42 retrieving revision 1.43 diff -u -d -r1.42 -r1.43 --- mock_test.cpp 15 Mar 2006 21:34:08 -0000 1.42 +++ mock_test.cpp 19 Mar 2006 11:09:37 -0000 1.43 @@ -93,7 +93,7 @@ #if defined(MOCKPP_USE_CXXTEST) -class MyErrorPrinter : public CxxTest::ErrorPrinter +class MyErrorPrinter : public CXXTEST_NS::ErrorPrinter { public: @@ -101,12 +101,12 @@ : show(showit) {} - void enterTest( const CxxTest::TestDescription &td ) + void enterTest( const CXXTEST_NS::TestDescription &td ) { if (show) std::cout << td.suiteName() << "::" << td.testName() << std::endl; - CxxTest::ErrorPrinter::enterTest(td); + CXXTEST_NS::ErrorPrinter::enterTest(td); } private: @@ -117,11 +117,11 @@ int run_cxxtest(int argc, char **argv) { #if defined(GUI_QT) - return CxxTest::GuiTuiRunner<CxxTest::QtGui, CxxTest::StdioPrinter>( argc, argv ).run(); + return CXXTEST_NS::GuiTuiRunner<CXXTEST_NS::QtGui, CXXTEST_NS::StdioPrinter>( argc, argv ).run(); #elif defined(GUI_X11) - return CxxTest::GuiTuiRunner<CxxTest::X11Gui, CxxTest::StdioPrinter>( argc, argv ).run(); + return CXXTEST_NS::GuiTuiRunner<CXXTEST_NS::X11Gui, CXXTEST_NS::StdioPrinter>( argc, argv ).run(); #elif defined(GUI_WIN32) - return CxxTest::GuiTuiRunner<CxxTest::Win32Gui, CxxTest::StdioPrinter>( argc, argv ).run(); + return CXXTEST_NS::GuiTuiRunner<CXXTEST_NS::Win32Gui, CXXTEST_NS::StdioPrinter>( argc, argv ).run(); #else bool show = false; for (int i1 = 1; i1 < argc; ++i1) @@ -130,8 +130,8 @@ MyErrorPrinter ep(show); MOCKPP_NS::CxxTestRunner::runAllTests(ep); - return CxxTest::tracker().failedTests(); - //return CxxTest::ErrorPrinter().run(); + return CXXTEST_NS::tracker().failedTests(); + //return CXXTEST_NS::ErrorPrinter().run(); #endif } |
From: Ewald A. <ewa...@us...> - 2006-03-17 08:42:49
|
Update of /cvsroot/mockpp/mockpp/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13009/mockpp Modified Files: mockpp_config-bcb5.h mockpp_config-msvc_71.h mockpp.h Log Message: optionally disable CxxTest and ministl namespace Index: mockpp.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/mockpp.h,v retrieving revision 1.78 retrieving revision 1.79 diff -u -d -r1.78 -r1.79 --- mockpp.h 15 Mar 2006 21:56:32 -0000 1.78 +++ mockpp.h 17 Mar 2006 08:42:46 -0000 1.79 @@ -166,7 +166,7 @@ #define MOCKPP_FUNCTION_H <ministl/function> // namespace ministl -#define MOCKPP_STL ministl +#define MOCKPP_STL MINISTL_NS #define MOCKPP_ALTERNATIVE_STL #else @@ -179,7 +179,7 @@ #define MOCKPP_ALGORITHM_H <algorithm> // namespace std -#define MOCKPP_STL std +#define MOCKPP_STL MOCKPP_STD_NS #undef MOCKPP_ALTERNATIVE_STL #endif @@ -203,12 +203,14 @@ # define MOCKPP_NS_START /* nothing */ # define MOCKPP_NS_END /* nothing */ # define USING_NAMESPACE_MOCKPP /* nothing */ +# define MOCKPP_STD_NS /* nothing */ #else # define MOCKPP_ANON_NS_START namespace { # define MOCKPP_NS mockpp # define MOCKPP_NS_START namespace mockpp { # define MOCKPP_NS_END } # define USING_NAMESPACE_MOCKPP using namespace mockpp; +# define MOCKPP_STD_NS std #endif ////////////////////////////////////////////////// @@ -266,7 +268,7 @@ */ #ifdef HAVE_LIMITS -# define MOCKPP_UNLIMITED (std::numeric_limits<unsigned>::max()) +# define MOCKPP_UNLIMITED (MOCKPP_STD_NS::numeric_limits<unsigned>::max()) #else # define MOCKPP_UNLIMITED (UINT_MAX) #endif @@ -542,6 +544,14 @@ #define MOCKPP_USE_MINI_STL #endif +/** @def MOCKPP_NO_NAMESPACE + * @ingroup grp_config + * Defined if namespace support is not working properly. + * In this case \c mockpp resides in the global namespace. + * If ministl and CxxTest are used they should also be configured + * with \c MINISTL_NO_NAMESPACE and \c CXXTEST_NO_NAMESPACE . + */ + /** @def MOCKPP_UNICODE * @ingroup grp_config * Defined if \c Unicode strings are used. Index: mockpp_config-bcb5.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/mockpp_config-bcb5.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- mockpp_config-bcb5.h 12 Mar 2006 08:25:55 -0000 1.4 +++ mockpp_config-bcb5.h 17 Mar 2006 08:42:46 -0000 1.5 @@ -1,6 +1,6 @@ // #define's for Borland BCB5 // derived from automatically generated config.h. See Makefile.am. -/* Generated: 2006-03-06 */ +/* Generated: 2006-03-16 */ #pragma warn -8030 // temporary variables @@ -11,7 +11,7 @@ #undef DEBUG /* Version number of package */ -#define MOCKPP_VERSION "1.11.3" +#define MOCKPP_VERSION "1.11.4" /* Name of package */ #define MOCKPP_PACKAGE "mockpp" Index: mockpp_config-msvc_71.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/mockpp_config-msvc_71.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- mockpp_config-msvc_71.h 12 Mar 2006 08:25:55 -0000 1.4 +++ mockpp_config-msvc_71.h 17 Mar 2006 08:42:46 -0000 1.5 @@ -1,6 +1,6 @@ // #define's for MS Visual C++ 7.1 and later (NOT 6.0/7.0) // derived from automatically generated config.h. See Makefile.am. -/* Generated: 2006-03-06 */ +/* Generated: 2006-03-16 */ /* Define to use sprintf_s instead of sprintf. */ #if _MSC_VER >= 1400 @@ -11,7 +11,7 @@ #undef DEBUG /* Version number of package */ -#define MOCKPP_VERSION "1.11.3" +#define MOCKPP_VERSION "1.11.4" /* Name of package */ #define MOCKPP_PACKAGE "mockpp" |
Update of /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12519/3party/cxxtest/cxxtest Modified Files: Descriptions.cpp Descriptions.h DummyDescriptions.cpp DummyDescriptions.h ErrorFormatter.h ErrorPrinter.h Flags.h GlobalFixture.cpp GlobalFixture.h Gui.h LinkedList.cpp LinkedList.h Mock.h ParenPrinter.h QtGui.h RealDescriptions.cpp RealDescriptions.h StdValueTraits.h StdioFilePrinter.h StdioPrinter.h TeeListener.h TestListener.h TestRunner.h TestSuite.cpp TestSuite.h TestTracker.cpp TestTracker.h ValueTraits.cpp ValueTraits.h Win32Gui.h X11Gui.h YesNoRunner.h Log Message: optionally disable CxxTest namespace Index: TestSuite.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/TestSuite.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- TestSuite.cpp 17 Dec 2005 18:38:44 -0000 1.3 +++ TestSuite.cpp 17 Mar 2006 08:41:51 -0000 1.4 @@ -3,8 +3,7 @@ #include <cxxtest/TestSuite.h> -namespace CxxTest -{ +CXXTEST_NS_START // // TestSuite members // @@ -133,6 +132,6 @@ tracker().failedAssertThrowsNot( file, line, expression ); TS_ABORT(); } -} +CXXTEST_NS_END #endif // __cxxtest__TestSuite_cpp__ Index: QtGui.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/QtGui.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- QtGui.h 10 Dec 2005 15:13:16 -0000 1.2 +++ QtGui.h 17 Mar 2006 08:41:51 -0000 1.3 @@ -25,8 +25,7 @@ #include <qprogressbar.h> #include <qstatusbar.h> -namespace CxxTest -{ +CXXTEST_NS_START class QtGui : public GuiListener { public: @@ -266,6 +265,6 @@ _testsDone->setText( summary ); } }; -} +CXXTEST_NS_END #endif // __cxxtest__QtGui_h__ Index: TestTracker.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/TestTracker.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- TestTracker.h 17 Dec 2005 18:38:44 -0000 1.4 +++ TestTracker.h 17 Mar 2006 08:41:51 -0000 1.5 @@ -11,8 +11,7 @@ #include <cxxtest/DummyDescriptions.h> #include <cxxtest/Flags.h> -namespace CxxTest -{ +CXXTEST_NS_START class TestListener; class CXXTEST_EXPORT TestTracker : public TestListener @@ -111,6 +110,6 @@ }; inline TestTracker &tracker() { return TestTracker::tracker(); } -} +CXXTEST_NS_END #endif // __cxxtest__TestTracker_h__ Index: LinkedList.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/LinkedList.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- LinkedList.h 17 Dec 2005 18:38:44 -0000 1.2 +++ LinkedList.h 17 Mar 2006 08:41:51 -0000 1.3 @@ -3,8 +3,7 @@ #include <cxxtest/Flags.h> -namespace CxxTest -{ +CXXTEST_NS_START struct List; class Link; @@ -39,7 +38,7 @@ Link *justNext(); Link *justPrev(); - + Link *next(); Link *prev(); const Link *next() const; @@ -59,7 +58,7 @@ Link( const Link & ); Link &operator=( const Link & ); }; -} +CXXTEST_NS_END #endif // __cxxtest__LinkedList_h__ Index: LinkedList.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/LinkedList.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- LinkedList.cpp 10 Dec 2005 15:13:16 -0000 1.3 +++ LinkedList.cpp 17 Mar 2006 08:41:51 -0000 1.4 @@ -3,9 +3,8 @@ #include <cxxtest/LinkedList.h> -namespace CxxTest -{ - void List::initialize() +CXXTEST_NS_START +void List::initialize() { _head = _tail = 0; } @@ -164,6 +163,6 @@ else l._tail = _prev; } -} +CXXTEST_NS_END #endif // __cxxtest__LinkedList_cpp__ Index: ErrorPrinter.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/ErrorPrinter.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ErrorPrinter.h 9 Dec 2005 15:57:51 -0000 1.1 +++ ErrorPrinter.h 17 Mar 2006 08:41:51 -0000 1.2 @@ -23,8 +23,7 @@ # include <iostream> #endif // _CXXTEST_OLD_STD -namespace CxxTest -{ +CXXTEST_NS_START class ErrorPrinter : public ErrorFormatter { public: @@ -50,6 +49,6 @@ } }; }; -} +CXXTEST_NS_END #endif // __cxxtest__ErrorPrinter_h__ Index: Win32Gui.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/Win32Gui.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- Win32Gui.h 4 Jan 2006 19:56:21 -0000 1.4 +++ Win32Gui.h 17 Mar 2006 08:41:51 -0000 1.5 @@ -22,8 +22,7 @@ #include <windows.h> #include <commctrl.h> -namespace CxxTest -{ +CXXTEST_NS_START class Win32Gui : public GuiListener { public: @@ -540,6 +539,6 @@ HeapFree( GetProcessHeap(), 0, data ); } }; -} +CXXTEST_NS_END #endif // __cxxtest__Win32Gui_h__ Index: TestRunner.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/TestRunner.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- TestRunner.h 10 Dec 2005 21:56:05 -0000 1.3 +++ TestRunner.h 17 Mar 2006 08:41:51 -0000 1.4 @@ -12,8 +12,7 @@ #include <cxxtest/TestSuite.h> #include <cxxtest/TestTracker.h> -namespace CxxTest -{ +CXXTEST_NS_START class TestRunner { public: @@ -121,7 +120,7 @@ // For --no-static-init // void initialize(); -} +CXXTEST_NS_END #endif // __cxxtest_TestRunner_h__ Index: TestListener.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/TestListener.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- TestListener.h 28 Dec 2005 19:43:06 -0000 1.2 +++ TestListener.h 17 Mar 2006 08:41:51 -0000 1.3 @@ -12,14 +12,13 @@ #include <cxxtest/Descriptions.h> -namespace CxxTest -{ +CXXTEST_NS_START class CXXTEST_EXPORT TestListener { public: TestListener() {} virtual ~TestListener() {} - + virtual void enterWorld( const WorldDescription & /*desc*/ ) {} virtual void enterSuite( const SuiteDescription & /*desc*/ ) {} virtual void enterTest( const TestDescription & /*desc*/ ) {} @@ -65,6 +64,6 @@ virtual void leaveSuite( const SuiteDescription & /*desc*/ ) {} virtual void leaveWorld( const WorldDescription & /*desc*/ ) {} }; -} +CXXTEST_NS_END #endif // __cxxtest__TestListener_h__ Index: Descriptions.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/Descriptions.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Descriptions.h 17 Dec 2005 18:38:44 -0000 1.2 +++ Descriptions.h 17 Mar 2006 08:41:50 -0000 1.3 @@ -9,9 +9,8 @@ #include <cxxtest/LinkedList.h> #include <cxxtest/Flags.h> -namespace CxxTest -{ - class TestSuite; +CXXTEST_NS_START +class TestSuite; class CXXTEST_EXPORT TestDescription : public Link { @@ -55,7 +54,7 @@ { public: virtual ~WorldDescription(); - + virtual unsigned numSuites( void ) const = 0; virtual unsigned numTotalTests( void ) const = 0; virtual const SuiteDescription &suiteDescription( unsigned /*i*/ ) const = 0; @@ -69,7 +68,7 @@ virtual void activateAllTests() = 0; virtual bool leaveOnly( const char * /*suiteName*/, const char * /*testName*/ = 0 ) = 0; }; -} +CXXTEST_NS_END #endif // __cxxtest__Descriptions_h__ Index: GlobalFixture.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/GlobalFixture.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- GlobalFixture.cpp 9 Dec 2005 20:40:42 -0000 1.2 +++ GlobalFixture.cpp 17 Mar 2006 08:41:51 -0000 1.3 @@ -3,9 +3,8 @@ #include <cxxtest/GlobalFixture.h> -namespace CxxTest -{ - List GlobalFixture::_list = { 0, 0 }; +CXXTEST_NS_START +List GlobalFixture::_list = { 0, 0 }; bool GlobalFixture::setUpWorld() { return true; } bool GlobalFixture::tearDownWorld() { return true; } @@ -19,7 +18,7 @@ GlobalFixture *GlobalFixture::lastGlobalFixture() { return (GlobalFixture *)_list.tail(); } GlobalFixture *GlobalFixture::nextGlobalFixture() { return (GlobalFixture *)next(); } GlobalFixture *GlobalFixture::prevGlobalFixture() { return (GlobalFixture *)prev(); } -} +CXXTEST_NS_END #endif // __cxxtest__GlobalFixture_cpp__ Index: Gui.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/Gui.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Gui.h 10 Dec 2005 15:13:16 -0000 1.2 +++ Gui.h 17 Mar 2006 08:41:51 -0000 1.3 @@ -8,9 +8,8 @@ #include <cxxtest/TeeListener.h> -namespace CxxTest -{ - class GuiListener : public TestListener +CXXTEST_NS_START +class GuiListener : public TestListener { public: GuiListener() : _state( GREEN_BAR ) {} @@ -173,6 +172,6 @@ return tracker().failedTests(); } }; -} +CXXTEST_NS_END #endif //__CXXTEST__GUI_H Index: X11Gui.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/X11Gui.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- X11Gui.h 9 Dec 2005 15:57:51 -0000 1.1 +++ X11Gui.h 17 Mar 2006 08:41:51 -0000 1.2 @@ -3,7 +3,7 @@ // // X11Gui displays a simple progress bar using X11 -// +// // It accepts the following command-line arguments: // -title <title> - Sets the application title // -fn or -font <font> - Sets the font @@ -20,8 +20,7 @@ #include <stdlib.h> #include <string.h> -namespace CxxTest -{ +CXXTEST_NS_START class X11Gui : public GuiListener { public: @@ -29,7 +28,7 @@ { parseCommandLine( argc, argv ); } - + void enterWorld( const WorldDescription &wd ) { openDisplay(); @@ -44,7 +43,7 @@ processEvents(); } } - + void guiEnterTest( const char *suiteName, const char *testName ) { if ( _display ) { @@ -53,7 +52,7 @@ redraw(); } } - + void yellowBar() { if ( _display ) { @@ -148,7 +147,7 @@ XAllocColor( _display, _colormap, &color ); return color.pixel; } - + void createWindow() { _window = XCreateSimpleWindow( _display, RootWindow( _display, 0 ), 0, 0, 1, 1, 0, 0, _background ); @@ -218,7 +217,7 @@ void centerWindow() { XMapWindow( _display, _window ); - + Screen *screen = XDefaultScreenOfDisplay( _display ); int screenWidth = WidthOfScreen( screen ); int screenHeight = HeightOfScreen( screen ); @@ -227,14 +226,14 @@ _width = (screenWidth * 4) / 5; _height = screenHeight / 14; - + XMoveResizeWindow( _display, _window, xCenter - (_width / 2), yCenter - (_height / 2), _width, _height ); } void processEvents() { redraw(); - + XEvent event; while( XCheckMaskEvent( _display, _eventMask, &event ) ) redraw(); @@ -290,7 +289,7 @@ void drawPercentage() { XSetForeground( _display, _gc, _foreground ); - + char str[sizeof("1000000000 of ") + sizeof(_strTotalTests) + sizeof(" (100%)")]; sprintf( str, "%u of %s (%u%%)", _testsDone, _strTotalTests, (_testsDone * 100) / _numTotalTests ); unsigned len = strlen( str ); @@ -322,6 +321,6 @@ XCloseDisplay( _display ); } }; -}; +CXXTEST_NS_END #endif //__cxxtest__X11Gui_h__ Index: YesNoRunner.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/YesNoRunner.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- YesNoRunner.h 9 Dec 2005 15:57:51 -0000 1.1 +++ YesNoRunner.h 17 Mar 2006 08:41:51 -0000 1.2 @@ -9,21 +9,20 @@ #include <cxxtest/TestRunner.h> #include <cxxtest/TestListener.h> -namespace CxxTest -{ +CXXTEST_NS_START class YesNoRunner : public TestListener { public: YesNoRunner() { } - + int run() { TestRunner::runAllTests( *this ); return tracker().failedTests(); } }; -} +CXXTEST_NS_END #endif // __cxxtest__YesNoRunner_h__ Index: ValueTraits.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/ValueTraits.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- ValueTraits.cpp 17 Dec 2005 18:38:44 -0000 1.4 +++ ValueTraits.cpp 17 Mar 2006 08:41:51 -0000 1.5 @@ -3,8 +3,7 @@ #include <cxxtest/ValueTraits.h> -namespace CxxTest -{ +CXXTEST_NS_START // // Non-inline functions from ValueTraits.h // @@ -135,6 +134,6 @@ return numberToString<double>( t, s, BASE, skip, max ); } #endif // !CXXTEST_USER_VALUE_TRAITS -} +CXXTEST_NS_END #endif // __cxxtest__ValueTraits_cpp__ Index: ParenPrinter.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/ParenPrinter.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ParenPrinter.h 9 Dec 2005 15:57:51 -0000 1.1 +++ ParenPrinter.h 17 Mar 2006 08:41:51 -0000 1.2 @@ -9,13 +9,12 @@ #include <cxxtest/ErrorPrinter.h> -namespace CxxTest -{ +CXXTEST_NS_START class ParenPrinter : public ErrorPrinter { public: ParenPrinter( CXXTEST_STD(ostream) &o = CXXTEST_STD(cout) ) : ErrorPrinter( o, "(", ")" ) {} }; -} +CXXTEST_NS_END #endif // __cxxtest__ParenPrinter_h__ Index: DummyDescriptions.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/DummyDescriptions.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- DummyDescriptions.cpp 9 Dec 2005 15:57:51 -0000 1.1 +++ DummyDescriptions.cpp 17 Mar 2006 08:41:50 -0000 1.2 @@ -1,9 +1,8 @@ #include <cxxtest/DummyDescriptions.h> -namespace CxxTest -{ +CXXTEST_NS_START DummyTestDescription::DummyTestDescription() {} - + const char *DummyTestDescription::file() const { return "<no file>"; } unsigned DummyTestDescription::line() const { return 0; } const char *DummyTestDescription::testName() const { return "<no test>"; } @@ -14,9 +13,9 @@ TestDescription *DummyTestDescription::next() { return 0; } const TestDescription *DummyTestDescription::next() const { return 0; } - + DummySuiteDescription::DummySuiteDescription() : _test() {} - + const char *DummySuiteDescription::file() const { return "<no file>"; } unsigned DummySuiteDescription::line() const { return 0; } const char *DummySuiteDescription::suiteName() const { return "<no suite>"; } @@ -29,12 +28,12 @@ const TestDescription *DummySuiteDescription::firstTest() const { return 0; } void DummySuiteDescription::activateAllTests() {} bool DummySuiteDescription::leaveOnly( const char * /*testName*/ ) { return false; } - + bool DummySuiteDescription::setUp() { return true;} bool DummySuiteDescription::tearDown() { return true;} DummyWorldDescription::DummyWorldDescription() : _suite() {} - + unsigned DummyWorldDescription::numSuites( void ) const { return 0; } unsigned DummyWorldDescription::numTotalTests( void ) const { return 0; } const SuiteDescription &DummyWorldDescription::suiteDescription( unsigned ) const { return _suite; } @@ -42,8 +41,8 @@ const SuiteDescription *DummyWorldDescription::firstSuite() const { return 0; } void DummyWorldDescription::activateAllTests() {} bool DummyWorldDescription::leaveOnly( const char * /*suiteName*/, const char * /*testName*/ ) { return false; } - + bool DummyWorldDescription::setUp() { return true;} bool DummyWorldDescription::tearDown() { return true;} -} +CXXTEST_NS_END Index: RealDescriptions.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/RealDescriptions.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- RealDescriptions.h 17 Dec 2005 18:38:44 -0000 1.2 +++ RealDescriptions.h 17 Mar 2006 08:41:51 -0000 1.3 @@ -10,15 +10,14 @@ #include <cxxtest/GlobalFixture.h> #include <cxxtest/Flags.h> -namespace CxxTest -{ +CXXTEST_NS_START class CXXTEST_EXPORT RealTestDescription : public TestDescription { public: RealTestDescription(); RealTestDescription( List &argList, SuiteDescription &argSuite, unsigned argLine, const char *argTestName ); void initialize( List &argList, SuiteDescription &argSuite, unsigned argLine, const char *argTestName ); - + const char *file() const; unsigned line() const; const char *testName() const; @@ -30,9 +29,9 @@ TestSuite *suite() const; bool setUp(); - void run(); + void run(); bool tearDown(); - + private: RealTestDescription( const RealTestDescription & ); RealTestDescription &operator=( const RealTestDescription & ); @@ -49,7 +48,7 @@ public: RealSuiteDescription(); RealSuiteDescription( const char *argFile, unsigned argLine, const char *argSuiteName, List &argTests ); - + void initialize( const char *argFile, unsigned argLine, const char *argSuiteName, List &argTests ); const char *file() const; @@ -60,17 +59,17 @@ const TestDescription *firstTest() const; SuiteDescription *next(); const SuiteDescription *next() const; - + unsigned numTests() const; const TestDescription &testDescription( unsigned i ) const; void activateAllTests(); bool leaveOnly( const char *testName ); - + private: RealSuiteDescription( const RealSuiteDescription & ); RealSuiteDescription &operator=( const RealSuiteDescription & ); - + const char *_file; unsigned _line; const char *_suiteName; @@ -95,13 +94,13 @@ bool setUp(); bool tearDown(); - + private: StaticSuiteDescription( const StaticSuiteDescription & ); StaticSuiteDescription &operator=( const StaticSuiteDescription & ); void doInitialize( TestSuite &argSuite ); - + TestSuite *_suite; }; @@ -123,7 +122,7 @@ private: void doInitialize( unsigned argCreateLine, unsigned argDestroyLine ); }; - + template<class S> class CXXTEST_EXPORT DynamicSuiteDescription : public CommonDynamicSuiteDescription { @@ -210,7 +209,7 @@ const SuiteDescription &suiteDescription( unsigned i ) const; void activateAllTests(); bool leaveOnly( const char *suiteName, const char *testName = 0 ); - + bool setUp(); bool tearDown(); static void reportError( const char *message ); @@ -218,7 +217,7 @@ void activateAllTests(); bool leaveOnly( const char *suiteName, const char *testName = 0 ); -} +CXXTEST_NS_END #endif // __cxxtest__RealDescriptions_h__ Index: ValueTraits.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/ValueTraits.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- ValueTraits.h 10 Dec 2005 15:13:16 -0000 1.3 +++ ValueTraits.h 17 Mar 2006 08:41:51 -0000 1.4 @@ -18,8 +18,7 @@ # define CXXTEST_TEMPLATE_INSTANTIATION template<> #endif // _CXXTEST_OLD_TEMPLATE_SYNTAX -namespace CxxTest -{ +CXXTEST_NS_START // // This is how we use the value traits // @@ -338,7 +337,7 @@ CXXTEST_COPY_TRAITS( const float, const double ); CXXTEST_COPY_CONST_TRAITS( float ); #endif // !CXXTEST_USER_VALUE_TRAITS -} +CXXTEST_NS_END #ifdef _CXXTEST_HAVE_STD # include <cxxtest/StdValueTraits.h> @@ -348,8 +347,7 @@ // CXXTEST_ENUM_TRAITS // #define CXXTEST_ENUM_TRAITS( TYPE, VALUES ) \ - namespace CxxTest \ - { \ + CXXTEST_NS_START \ CXXTEST_TEMPLATE_INSTANTIATION \ class ValueTraits<TYPE> \ { \ @@ -369,7 +367,7 @@ } \ } \ }; \ - } + CXXTEST_NS_END #define CXXTEST_ENUM_MEMBER( MEMBER ) \ case MEMBER: return #MEMBER; Index: TeeListener.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/TeeListener.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- TeeListener.h 10 Dec 2005 15:13:16 -0000 1.2 +++ TeeListener.h 17 Mar 2006 08:41:51 -0000 1.3 @@ -8,8 +8,7 @@ #include <cxxtest/TestListener.h> #include <cxxtest/TestListener.h> -namespace CxxTest -{ +CXXTEST_NS_START class TeeListener : public TestListener { public: @@ -176,7 +175,7 @@ TestListener *_first, *_second; TestListener _dummy; }; -} +CXXTEST_NS_END #endif // __cxxtest__TeeListener_h__ Index: Mock.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/Mock.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Mock.h 9 Dec 2005 15:57:51 -0000 1.1 +++ Mock.h 17 Mar 2006 08:41:51 -0000 1.2 @@ -12,15 +12,14 @@ // MockTraits: What to return when no mock object has been created // #define __CXXTEST_MOCK__TRAITS \ - namespace CXXTEST_MOCK_NAMESPACE \ - { \ + CXXTEST_NS_START \ template<class T> \ class MockTraits \ { \ public: \ static T defaultValue() { return 0; } \ }; \ - }; + CXXTEST_NS_END // // extern "C" when needed @@ -35,7 +34,7 @@ // Prototypes: For "normal" headers // #define __CXXTEST_MOCK__PROTOTYPE( MOCK, TYPE, NAME, ARGS, REAL, CALL ) \ - namespace CXXTEST_MOCK_NAMESPACE { TYPE NAME ARGS; } + CXXTEST_NS_START TYPE NAME ARGS; CXXTEST_NS_END #define __CXXTEST_MOCK_VOID__PROTOTYPE( MOCK, NAME, ARGS, REAL, CALL ) \ __CXXTEST_MOCK__PROTOTYPE( MOCK, void, NAME, ARGS, REAL, CALL ) @@ -50,7 +49,7 @@ // Class declarations: For test files // #define __CXXTEST_MOCK__CLASS_DECLARATION( MOCK, TYPE, NAME, ARGS, REAL, CALL ) \ - namespace CXXTEST_MOCK_NAMESPACE { \ + CXXTEST_NS_START \ class Base_##MOCK : public CxxTest::Link \ { \ public: \ @@ -78,13 +77,13 @@ public: \ TYPE NAME ARGS; \ }; \ - } + CXXTEST_NS_END #define __CXXTEST_MOCK_VOID__CLASS_DECLARATION( MOCK, NAME, ARGS, REAL, CALL ) \ __CXXTEST_MOCK__CLASS_DECLARATION( MOCK, void, NAME, ARGS, REAL, CALL ) #define __CXXTEST_SUPPLY__CLASS_DECLARATION( MOCK, TYPE, NAME, ARGS, REAL, CALL ) \ - namespace CXXTEST_MOCK_NAMESPACE { \ + CXXTEST_NS_START \ class Base_##MOCK : public CxxTest::Link \ { \ public: \ @@ -106,7 +105,7 @@ public: \ TYPE NAME ARGS; \ }; \ - } + CXXTEST_NS_END #define __CXXTEST_SUPPLY_VOID__CLASS_DECLARATION( MOCK, NAME, ARGS, REAL, CALL ) \ __CXXTEST_SUPPLY__CLASS_DECLARATION( MOCK, void, NAME, ARGS, REAL, CALL ) @@ -115,7 +114,7 @@ // Class implementation: For test source files // #define __CXXTEST_MOCK__COMMON_CLASS_IMPLEMENTATION( MOCK, NAME ) \ - namespace CXXTEST_MOCK_NAMESPACE { \ + CXXTEST_NS_START \ \ CxxTest::List Base_##MOCK::_list = { 0, 0 }; \ \ @@ -130,11 +129,11 @@ static _Unimplemented_##MOCK unimplemented; \ return *(Base_##MOCK *)_list.tail(); \ } \ - } + CXXTEST_NS_END #define __CXXTEST_MOCK__CLASS_IMPLEMENTATION( MOCK, TYPE, NAME, ARGS, REAL, CALL ) \ __CXXTEST_MOCK__COMMON_CLASS_IMPLEMENTATION( MOCK, NAME ) \ - namespace CXXTEST_MOCK_NAMESPACE { \ + CXXTEST_NS_START \ TYPE Real_##MOCK::NAME ARGS \ { \ return REAL CALL; \ @@ -152,11 +151,11 @@ { \ return Base_##MOCK::current().NAME CALL; \ } \ - } + CXXTEST_NS_END #define __CXXTEST_MOCK_VOID__CLASS_IMPLEMENTATION( MOCK, NAME, ARGS, REAL, CALL ) \ __CXXTEST_MOCK__COMMON_CLASS_IMPLEMENTATION( MOCK, NAME ) \ - namespace CXXTEST_MOCK_NAMESPACE { \ + CXXTEST_NS_START \ void Real_##MOCK::NAME ARGS \ { \ REAL CALL; \ @@ -173,11 +172,11 @@ { \ Base_##MOCK::current().NAME CALL; \ } \ - } + CXXTEST_NS_END #define __CXXTEST_SUPPLY__CLASS_IMPLEMENTATION( MOCK, TYPE, NAME, ARGS, REAL, CALL ) \ __CXXTEST_MOCK__COMMON_CLASS_IMPLEMENTATION( MOCK, NAME ) \ - namespace CXXTEST_MOCK_NAMESPACE { \ + CXXTEST_NS_START \ TYPE _Unimplemented_##MOCK::NAME ARGS \ { \ while ( false ) \ @@ -185,7 +184,7 @@ __CXXTEST_MOCK_UNIMPLEMENTED( NAME, ARGS ); \ return MockTraits<TYPE>::defaultValue(); \ } \ - } \ + CXXTEST_NS_END \ \ TYPE REAL ARGS \ { \ @@ -194,14 +193,14 @@ #define __CXXTEST_SUPPLY_VOID__CLASS_IMPLEMENTATION( MOCK, NAME, ARGS, REAL, CALL ) \ __CXXTEST_MOCK__COMMON_CLASS_IMPLEMENTATION( MOCK, NAME ) \ - namespace CXXTEST_MOCK_NAMESPACE { \ + CXXTEST_NS_START \ void _Unimplemented_##MOCK::NAME ARGS \ { \ while ( false ) \ NAME CALL; \ __CXXTEST_MOCK_UNIMPLEMENTED( NAME, ARGS ); \ } \ - } \ + CXXTEST_NS_END \ \ void REAL ARGS \ { \ @@ -276,10 +275,10 @@ // Real source file: "Real" implementations // #define CXXTEST_MOCK( MOCK, TYPE, NAME, ARGS, REAL, CALL ) \ - namespace CXXTEST_MOCK_NAMESPACE { TYPE NAME ARGS { return REAL CALL; } } + CXXTEST_NS_START TYPE NAME ARGS { return REAL CALL; } CXXTEST_NS_END #define CXXTEST_MOCK_VOID( MOCK, NAME, ARGS, REAL, CALL ) \ - namespace CXXTEST_MOCK_NAMESPACE { void NAME ARGS { REAL CALL; } } + CXXTEST_NS_START void NAME ARGS { REAL CALL; } CXXTEST_NS_END #else // @@ -337,14 +336,13 @@ // The default value of 0 usually works, but some cases may need this. // #define CXXTEST_MOCK_DEFAULT_VALUE( TYPE, VALUE ) \ - namespace CXXTEST_MOCK_NAMESPACE \ - { \ + CXXTEST_NS_START \ template<> \ class MockTraits<TYPE> \ { \ public: \ static TYPE defaultValue() { return VALUE; } \ }; \ - } + CXXTEST_NS_END #endif // __cxxtest__Mock_h__ Index: StdioFilePrinter.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/StdioFilePrinter.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- StdioFilePrinter.h 10 Dec 2005 15:13:16 -0000 1.2 +++ StdioFilePrinter.h 17 Mar 2006 08:41:51 -0000 1.3 @@ -11,8 +11,7 @@ #include <cxxtest/ErrorFormatter.h> #include <stdio.h> -namespace CxxTest -{ +CXXTEST_NS_START class StdioFilePrinter : public ErrorFormatter { public: @@ -36,6 +35,6 @@ OutputStream &operator<<( Manipulator m ) { return OutputStream::operator<<( m ); } }; }; -} +CXXTEST_NS_END #endif // __cxxtest__StdioFilePrinter_h__ Index: StdValueTraits.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/StdValueTraits.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- StdValueTraits.h 18 Dec 2005 16:56:22 -0000 1.3 +++ StdValueTraits.h 17 Mar 2006 08:41:51 -0000 1.4 @@ -18,8 +18,7 @@ #ifndef CXXTEST_USER_VALUE_TRAITS -namespace CxxTest -{ +CXXTEST_NS_START // // NOTE: This should have been // template<class Char, class Traits, class Allocator> @@ -226,7 +225,7 @@ } }; #endif // _CXXTEST_PARTIAL_TEMPLATE_SPECIALIZATION -} +CXXTEST_NS_END #endif // CXXTEST_USER_VALUE_TRAITS Index: TestSuite.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/TestSuite.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- TestSuite.h 17 Dec 2005 18:38:44 -0000 1.2 +++ TestSuite.h 17 Mar 2006 08:41:51 -0000 1.3 @@ -16,8 +16,7 @@ # include <stdexcept> #endif // _CXXTEST_HAVE_STD -namespace CxxTest -{ +CXXTEST_NS_START class CXXTEST_EXPORT TestSuite { public: @@ -143,7 +142,7 @@ template<class X, class Y, class R> void doAssertRelation( const char *file, unsigned line, - const char *rExpr, const R &r, + const char *rExpr, const R &r, const char *xExpr, X x, const char *yExpr, Y y, const char *message ) @@ -172,7 +171,7 @@ if ( !delta( x, y, d ) ) { if ( message ) tracker().failedTest( file, line, message ); - + tracker().failedAssertDelta( file, line, xExpr, yExpr, dExpr, TS_AS_STRING(x), TS_AS_STRING(y), TS_AS_STRING(d) ); TS_ABORT(); @@ -183,7 +182,7 @@ const char *expr, const char *type, bool otherThrown, const char *message ); - + void doFailAssertThrowsNot( const char *file, unsigned line, const char *expression, const char *message ); @@ -231,23 +230,23 @@ // TS_ASSERT # define ___ETS_ASSERT(f,l,e,m) { if ( !(e) ) CxxTest::doFailAssert( (f), (l), #e, (m) ); } # define ___TS_ASSERT(f,l,e,m) { _TS_TRY { ___ETS_ASSERT(f,l,e,m); } __TS_CATCH(f,l) } - + # define _ETS_ASSERT(f,l,e) ___ETS_ASSERT(f,l,e,0) # define _TS_ASSERT(f,l,e) ___TS_ASSERT(f,l,e,0) - + # define ETS_ASSERT(e) _ETS_ASSERT(__FILE__,__LINE__,e) # define TS_ASSERT(e) _TS_ASSERT(__FILE__,__LINE__,e) - + # define _ETSM_ASSERT(f,l,m,e) ___ETS_ASSERT(f,l,e,TS_AS_STRING(m) ) # define _TSM_ASSERT(f,l,m,e) ___TS_ASSERT(f,l,e,TS_AS_STRING(m) ) # define ETSM_ASSERT(m,e) _ETSM_ASSERT(__FILE__,__LINE__,m,e) # define TSM_ASSERT(m,e) _TSM_ASSERT(__FILE__,__LINE__,m,e) - + // TS_ASSERT_EQUALS # define ___ETS_ASSERT_EQUALS(f,l,x,y,m) CxxTest::doAssertEquals( (f), (l), #x, (x), #y, (y), (m) ) # define ___TS_ASSERT_EQUALS(f,l,x,y,m) { _TS_TRY { ___ETS_ASSERT_EQUALS(f,l,x,y,m); } __TS_CATCH(f,l) } - + # define _ETS_ASSERT_EQUALS(f,l,x,y) ___ETS_ASSERT_EQUALS(f,l,x,y,0) # define _TS_ASSERT_EQUALS(f,l,x,y) ___TS_ASSERT_EQUALS(f,l,x,y,0) @@ -263,7 +262,7 @@ // TS_ASSERT_SAME_DATA # define ___ETS_ASSERT_SAME_DATA(f,l,x,y,s,m) CxxTest::doAssertSameData( (f), (l), #x, (x), #y, (y), #s, (s), (m) ) # define ___TS_ASSERT_SAME_DATA(f,l,x,y,s,m) { _TS_TRY { ___ETS_ASSERT_SAME_DATA(f,l,x,y,s,m); } __TS_CATCH(f,l) } - + # define _ETS_ASSERT_SAME_DATA(f,l,x,y,s) ___ETS_ASSERT_SAME_DATA(f,l,x,y,s,0) # define _TS_ASSERT_SAME_DATA(f,l,x,y,s) ___TS_ASSERT_SAME_DATA(f,l,x,y,s,0) @@ -365,7 +364,7 @@ // TS_ASSERT_DELTA # define ___ETS_ASSERT_DELTA(f,l,x,y,d,m) CxxTest::doAssertDelta( (f), (l), #x, (x), #y, (y), #d, (d), (m) ) # define ___TS_ASSERT_DELTA(f,l,x,y,d,m) { _TS_TRY { ___ETS_ASSERT_DELTA(f,l,x,y,d,m); } __TS_CATCH(f,l) } - + # define _ETS_ASSERT_DELTA(f,l,x,y,d) ___ETS_ASSERT_DELTA(f,l,x,y,d,0) # define _TS_ASSERT_DELTA(f,l,x,y,d) ___TS_ASSERT_DELTA(f,l,x,y,d,0) @@ -494,19 +493,19 @@ CXXTEST_COMPARISONS( signed CXXTEST_SMALL, unsigned CXXTEST_BIG, unsigned CXXTEST_BIG ) \ CXXTEST_COMPARISONS( signed CXXTEST_BIG, unsigned CXXTEST_SMALL, unsigned CXXTEST_BIG ) - CXXTEST_SMALL_BIG( char, short ) + CXXTEST_SMALL_BIG( char, short ) CXXTEST_SMALL_BIG( char, int ) CXXTEST_SMALL_BIG( short, int ) CXXTEST_SMALL_BIG( char, long ) CXXTEST_SMALL_BIG( short, long ) CXXTEST_SMALL_BIG( int, long ) - + # ifdef _CXXTEST_LONGLONG CXXTEST_SMALL_BIG( char, _CXXTEST_LONGLONG ) CXXTEST_SMALL_BIG( short, _CXXTEST_LONGLONG ) CXXTEST_SMALL_BIG( int, _CXXTEST_LONGLONG ) CXXTEST_SMALL_BIG( long, _CXXTEST_LONGLONG ) # endif // _CXXTEST_LONGLONG -} +CXXTEST_NS_END #endif // __cxxtest__TestSuite_h__ Index: ErrorFormatter.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/ErrorFormatter.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ErrorFormatter.h 10 Dec 2005 15:13:16 -0000 1.2 +++ ErrorFormatter.h 17 Mar 2006 08:41:51 -0000 1.3 @@ -14,9 +14,8 @@ #include <cxxtest/TestTracker.h> #include <cxxtest/ValueTraits.h> -namespace CxxTest -{ - class OutputStream +CXXTEST_NS_START +class OutputStream { public: virtual ~OutputStream() {} @@ -276,6 +275,6 @@ const char *_preLine; const char *_postLine; }; -} +CXXTEST_NS_END #endif // __cxxtest__ErrorFormatter_h__ Index: RealDescriptions.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/RealDescriptions.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- RealDescriptions.cpp 9 Dec 2005 20:40:42 -0000 1.2 +++ RealDescriptions.cpp 17 Mar 2006 08:41:51 -0000 1.3 @@ -8,8 +8,7 @@ #include <cxxtest/RealDescriptions.h> -namespace CxxTest -{ +CXXTEST_NS_START List RealSuiteDescription::_suites = { 0, 0 }; RealTestDescription::RealTestDescription() @@ -307,7 +306,7 @@ { return RealWorldDescription().leaveOnly( suiteName, testName ); } -} +CXXTEST_NS_END #endif // __cxxtest__RealDescriptions_cpp__ Index: Descriptions.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/Descriptions.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- Descriptions.cpp 2 Jan 2006 20:28:33 -0000 1.4 +++ Descriptions.cpp 17 Mar 2006 08:41:50 -0000 1.5 @@ -4,8 +4,7 @@ #include <cxxtest/Descriptions.h> #include <cxxtest/ValueTraits.h> -namespace CxxTest -{ +CXXTEST_NS_START TestDescription::~TestDescription() {} SuiteDescription::~SuiteDescription() {} WorldDescription::~WorldDescription() {} @@ -54,7 +53,8 @@ return s; } #endif // _CXXTEST_FACTOR -} + +CXXTEST_NS_END #endif // __cxxtest__Descriptions_cpp__ Index: StdioPrinter.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/StdioPrinter.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- StdioPrinter.h 9 Dec 2005 15:57:51 -0000 1.1 +++ StdioPrinter.h 17 Mar 2006 08:41:51 -0000 1.2 @@ -9,14 +9,13 @@ #include <cxxtest/StdioFilePrinter.h> -namespace CxxTest -{ +CXXTEST_NS_START class StdioPrinter : public StdioFilePrinter { public: StdioPrinter( FILE *o = stdout, const char *preLine = ":", const char *postLine = "" ) : StdioFilePrinter( o, preLine, postLine ) {} }; -} +CXXTEST_NS_END #endif // __cxxtest__StdioPrinter_h__ Index: DummyDescriptions.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/DummyDescriptions.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- DummyDescriptions.h 17 Dec 2005 18:38:44 -0000 1.2 +++ DummyDescriptions.h 17 Mar 2006 08:41:50 -0000 1.3 @@ -8,13 +8,12 @@ #include <cxxtest/Descriptions.h> #include <cxxtest/Flags.h> -namespace CxxTest -{ +CXXTEST_NS_START class CXXTEST_EXPORT DummyTestDescription : public TestDescription { public: DummyTestDescription(); - + const char *file() const; unsigned line() const; const char *testName() const; @@ -44,7 +43,7 @@ const TestDescription *firstTest() const; void activateAllTests(); bool leaveOnly( const char * /*testName*/ ); - + bool setUp(); bool tearDown(); @@ -56,7 +55,7 @@ { public: DummyWorldDescription(); - + unsigned numSuites( void ) const; unsigned numTotalTests( void ) const; const SuiteDescription &suiteDescription( unsigned ) const; @@ -64,14 +63,14 @@ const SuiteDescription *firstSuite() const; void activateAllTests(); bool leaveOnly( const char * /*suiteName*/, const char * /*testName*/ = 0 ); - + bool setUp(); bool tearDown(); private: DummySuiteDescription _suite; }; -} +CXXTEST_NS_END #endif // __cxxtest__DummyDescriptions_h__ Index: TestTracker.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/TestTracker.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- TestTracker.cpp 10 Dec 2005 15:13:16 -0000 1.2 +++ TestTracker.cpp 17 Mar 2006 08:41:51 -0000 1.3 @@ -3,8 +3,7 @@ #include <cxxtest/TestTracker.h> -namespace CxxTest -{ +CXXTEST_NS_START bool TestTracker::_created = false; TestTracker::TestTracker() @@ -243,6 +242,6 @@ ++ _failedSuites; } } -} +CXXTEST_NS_END #endif // __cxxtest__TestTracker_cpp__ Index: Flags.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/Flags.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- Flags.h 29 Dec 2005 12:07:36 -0000 1.4 +++ Flags.h 17 Mar 2006 08:41:51 -0000 1.5 @@ -29,6 +29,23 @@ ////////////////////////////////////////////////// // +#ifdef CXXTEST_NO_NAMESPACE +# define CXXTEST_ANON_NS_START /* nothing */ +# define CXXTEST_NS /* nothing */ +# define CXXTEST_NS_START /* nothing */ +# define CXXTEST_NS_END /* nothing */ +# define USING_NAMESPACE_CXXTEST /* nothing */ +#else +# define CXXTEST_ANON_NS_START namespace { +# define CXXTEST_NS CxxTest +# define CXXTEST_NS_START namespace CxxTest { +# define CXXTEST_NS_END } +# define USING_NAMESPACE_CXXTEST using namespace CxxTest; +#endif + +////////////////////////////////////////////////// +// + #ifdef CXXTEST_USE_MINI_STL #define CXXTEST_STRING_H <ministl/string> @@ -40,7 +57,7 @@ #define CXXTEST_FUNCTION_H <ministl/function> // namespace ministl -#define CXXTEST_STL ministl +#define CXXTEST_STL MINISTL_NS #define CXXTEST_ALTERNATIVE_STL #else Index: GlobalFixture.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/GlobalFixture.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- GlobalFixture.h 17 Dec 2005 18:38:44 -0000 1.2 +++ GlobalFixture.h 17 Mar 2006 08:41:51 -0000 1.3 @@ -4,8 +4,7 @@ #include <cxxtest/LinkedList.h> #include <cxxtest/Flags.h> -namespace CxxTest -{ +CXXTEST_NS_START class CXXTEST_EXPORT GlobalFixture : public Link { public: @@ -25,7 +24,7 @@ private: static List _list; }; -} +CXXTEST_NS_END #endif // __cxxtest__GlobalFixture_h__ |
From: Ewald A. <ewa...@us...> - 2006-03-17 08:41:02
|
Update of /cvsroot/mockpp/mockpp/3party/ministl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12114/3party/ministl Modified Files: algo.h algorithm basic_string.h bool.h defalloc.h function.h functional list list.h map map.h ministl.h multimap pair pair.h raw_iterator.h reverse_iterator.h set set.h simplevec.h string vector vector.h Log Message: optionally disable ministl namespace Index: function.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/ministl/function.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- function.h 29 Dec 2005 19:29:49 -0000 1.4 +++ function.h 17 Mar 2006 08:40:52 -0000 1.5 @@ -23,4 +23,4 @@ */ #include <ministl/functional> -//using namespace ministl; +//USING_NAMESPACE_MINISTL Index: set =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/ministl/set,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- set 29 Dec 2005 19:29:49 -0000 1.5 +++ set 17 Mar 2006 08:40:52 -0000 1.6 @@ -33,8 +33,7 @@ //#include <ministl/bool.h> -namespace ministl -{ +MINISTL_NS_START template<class vT, class cT> class set; @@ -150,7 +149,7 @@ } }; -template<class valT, class cmpT = ministl::less<valT> > +template<class valT, class cmpT = MINISTL_NS::less<valT> > class set { public: @@ -389,7 +388,7 @@ } -} // namespace ministl +MINISTL_NS_END #endif // __ministl_set_h__ Index: functional =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/ministl/functional,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- functional 29 Dec 2005 19:29:49 -0000 1.2 +++ functional 17 Mar 2006 08:40:52 -0000 1.3 @@ -19,8 +19,7 @@ //#include <ministl/bool.h> -namespace ministl -{ +MINISTL_NS_START #if 0 template <class T1, class T2> @@ -330,7 +329,7 @@ } -} // namespace ministl +MINISTL_NS_END #endif Index: basic_string.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/ministl/basic_string.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- basic_string.h 29 Dec 2005 19:29:49 -0000 1.3 +++ basic_string.h 17 Mar 2006 08:40:52 -0000 1.4 @@ -23,8 +23,8 @@ */ #include <ministl/string> -using ministl::string; -using ministl::cstring; +USING_MINISTL_XX(string) +USING_MINISTL_XX(cstring) #ifdef MOCKPP_UNICODE -using ministl::wstring; +USING_MINISTL_XX(wstring) #endif Index: algo.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/ministl/algo.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- algo.h 29 Dec 2005 19:29:49 -0000 1.4 +++ algo.h 17 Mar 2006 08:40:52 -0000 1.5 @@ -23,4 +23,4 @@ */ #include <ministl/algorithm> -//using namespace ministl; +//USING_NAMESPACE_MINISTL Index: simplevec.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/ministl/simplevec.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- simplevec.h 29 Dec 2005 19:29:49 -0000 1.4 +++ simplevec.h 17 Mar 2006 08:40:52 -0000 1.5 @@ -33,8 +33,7 @@ #include <ministl/defalloc.h> -namespace ministl -{ +MINISTL_NS_START template<class T> @@ -286,7 +285,7 @@ } -} // namespace ministl +MINISTL_NS_END #endif Index: ministl.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/ministl/ministl.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- ministl.h 29 Dec 2005 19:29:49 -0000 1.4 +++ ministl.h 17 Mar 2006 08:40:52 -0000 1.5 @@ -3,7 +3,7 @@ * MICO --- a free CORBA implementation * Copyright (C) 1997-98 Kay Roemer & Arno Puder * - * Copyright (C) 2005-2006 Ewald Arnold mockpp at ewald-arnold dot de + * Copyright (C) 2005-2006 Ewald Arnold MINISTL at ewald-arnold dot de * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -23,6 +23,8 @@ * mi...@in... */ +//#define MINISTL_NO_NAMESPACE + #ifndef __ministl_ministl_h__ #define __ministl_ministl_h__ @@ -36,9 +38,23 @@ #define ministl_assert(exp) assert(exp) #endif +#ifdef MINISTL_NO_NAMESPACE +# define MINISTL_ANON_NS_START /* nothing */ +# define MINISTL_NS /* nothing */ +# define MINISTL_NS_START /* nothing */ +# define MINISTL_NS_END /* nothing */ +# define USING_NAMESPACE_MINISTL /* nothing */ +# define USING_MINISTL_XX(xx) /* nothing */ +#else +# define MINISTL_ANON_NS_START namespace { +# define MINISTL_NS ministl +# define MINISTL_NS_START namespace ministl { +# define MINISTL_NS_END } +# define USING_NAMESPACE_MINISTL using namespace ministl; +# define USING_MINISTL_XX(xx) using ministl::xx; +#endif -namespace ministl -{ +MINISTL_NS_START static inline long _min_ (long x, long y) @@ -52,7 +68,7 @@ } -} // namespace ministl +MINISTL_NS_END #endif // __ministl_ministl_h__ Index: list.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/ministl/list.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- list.h 29 Dec 2005 19:29:49 -0000 1.3 +++ list.h 17 Mar 2006 08:40:52 -0000 1.4 @@ -23,4 +23,4 @@ */ #include <ministl/list> -using ministl::list; +USING_MINISTL_XX(list) Index: vector.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/ministl/vector.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- vector.h 29 Dec 2005 19:29:49 -0000 1.3 +++ vector.h 17 Mar 2006 08:40:52 -0000 1.4 @@ -23,4 +23,4 @@ */ #include <ministl/vector> -using ministl::vector; +USING_MINISTL_XX(vector) Index: defalloc.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/ministl/defalloc.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- defalloc.h 29 Dec 2005 19:29:49 -0000 1.6 +++ defalloc.h 17 Mar 2006 08:40:52 -0000 1.7 @@ -20,8 +20,7 @@ #define MINISTL_DEFALLOC_H -namespace ministl -{ +MINISTL_NS_START template <class T> @@ -80,7 +79,7 @@ template<> inline void destroy(float**, float**) {} template<> inline void destroy(double**, double**) {} -} // namespace ministl +MINISTL_NS_END #endif // MINISTL_DEFALLOC_H Index: pair.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/ministl/pair.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- pair.h 29 Dec 2005 19:29:49 -0000 1.3 +++ pair.h 17 Mar 2006 08:40:52 -0000 1.4 @@ -23,4 +23,4 @@ */ #include <ministl/pair> -using ministl::pair; +USING_MINISTL_XX(pair) Index: map =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/ministl/map,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- map 29 Dec 2005 19:29:49 -0000 1.5 +++ map 17 Mar 2006 08:40:52 -0000 1.6 @@ -35,8 +35,7 @@ //#include <ministl/bool.h> -namespace ministl -{ +MINISTL_NS_START template<class kT, class vT, class cT> class map; @@ -168,7 +167,7 @@ } }; -template<class keyT, class valT, class cmpT = ministl::less<keyT> > +template<class keyT, class valT, class cmpT = MINISTL_NS::less<keyT> > class map { public: @@ -442,7 +441,7 @@ } -} // namespace ministl +MINISTL_NS_END #endif // __ministl_map_h__ Index: multimap =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/ministl/multimap,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- multimap 29 Dec 2005 19:29:49 -0000 1.3 +++ multimap 17 Mar 2006 08:40:52 -0000 1.4 @@ -35,8 +35,7 @@ //#include <ministl/bool.h> -namespace ministl -{ +MINISTL_NS_START template<class kT, class vT, class cT> class multimap; @@ -168,7 +167,7 @@ } }; -template<class keyT, class valT, class cmpT = ministl::less<keyT> > +template<class keyT, class valT, class cmpT = MINISTL_NS::less<keyT> > class multimap { public: @@ -480,7 +479,7 @@ } -} // namespace ministl +MINISTL_NS_END #endif // __ministl_multimap_h__ Index: string =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/ministl/string,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- string 29 Dec 2005 19:29:49 -0000 1.7 +++ string 17 Mar 2006 08:40:52 -0000 1.8 @@ -35,8 +35,7 @@ //#include <ostream> -namespace ministl -{ +MINISTL_NS_START // bndchk.h #ifdef BOUNDS_CHECK @@ -361,7 +360,7 @@ basic_string_ref (charT c, size_t rep) _THROW_ALLOC_LENGTH ; - basic_string_ref (const ministl::vector<charT>& vec) _THROW_ALLOC_LENGTH ; + basic_string_ref (const MINISTL_NS::vector<charT>& vec) _THROW_ALLOC_LENGTH ; ~basic_string_ref () _THROW_NONE ; @@ -486,7 +485,7 @@ basic_string (charT c, size_t rep = 1) _THROW_ALLOC_LENGTH ; - basic_string (const ministl::vector<charT>& vec) _THROW_ALLOC_LENGTH ; + basic_string (const MINISTL_NS::vector<charT>& vec) _THROW_ALLOC_LENGTH ; ~basic_string () _THROW_NONE ; @@ -508,9 +507,9 @@ basic_string<charT>& operator+= (charT c) _THROW_ALLOC_LENGTH ; - operator ministl::vector<charT> () const _THROW_ALLOC + operator MINISTL_NS::vector<charT> () const _THROW_ALLOC { - return ministl::vector<charT> (data(), data()+length()); + return MINISTL_NS::vector<charT> (data(), data()+length()); } basic_string<charT>& @@ -1243,7 +1242,7 @@ } template <class charT> -basic_string_ref<charT>::basic_string_ref (const ministl::vector<charT>& vec) +basic_string_ref<charT>::basic_string_ref (const MINISTL_NS::vector<charT>& vec) _THROW_ALLOC_LENGTH { size_t n = vec.size(); @@ -1625,7 +1624,7 @@ } template <class charT> -basic_string<charT>::basic_string (const ministl::vector<charT>& vec) _THROW_ALLOC_LENGTH +basic_string<charT>::basic_string (const MINISTL_NS::vector<charT>& vec) _THROW_ALLOC_LENGTH { reference = new basic_string_ref<charT> (vec); c_str_ptr = 0; @@ -2617,6 +2616,6 @@ } #endif -} // namespace ministl +MINISTL_NS_END #endif Index: bool.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/ministl/bool.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- bool.h 29 Dec 2005 19:29:49 -0000 1.3 +++ bool.h 17 Mar 2006 08:40:52 -0000 1.4 @@ -20,8 +20,7 @@ #else -namespace ministl -{ +MINISTL_NS_START class bool @@ -53,6 +52,9 @@ { return rep; } }; +MINISTL_NS_END + + #undef true #undef false #define true (bool(1)) Index: map.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/ministl/map.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- map.h 29 Dec 2005 19:29:49 -0000 1.4 +++ map.h 17 Mar 2006 08:40:52 -0000 1.5 @@ -24,5 +24,6 @@ #include <ministl/map> #include <ministl/multimap> -using ministl::map; -using ministl::multimap; + +USING_MINISTL_XX(map) +USING_MINISTL_XX(multimap) Index: reverse_iterator.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/ministl/reverse_iterator.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- reverse_iterator.h 29 Dec 2005 19:29:49 -0000 1.3 +++ reverse_iterator.h 17 Mar 2006 08:40:52 -0000 1.4 @@ -31,8 +31,7 @@ #define __ministl__reverse_iterator_h -namespace ministl -{ +MINISTL_NS_START template<typename ITER> @@ -180,7 +179,8 @@ } -} +MINISTL_NS_END + #endif // __ministl__reverse_iterator_h Index: pair =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/ministl/pair,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- pair 1 Dec 2005 18:15:08 -0000 1.3 +++ pair 17 Mar 2006 08:40:52 -0000 1.4 @@ -18,8 +18,7 @@ //#include <ministl/bool.h> -namespace ministl -{ +MINISTL_NS_START template <class T1, class T2> @@ -66,7 +65,7 @@ } -} // namespace ministl +MINISTL_NS_END #endif Index: algorithm =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/ministl/algorithm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- algorithm 29 Dec 2005 19:29:49 -0000 1.3 +++ algorithm 17 Mar 2006 08:40:52 -0000 1.4 @@ -24,7 +24,7 @@ #include <ministl/pair> -namespace ministl { +MINISTL_NS_START template <class InputIterator, class Function> @@ -84,7 +84,7 @@ } -} // namespace ministl +MINISTL_NS_END #endif Index: set.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/ministl/set.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- set.h 29 Dec 2005 19:29:49 -0000 1.3 +++ set.h 17 Mar 2006 08:40:52 -0000 1.4 @@ -23,4 +23,4 @@ */ #include <ministl/set> -using ministl::set; +USING_MINISTL_XX(set) Index: list =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/ministl/list,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- list 29 Dec 2005 19:29:49 -0000 1.4 +++ list 17 Mar 2006 08:40:52 -0000 1.5 @@ -31,8 +31,7 @@ //#include <ministl/bool.h> -namespace ministl -{ +MINISTL_NS_START template<class T> @@ -419,7 +418,7 @@ } -} // namespace ministl +MINISTL_NS_END #endif // __ministl_list_h__ Index: vector =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/ministl/vector,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- vector 29 Dec 2005 19:29:49 -0000 1.6 +++ vector 17 Mar 2006 08:40:52 -0000 1.7 @@ -35,8 +35,7 @@ #include <ministl/reverse_iterator.h> -namespace ministl -{ +MINISTL_NS_START template<class T> @@ -47,8 +46,8 @@ typedef T* iterator; typedef const T* const_iterator; - typedef ministl::reverse_iterator<raw_iterator<T> > reverse_iterator; - typedef ministl::reverse_iterator<raw_iterator<const T> > const_reverse_iterator; + typedef MINISTL_NS::reverse_iterator<raw_iterator<T> > reverse_iterator; + typedef MINISTL_NS::reverse_iterator<raw_iterator<const T> > const_reverse_iterator; typedef std::size_t size_type; @@ -373,7 +372,7 @@ } -} // namespace ministl +MINISTL_NS_END #endif Index: raw_iterator.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/ministl/raw_iterator.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- raw_iterator.h 29 Dec 2005 19:29:49 -0000 1.3 +++ raw_iterator.h 17 Mar 2006 08:40:52 -0000 1.4 @@ -30,8 +30,7 @@ #ifndef __ministl__raw_iterator_h #define __ministl__raw_iterator_h -namespace ministl -{ +MINISTL_NS_START template<typename T> class raw_iterator @@ -170,6 +169,7 @@ } -} // ministl +MINISTL_NS_END + #endif // __ministl__raw_iterator_h |
From: Ewald A. <ewa...@us...> - 2006-03-17 08:41:02
|
Update of /cvsroot/mockpp/mockpp/3party/ministl/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12114/3party/ministl/tests Modified Files: ministl_test.cpp Log Message: optionally disable ministl namespace Index: ministl_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/ministl/tests/ministl_test.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- ministl_test.cpp 29 Dec 2005 19:29:50 -0000 1.7 +++ ministl_test.cpp 17 Mar 2006 08:40:52 -0000 1.8 @@ -56,19 +56,19 @@ { std::cout << "Start map iter-test: \n"; - ministl::map<int, unsigned> mm; - ministl::pair<int, unsigned> p(11, 22u); - mm.insert(ministl::make_pair(11, 22u)); + MINISTL_NS::map<int, unsigned> mm; + MINISTL_NS::pair<int, unsigned> p(11, 22u); + mm.insert(MINISTL_NS::make_pair(11, 22u)); mm.insert(p); mm.insert(p); if (mm.size() != 1) return 1; - mm.insert(ministl::make_pair(111, 222u)); - mm.insert(ministl::make_pair(1111, 2222u)); + mm.insert(MINISTL_NS::make_pair(111, 222u)); + mm.insert(MINISTL_NS::make_pair(1111, 2222u)); - ministl::map<int, unsigned>::iterator fit = mm.begin(); + MINISTL_NS::map<int, unsigned>::iterator fit = mm.begin(); while (fit != mm.end()) { std::cout << "fit++ " << (*fit).first @@ -86,13 +86,13 @@ { std::cout << "Start multimap iter-test: \n"; - ministl::multimap<unsigned, signed> mm; - mm.insert(ministl::make_pair(3u, 2)); - mm.insert(ministl::make_pair(10u, 2)); - mm.insert(ministl::make_pair(1u, 22)); - mm.insert(ministl::make_pair(10u, 22)); - mm.insert(ministl::make_pair<unsigned, signed>(1u, 222)); - mm.insert(ministl::make_pair(2u, 22)); + MINISTL_NS::multimap<unsigned, signed> mm; + mm.insert(MINISTL_NS::make_pair(3u, 2)); + mm.insert(MINISTL_NS::make_pair(10u, 2)); + mm.insert(MINISTL_NS::make_pair(1u, 22)); + mm.insert(MINISTL_NS::make_pair(10u, 22)); + mm.insert(MINISTL_NS::make_pair<unsigned, signed>(1u, 222)); + mm.insert(MINISTL_NS::make_pair(2u, 22)); // lower_bound // upper_bound @@ -100,7 +100,7 @@ if (mm.size() != 6) return 1; - ministl::multimap<unsigned, signed>::iterator fit = mm.begin(); + MINISTL_NS::multimap<unsigned, signed>::iterator fit = mm.begin(); if ((*fit++).first != 1) return 1; if ((*fit++).first != 1) return 1; if ((*fit++).first != 2) return 1; @@ -124,14 +124,14 @@ bool vector_test() { - ministl::vector<unsigned> vv; + MINISTL_NS::vector<unsigned> vv; vv.push_back(1u); vv.push_back(2u); vv.push_back(3u); std::cout << "Start vector iter-test:\n"; - ministl::vector<unsigned>::iterator fit = vv.begin(); + MINISTL_NS::vector<unsigned>::iterator fit = vv.begin(); if (*fit != 1) return 1; @@ -147,7 +147,7 @@ std::cout << "reverse iter-test:\n"; - ministl::vector<unsigned>::reverse_iterator rit = vv.rbegin(); + MINISTL_NS::vector<unsigned>::reverse_iterator rit = vv.rbegin(); if (*rit != 3) return 1; @@ -169,7 +169,7 @@ bool set_test() { - ministl::set<int> ss; + MINISTL_NS::set<int> ss; ss.insert(2); if (ss.size() != 1) return 1; |
From: Ewald A. <ewa...@us...> - 2006-03-15 21:57:16
|
Update of /cvsroot/mockpp/mockpp/mockpp/chaining In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11597/mockpp/chaining Modified Files: ChainableMockMethod0.h ChainableMockMethod1.h ChainableMockMethod2.h ChainableMockMethod3.h ChainableMockMethod4.h ChainableMockMethod5.h ChainableMockMethod6.h CountedChainableMethod.h InvocationN.h gen_chainablemethod_N.pl gen_countchainable_N.pl gen_invocation_N.pl Log Message: cleanup Index: gen_invocation_N.pl =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/gen_invocation_N.pl,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- gen_invocation_N.pl 15 Mar 2006 21:34:02 -0000 1.3 +++ gen_invocation_N.pl 15 Mar 2006 21:56:33 -0000 1.4 @@ -53,7 +53,7 @@ //#include <mockpp/chaining/Invocation.h> -MOCKPP_NS_END +MOCKPP_NS_START "; Index: ChainableMockMethod6.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/ChainableMockMethod6.h,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- ChainableMockMethod6.h 15 Mar 2006 21:34:01 -0000 1.13 +++ ChainableMockMethod6.h 15 Mar 2006 21:56:33 -0000 1.14 @@ -37,7 +37,7 @@ #include <mockpp/chaining/ChainableMockMethod.h> -MOCKPP_NS_END +MOCKPP_NS_START /** Common stuff to set up chainable mock method expectations with 6 parameters. Index: ChainableMockMethod2.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/ChainableMockMethod2.h,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- ChainableMockMethod2.h 15 Mar 2006 21:34:01 -0000 1.15 +++ ChainableMockMethod2.h 15 Mar 2006 21:56:33 -0000 1.16 @@ -37,7 +37,7 @@ #include <mockpp/chaining/ChainableMockMethod.h> -MOCKPP_NS_END +MOCKPP_NS_START /** Common stuff to set up chainable mock method expectations with 2 parameters. Index: ChainableMockMethod3.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/ChainableMockMethod3.h,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- ChainableMockMethod3.h 15 Mar 2006 21:34:01 -0000 1.15 +++ ChainableMockMethod3.h 15 Mar 2006 21:56:33 -0000 1.16 @@ -37,7 +37,7 @@ #include <mockpp/chaining/ChainableMockMethod.h> -MOCKPP_NS_END +MOCKPP_NS_START /** Common stuff to set up chainable mock method expectations with 3 parameters. Index: gen_countchainable_N.pl =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/gen_countchainable_N.pl,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- gen_countchainable_N.pl 15 Mar 2006 21:34:02 -0000 1.8 +++ gen_countchainable_N.pl 15 Mar 2006 21:56:33 -0000 1.9 @@ -60,7 +60,7 @@ print OUT " -MOCKPP_NS_END +MOCKPP_NS_START #ifndef MOCKPP_COUNTED_WEAKNESS Index: CountedChainableMethod.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/CountedChainableMethod.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- CountedChainableMethod.h 15 Mar 2006 21:34:02 -0000 1.9 +++ CountedChainableMethod.h 15 Mar 2006 21:56:33 -0000 1.10 @@ -42,7 +42,7 @@ #include <mockpp/chaining/ChainableMockMethod6.h> -MOCKPP_NS_END +MOCKPP_NS_START #ifndef MOCKPP_COUNTED_WEAKNESS Index: ChainableMockMethod4.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/ChainableMockMethod4.h,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- ChainableMockMethod4.h 15 Mar 2006 21:34:01 -0000 1.15 +++ ChainableMockMethod4.h 15 Mar 2006 21:56:33 -0000 1.16 @@ -37,7 +37,7 @@ #include <mockpp/chaining/ChainableMockMethod.h> -MOCKPP_NS_END +MOCKPP_NS_START /** Common stuff to set up chainable mock method expectations with 4 parameters. Index: InvocationN.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/InvocationN.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- InvocationN.h 15 Mar 2006 21:34:02 -0000 1.9 +++ InvocationN.h 15 Mar 2006 21:56:33 -0000 1.10 @@ -34,7 +34,7 @@ //#include <mockpp/chaining/Invocation.h> -MOCKPP_NS_END +MOCKPP_NS_START Index: gen_chainablemethod_N.pl =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/gen_chainablemethod_N.pl,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- gen_chainablemethod_N.pl 15 Mar 2006 21:34:02 -0000 1.11 +++ gen_chainablemethod_N.pl 15 Mar 2006 21:56:33 -0000 1.12 @@ -58,7 +58,7 @@ #include <mockpp/chaining/ChainableMockMethod.h> -MOCKPP_NS_END +MOCKPP_NS_START "; Index: ChainableMockMethod5.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/ChainableMockMethod5.h,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- ChainableMockMethod5.h 15 Mar 2006 21:34:01 -0000 1.15 +++ ChainableMockMethod5.h 15 Mar 2006 21:56:33 -0000 1.16 @@ -37,7 +37,7 @@ #include <mockpp/chaining/ChainableMockMethod.h> -MOCKPP_NS_END +MOCKPP_NS_START /** Common stuff to set up chainable mock method expectations with 5 parameters. Index: ChainableMockMethod0.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/ChainableMockMethod0.h,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- ChainableMockMethod0.h 15 Mar 2006 21:34:01 -0000 1.15 +++ ChainableMockMethod0.h 15 Mar 2006 21:56:33 -0000 1.16 @@ -37,7 +37,7 @@ #include <mockpp/chaining/ChainableMockMethod.h> -MOCKPP_NS_END +MOCKPP_NS_START /** Common stuff to set up chainable mock method expectations with 0 parameters. Index: ChainableMockMethod1.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/ChainableMockMethod1.h,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- ChainableMockMethod1.h 15 Mar 2006 21:34:01 -0000 1.15 +++ ChainableMockMethod1.h 15 Mar 2006 21:56:33 -0000 1.16 @@ -37,7 +37,7 @@ #include <mockpp/chaining/ChainableMockMethod.h> -MOCKPP_NS_END +MOCKPP_NS_START /** Common stuff to set up chainable mock method expectations with 1 parameters. |
From: Ewald A. <ewa...@us...> - 2006-03-15 21:57:11
|
Update of /cvsroot/mockpp/mockpp/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11597/mockpp Modified Files: CountParameters.h mockpp.h Log Message: cleanup Index: mockpp.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/mockpp.h,v retrieving revision 1.77 retrieving revision 1.78 diff -u -d -r1.77 -r1.78 --- mockpp.h 15 Mar 2006 21:33:58 -0000 1.77 +++ mockpp.h 15 Mar 2006 21:56:32 -0000 1.78 @@ -5,7 +5,6 @@ ***************************************************************************/ -#define MOCKPP_NO_NAMESPACE /************************************************************************** |
From: Ewald A. <ewa...@us...> - 2006-03-15 21:57:07
|
Update of /cvsroot/mockpp/mockpp/mockpp/constraint In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11597/mockpp/constraint Modified Files: ConstraintSetN.h Log Message: cleanup |
From: Ewald A. <ewa...@us...> - 2006-03-15 21:57:03
|
Update of /cvsroot/mockpp/mockpp/mockpp/visiting In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11597/mockpp/visiting Modified Files: CountedVisitableMethod.h ResponseVector1.h ResponseVector2.h ResponseVector3.h ResponseVector4.h ResponseVector5.h ResponseVector6.h VisitableMockMethod0.h VisitableMockMethod1.h VisitableMockMethod2.h VisitableMockMethod3.h VisitableMockMethod4.h VisitableMockMethod5.h VisitableMockMethod6.h Log Message: cleanup |
From: Ewald A. <ewa...@us...> - 2006-03-15 21:56:46
|
Update of /cvsroot/mockpp/mockpp/mockpp/builder In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11597/mockpp/builder Modified Files: ArgumentsMatchBuilderN.h Log Message: cleanup |
Update of /cvsroot/mockpp/mockpp/mockpp/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv763/mockpp/tests Modified Files: AbstractDynamicChainingMock_test.cpp AbstractInvocationDispatcher_test.cpp And_test.cpp AnyArgumentsMatcher_test.cpp ArgumentsMatchBuilder_test.cpp ArgumentsMatcher_test.cpp AssertMo_test.cpp Assert_test.cpp ChainableMockMethod_1_test.cpp ChainableMockMethod_2_test.cpp ChainableMockMethod_test.cpp ChainableMockObjectPolymorphism_test.cpp ChainableMockObject_1_test.cpp ChainableMockObject_1_void_test.cpp ChainableMockObject_2_test.cpp ChainableMockObject_2_void_test.cpp ChainableMockObject_3_test.cpp ChainableMockObject_3_void_test.cpp ChainableMockObject_4_test.cpp ChainableMockObject_4_void_test.cpp ChainableMockObject_5_test.cpp ChainableMockObject_5_void_test.cpp ChainableMockObject_test.cpp ChainableMockObject_void_test.cpp ChainingMockBuilder_test.cpp ChainingMockObjectSupport_test.cpp ConstraintList_test.cpp ConstraintSet_test.cpp CoreMock_test.cpp CustomStub_test.cpp DefaultResultStub_test.cpp DynamicChainingMockError_test.cpp Exception_test.cpp ExpectationBoundary_test.cpp ExpectationConglomeration_test.cpp ExpectationCounterRange_test.cpp ExpectationCounter_test.cpp ExpectationList_test.cpp ExpectationMap_test.cpp ExpectationSegment_test.cpp ExpectationSet_test.cpp ExpectationValue_test.cpp FIFOInvocationDispatcher_test.cpp Formatter_test.cpp IncCounter.h InvocationMockerBuilder_test.cpp InvocationMocker_test.cpp Invocation_test.cpp InvokeAtLeastMatcher_test.cpp InvokeAtLeastOnceMatcher_test.cpp InvokeAtMostMatcher_test.cpp InvokeCountMatcher_test.cpp InvokeOnceMatcher_test.cpp InvokedAfterMatcher_test.cpp InvokedBeforeMatcher_test.cpp InvokedRecorder_test.cpp IsAnything_test.cpp IsCloseTo_test.cpp IsEqual_test.cpp IsGreaterOrEqual_test.cpp IsGreaterThan_test.cpp IsInstanceOf_test.cpp IsLessOrEqual_test.cpp IsLessThan_test.cpp IsNot_test.cpp IsNothing_test.cpp IsSame_test.cpp LIFOInvocationDispatcher_test.cpp MatchBuilder_test.cpp MixedMockObject_5_test.cpp MockObject_test.cpp MyBuilderNamespace.h MyMatchBuilder.h NoArgumentsMatcher_test.cpp NoException_test.cpp Or_test.cpp OutBound_test.cpp ResponseVector_test.cpp ReturnObjectList_test.cpp ReturnStub_test.cpp StringContains_test.cpp StringEndsWith_test.cpp StringStartsWith_test.cpp StubBuilder_test.cpp StubSequence_test.cpp TestFailureMatcher_test.cpp TestFailureStub_test.cpp ThrowStub_test.cpp ThrowableList_test.cpp Throwable_test.cpp TimeServer_test.cpp TrackingCounter_test.cpp TypelessStubSequence_test.cpp UnlimitedMatcher_test.cpp Verifiable_test.cpp VerifyingTestCaller_test.cpp VerifyingTestCase_test.cpp VisitableMockMethod_1_test.cpp VisitableMockMethod_2_test.cpp VisitableMockMethod_test.cpp VisitableMockObject_1_test.cpp VisitableMockObject_1_void_test.cpp VisitableMockObject_2_test.cpp VisitableMockObject_2_void_test.cpp VisitableMockObject_3_test.cpp VisitableMockObject_3_void_test.cpp VisitableMockObject_4_test.cpp VisitableMockObject_4_void_test.cpp VisitableMockObject_5_test.cpp VisitableMockObject_5_void_test.cpp VisitableMockObject_template_test.cpp VisitableMockObject_test.cpp VisitableMockObject_void_test.cpp VoidStub_test.cpp classes_ABCDE.cpp classes_ABCDE.h compilecheck.cpp mock_test.cpp mockpp_pti_test.cpp mockpp_test.cpp readability_test.cpp Log Message: optionally disable mockpp namespace Index: readability_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/readability_test.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- readability_test.cpp 29 Dec 2005 19:29:52 -0000 1.6 +++ readability_test.cpp 15 Mar 2006 21:34:08 -0000 1.7 @@ -41,12 +41,12 @@ #include "classes_ABCDE.h" -class MyMixedMockObject : public mockpp::MixedMockObject +class MyMixedMockObject : public MOCKPP_NS::MixedMockObject { public: MyMixedMockObject() - : mockpp::MixedMockObject(MOCKPP_PCHAR("MyMixedMockObjectInstance") , 0) + : MOCKPP_NS::MixedMockObject(MOCKPP_PCHAR("MyMixedMockObjectInstance") , 0) , MOCKPP_CONSTRUCT_MEMBERS_FOR_CHAINABLE5(chain) , MOCKPP_CONSTRUCT_MEMBERS_FOR_VISITABLE5(visit) , MOCKPP_CONSTRUCT_MEMBERS_FOR_VOID_CHAINABLE5(void_chain) @@ -141,7 +141,7 @@ void constraintlist_1() { - mockpp::ConstraintList<MOCKPP_STL::string> list(MOCKPP_PCHAR("ConstraintListInstance")); + MOCKPP_NS::ConstraintList<MOCKPP_STL::string> list(MOCKPP_PCHAR("ConstraintListInstance")); list.addExpected(eq(MOCKPP_STL::string("string"))); MOCKPP_TRY { @@ -158,7 +158,7 @@ void expectationlist_1() { - mockpp::ExpectationList<MOCKPP_STL::string> list(MOCKPP_PCHAR("ExpectationListInstance")); + MOCKPP_NS::ExpectationList<MOCKPP_STL::string> list(MOCKPP_PCHAR("ExpectationListInstance")); list.addExpected(MOCKPP_STL::string("string")); MOCKPP_TRY { @@ -175,7 +175,7 @@ void expectationlist_2() { - mockpp::ExpectationList<MOCKPP_STL::string> list(MOCKPP_PCHAR("ExpectationListInstance") ); + MOCKPP_NS::ExpectationList<MOCKPP_STL::string> list(MOCKPP_PCHAR("ExpectationListInstance") ); list.addExpected(MOCKPP_STL::string("string")); list.addActual(MOCKPP_STL::string("string")); MOCKPP_TRY Index: Or_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/Or_test.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- Or_test.cpp 1 Jan 2006 16:34:48 -0000 1.19 +++ Or_test.cpp 15 Mar 2006 21:34:08 -0000 1.20 @@ -86,9 +86,9 @@ void Or_test::test_describe() { - mockpp::Or<bool> or1 (new mockpp::IsAnything, - new mockpp::IsNothing); - mockpp::String s = MOCKPP_PCHAR("or1?"); + MOCKPP_NS::Or<bool> or1 (new MOCKPP_NS::IsAnything, + new MOCKPP_NS::IsNothing); + MOCKPP_NS::String s = MOCKPP_PCHAR("or1?"); MOCKPP_ASSERT_TRUE(or1.describeTo(s) == MOCKPP_PCHAR("or1?(ANYTHING || NOTHING)")); MOCKPP_ASSERT_TRUE(s == MOCKPP_PCHAR("or1?(ANYTHING || NOTHING)")); } @@ -96,8 +96,8 @@ void Or_test::test_invoke() { - mockpp::Or<int> or1 (new mockpp::IsEqual<int>(1), - new mockpp::IsEqual<int>(5)); + MOCKPP_NS::Or<int> or1 (new MOCKPP_NS::IsEqual<int>(1), + new MOCKPP_NS::IsEqual<int>(5)); MOCKPP_ASSERT_TRUE(or1.eval(1) == true); MOCKPP_ASSERT_TRUE(or1.eval(2) == false); MOCKPP_ASSERT_TRUE(or1.eval(4) == false); Index: TestFailureMatcher_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/TestFailureMatcher_test.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- TestFailureMatcher_test.cpp 1 Jan 2006 16:34:48 -0000 1.17 +++ TestFailureMatcher_test.cpp 15 Mar 2006 21:34:08 -0000 1.18 @@ -78,7 +78,7 @@ void TestFailureMatcher_test::test_invoke() { - mockpp::TestFailureMatcher tfm (MOCKPP_PCHAR("knorxi")); + MOCKPP_NS::TestFailureMatcher tfm (MOCKPP_PCHAR("knorxi")); MOCKPP_TRY { @@ -87,10 +87,10 @@ } #ifndef MOCKPP_NO_EXCEPTIONS - catch(mockpp::AssertionFailedError &x) + catch(MOCKPP_NS::AssertionFailedError &x) { MOCKPP_ASSERT_TRUE(x.getMessage().find(MOCKPP_PCHAR("knorxi")) - != mockpp::String::npos); + != MOCKPP_NS::String::npos); } catch(...) @@ -99,7 +99,7 @@ } #endif - mockpp::String s = MOCKPP_PCHAR("hallo"); + MOCKPP_NS::String s = MOCKPP_PCHAR("hallo"); MOCKPP_ASSERT_TRUE(tfm.describeTo(s) == MOCKPP_PCHAR("halloknorxi")); MOCKPP_ASSERT_TRUE(s == MOCKPP_PCHAR("halloknorxi")); Index: DynamicChainingMockError_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/DynamicChainingMockError_test.cpp,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- DynamicChainingMockError_test.cpp 1 Jan 2006 16:34:47 -0000 1.22 +++ DynamicChainingMockError_test.cpp 15 Mar 2006 21:34:08 -0000 1.23 @@ -40,7 +40,7 @@ -namespace { +MOCKPP_ANON_NS_START class DynamicChainingMockError_test MOCKPP_DERIVE_PUBLIC_UNITFRAMEWORK @@ -84,7 +84,7 @@ template <typename R, typename I> -class AID : public mockpp::AbstractInvocationDispatcher<R, I> +class AID : public MOCKPP_NS::AbstractInvocationDispatcher<R, I> { public: @@ -99,30 +99,30 @@ void DynamicChainingMockError_test::test_describe() { - typedef mockpp::Invocation0 SetterInvocation; + typedef MOCKPP_NS::Invocation0 SetterInvocation; - mockpp::AbstractDynamicChainingMock<int, SetterInvocation> - adc (new mockpp::LIFOInvocationDispatcher<int, SetterInvocation>, MOCKPP_PCHAR("adcm-name"), 0); + MOCKPP_NS::AbstractDynamicChainingMock<int, SetterInvocation> + adc (new MOCKPP_NS::LIFOInvocationDispatcher<int, SetterInvocation>, MOCKPP_PCHAR("adcm-name"), 0); SetterInvocation invoc(MOCKPP_PCHAR("InvocationDummy::setProp")); AID<int, SetterInvocation> dispatcher; - mockpp::DynamicChainingMockError<int, SetterInvocation> + MOCKPP_NS::DynamicChainingMockError<int, SetterInvocation> dcme (&adc, invoc, &dispatcher, MOCKPP_PCHAR("error-description") ); - mockpp::String ref (MOCKPP_PCHAR("adcm-name: error-description\n") + MOCKPP_NS::String ref (MOCKPP_PCHAR("adcm-name: error-description\n") MOCKPP_PCHAR("Invoked: InvocationDummy::setProp()\n") MOCKPP_PCHAR("Allowed: ") MOCKPP_PCHAR("no expectations set")); MOCKPP_ASSERT_TRUE(dcme.getMessage() == ref); - mockpp::String s; + MOCKPP_NS::String s; MOCKPP_ASSERT_TRUE(dcme.writeTo(s) == ref); MOCKPP_ASSERT_TRUE(s == ref); } -} // namespace +MOCKPP_NS_END Index: AbstractDynamicChainingMock_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/AbstractDynamicChainingMock_test.cpp,v retrieving revision 1.41 retrieving revision 1.42 diff -u -d -r1.41 -r1.42 --- AbstractDynamicChainingMock_test.cpp 1 Jan 2006 16:34:47 -0000 1.41 +++ AbstractDynamicChainingMock_test.cpp 15 Mar 2006 21:34:08 -0000 1.42 @@ -44,15 +44,15 @@ -typedef mockpp::Invocation0 GetterInvocation; -typedef mockpp::Invocation0 VoidInvocation; -typedef mockpp::ConstraintSet1<int> CSet1; +typedef MOCKPP_NS::Invocation0 GetterInvocation; +typedef MOCKPP_NS::Invocation0 VoidInvocation; +typedef MOCKPP_NS::ConstraintSet1<int> CSet1; MOCKPP_INVOCATIONMOCKER_PTI_IMPL(VoidInvocation) -namespace { +MOCKPP_ANON_NS_START class AbstractDynamicChainingMock_test MOCKPP_DERIVE_PUBLIC_UNITFRAMEWORK @@ -118,14 +118,14 @@ template <typename R, // Returntype typename I> // Invocation -class ChainingMockDummy : public mockpp::AbstractDynamicChainingMock<R, I> +class ChainingMockDummy : public MOCKPP_NS::AbstractDynamicChainingMock<R, I> { public: - ChainingMockDummy( typename mockpp::InvocationDispatcher<R, I>::AP invocationDispatcher, - const mockpp::String &name, - mockpp::VerifiableList *parent ) - : mockpp::AbstractDynamicChainingMock<R,I>(invocationDispatcher, name, parent) + ChainingMockDummy( typename MOCKPP_NS::InvocationDispatcher<R, I>::AP invocationDispatcher, + const MOCKPP_NS::String &name, + MOCKPP_NS::VerifiableList *parent ) + : MOCKPP_NS::AbstractDynamicChainingMock<R,I>(invocationDispatcher, name, parent) {} R invoke(const I &invocation) @@ -141,13 +141,13 @@ template <typename I> // Invocation -class MatcherDummy : public mockpp::Invokable<int, I> +class MatcherDummy : public MOCKPP_NS::Invokable<int, I> { public: bool match_result; int invocation_result; - mockpp::String describe_value; + MOCKPP_NS::String describe_value; bool enable_except; bool is_invoke; // @@ -165,7 +165,7 @@ is_invoke = true; if (enable_except) - mockpp::assertionFailed(__LINE__, __FILE__, MOCKPP_PCHAR("invoke-fail")); + MOCKPP_NS::assertionFailed(__LINE__, __FILE__, MOCKPP_PCHAR("invoke-fail")); return invocation_result; } @@ -173,10 +173,10 @@ virtual void verify() { if (enable_except) - mockpp::assertionFailed(__LINE__, __FILE__, MOCKPP_PCHAR("dummy-verify")); + MOCKPP_NS::assertionFailed(__LINE__, __FILE__, MOCKPP_PCHAR("dummy-verify")); } - virtual mockpp::String describeTo (mockpp::String &buffer) const + virtual MOCKPP_NS::String describeTo (MOCKPP_NS::String &buffer) const { buffer += describe_value; return buffer; @@ -190,13 +190,13 @@ template <typename I> // Invocation -class VoidMatcherDummy : public mockpp::Invokable<void, I> +class VoidMatcherDummy : public MOCKPP_NS::Invokable<void, I> { public: bool match_result; bool is_invoke; - mockpp::String describe_value; + MOCKPP_NS::String describe_value; bool enable_except; virtual bool matches( const I &/*invocation*/ ) @@ -213,17 +213,17 @@ is_invoke = true; if (enable_except) - mockpp::assertionFailed(__LINE__, __FILE__, MOCKPP_PCHAR("invoke-fail")); + MOCKPP_NS::assertionFailed(__LINE__, __FILE__, MOCKPP_PCHAR("invoke-fail")); } virtual void verify() { if (enable_except) - mockpp::assertionFailed(__LINE__, __FILE__, MOCKPP_PCHAR("dummy-verify")); + MOCKPP_NS::assertionFailed(__LINE__, __FILE__, MOCKPP_PCHAR("dummy-verify")); } - virtual mockpp::String describeTo (mockpp::String &buffer) const + virtual MOCKPP_NS::String describeTo (MOCKPP_NS::String &buffer) const { buffer += describe_value; return buffer; @@ -240,27 +240,27 @@ void AbstractDynamicChainingMock_test::test_describer() { #if !defined(__BORLANDC__) && ((__GNUC__ >= 3) /* || defined(_MSC_VER) */) // @todo make compiling - mockpp::AbstractDynamicChainingMock<int, GetterInvocation>::Describer desc; + MOCKPP_NS::AbstractDynamicChainingMock<int, GetterInvocation>::Describer desc; MOCKPP_ASSERT_TRUE(desc.hasDescription() == false); - mockpp::String s; - mockpp::InvocationMocker<int, GetterInvocation>::List matchers; + MOCKPP_NS::String s; + MOCKPP_NS::InvocationMocker<int, GetterInvocation>::List matchers; MOCKPP_ASSERT_TRUE(desc.describeTo(s, matchers, - mockpp::returnValue<int>(1).get(), - mockpp::String(MOCKPP_PCHAR("name")) ) == MOCKPP_PCHAR("") ); + MOCKPP_NS::returnValue<int>(1).get(), + MOCKPP_NS::String(MOCKPP_PCHAR("name")) ) == MOCKPP_PCHAR("") ); #endif } void AbstractDynamicChainingMock_test::test_describe() { - mockpp::AbstractDynamicChainingMock<int, GetterInvocation> + MOCKPP_NS::AbstractDynamicChainingMock<int, GetterInvocation> adc_default ( MOCKPP_PCHAR( "adc-name" ), 0 ); - mockpp::AbstractDynamicChainingMock<int, GetterInvocation> - adc ( new mockpp::LIFOInvocationDispatcher<int, GetterInvocation>, MOCKPP_PCHAR( "adc-name" ), 0 ); + MOCKPP_NS::AbstractDynamicChainingMock<int, GetterInvocation> + adc ( new MOCKPP_NS::LIFOInvocationDispatcher<int, GetterInvocation>, MOCKPP_PCHAR( "adc-name" ), 0 ); MOCKPP_ASSERT_TRUE( adc.toString() == MOCKPP_PCHAR( "adc-name" ) ); MOCKPP_ASSERT_TRUE( adc.getMockName() == MOCKPP_PCHAR( "adc-name" ) ); @@ -269,11 +269,11 @@ void AbstractDynamicChainingMock_test::test_void_describe() { - mockpp::AbstractDynamicChainingMock<void, VoidInvocation> + MOCKPP_NS::AbstractDynamicChainingMock<void, VoidInvocation> adc_default ( MOCKPP_PCHAR( "adc-name" ), 0 ); - mockpp::AbstractDynamicChainingMock<void, VoidInvocation> - adc ( new mockpp::LIFOInvocationDispatcher<void, VoidInvocation>, MOCKPP_PCHAR( "adc-name" ), 0 ); + MOCKPP_NS::AbstractDynamicChainingMock<void, VoidInvocation> + adc ( new MOCKPP_NS::LIFOInvocationDispatcher<void, VoidInvocation>, MOCKPP_PCHAR( "adc-name" ), 0 ); MOCKPP_ASSERT_TRUE( adc.toString() == MOCKPP_PCHAR( "adc-name" ) ); MOCKPP_ASSERT_TRUE( adc.getMockName() == MOCKPP_PCHAR( "adc-name" ) ); @@ -283,7 +283,7 @@ void AbstractDynamicChainingMock_test::test_verify() { ChainingMockDummy<int, GetterInvocation> - cmd (new mockpp::LIFOInvocationDispatcher<int, GetterInvocation>, MOCKPP_PCHAR( "adc-name" ), 0 ); + cmd (new MOCKPP_NS::LIFOInvocationDispatcher<int, GetterInvocation>, MOCKPP_PCHAR( "adc-name" ), 0 ); MatcherDummy<GetterInvocation> *md1 = new MatcherDummy<GetterInvocation>; cmd.addInvokable(md1); @@ -298,10 +298,10 @@ MOCKPP_ASSERT_TRUE_MESSAGE(MOCKPP_PCHAR("did not throw the exception"), false); } #ifndef MOCKPP_NO_EXCEPTIONS - catch (mockpp::AssertionFailedError &ex ) + catch (MOCKPP_NS::AssertionFailedError &ex ) { - MOCKPP_ASSERT_TRUE(ex.getMessage().find(MOCKPP_PCHAR("dummy-verify")) != mockpp::String::npos ); - MOCKPP_ASSERT_TRUE(ex.getMessage().find(MOCKPP_PCHAR("adc-name")) != mockpp::String::npos ); + MOCKPP_ASSERT_TRUE(ex.getMessage().find(MOCKPP_PCHAR("dummy-verify")) != MOCKPP_NS::String::npos ); + MOCKPP_ASSERT_TRUE(ex.getMessage().find(MOCKPP_PCHAR("adc-name")) != MOCKPP_NS::String::npos ); } #endif md1->enable_except = false; @@ -312,7 +312,7 @@ void AbstractDynamicChainingMock_test::test_invocation() { ChainingMockDummy<int, GetterInvocation> - cmd ( new mockpp::LIFOInvocationDispatcher<int, GetterInvocation>, MOCKPP_PCHAR( "adc-name" ), 0 ); + cmd ( new MOCKPP_NS::LIFOInvocationDispatcher<int, GetterInvocation>, MOCKPP_PCHAR( "adc-name" ), 0 ); GetterInvocation inv(MOCKPP_PCHAR("GetterInvocation")); @@ -320,7 +320,7 @@ md1->invocation_result = 10; md1->enable_except = false; cmd.addInvokable(md1); - cmd.setDefaultStub(mockpp::returnValue<int>(33)); + cmd.setDefaultStub(MOCKPP_NS::returnValue<int>(33)); md1->match_result = false; MOCKPP_ASSERT_TRUE(cmd.invoke(inv) == 33); @@ -343,10 +343,10 @@ MOCKPP_ASSERT_TRUE_MESSAGE(MOCKPP_PCHAR("did not throw the exception"), false); } #ifndef MOCKPP_NO_EXCEPTIONS - catch (mockpp::AssertionFailedError &ex ) + catch (MOCKPP_NS::AssertionFailedError &ex ) { - MOCKPP_ASSERT_TRUE(ex.getMessage().find(MOCKPP_PCHAR("invoke-fail")) != mockpp::String::npos ); - MOCKPP_ASSERT_TRUE(ex.getMessage().find(MOCKPP_PCHAR("adc-name")) != mockpp::String::npos ); + MOCKPP_ASSERT_TRUE(ex.getMessage().find(MOCKPP_PCHAR("invoke-fail")) != MOCKPP_NS::String::npos ); + MOCKPP_ASSERT_TRUE(ex.getMessage().find(MOCKPP_PCHAR("adc-name")) != MOCKPP_NS::String::npos ); } #endif @@ -357,10 +357,10 @@ MOCKPP_ASSERT_TRUE_MESSAGE(MOCKPP_PCHAR("did not throw the exception"), false); } #ifndef MOCKPP_NO_EXCEPTIONS - catch (mockpp::AssertionFailedError &ex ) + catch (MOCKPP_NS::AssertionFailedError &ex ) { - MOCKPP_ASSERT_TRUE(ex.getMessage().find(MOCKPP_PCHAR("invoke-fail")) != mockpp::String::npos ); - MOCKPP_ASSERT_TRUE(ex.getMessage().find(MOCKPP_PCHAR("adc-name")) != mockpp::String::npos ); + MOCKPP_ASSERT_TRUE(ex.getMessage().find(MOCKPP_PCHAR("invoke-fail")) != MOCKPP_NS::String::npos ); + MOCKPP_ASSERT_TRUE(ex.getMessage().find(MOCKPP_PCHAR("adc-name")) != MOCKPP_NS::String::npos ); } #endif @@ -370,7 +370,7 @@ template <typename I> // Invocation -class StoreStub : public mockpp::Stub<void, I> +class StoreStub : public MOCKPP_NS::Stub<void, I> { public: @@ -381,7 +381,7 @@ invoked = true; } - virtual mockpp::String describeTo( mockpp::String &buffer ) const + virtual MOCKPP_NS::String describeTo( MOCKPP_NS::String &buffer ) const { return buffer; } @@ -391,7 +391,7 @@ void AbstractDynamicChainingMock_test::test_void_invocation() { ChainingMockDummy<void, VoidInvocation> - cmd ( new mockpp::LIFOInvocationDispatcher<void, VoidInvocation>, MOCKPP_PCHAR( "adc-name" ), 0 ); + cmd ( new MOCKPP_NS::LIFOInvocationDispatcher<void, VoidInvocation>, MOCKPP_PCHAR( "adc-name" ), 0 ); VoidInvocation inv(MOCKPP_PCHAR("VoidInvocation")); @@ -420,11 +420,11 @@ MOCKPP_ASSERT_TRUE_MESSAGE(MOCKPP_PCHAR("did not throw the exception"), false); } #ifndef MOCKPP_NO_EXCEPTIONS - catch (mockpp::AssertionFailedError &ex ) + catch (MOCKPP_NS::AssertionFailedError &ex ) { - mockpp::String s = ex.getMessage(); - MOCKPP_ASSERT_TRUE(s.find(MOCKPP_PCHAR("invoke-fail")) != mockpp::String::npos ); - MOCKPP_ASSERT_TRUE(s.find(MOCKPP_PCHAR("adc-name")) != mockpp::String::npos ); + MOCKPP_NS::String s = ex.getMessage(); + MOCKPP_ASSERT_TRUE(s.find(MOCKPP_PCHAR("invoke-fail")) != MOCKPP_NS::String::npos ); + MOCKPP_ASSERT_TRUE(s.find(MOCKPP_PCHAR("adc-name")) != MOCKPP_NS::String::npos ); } #endif @@ -435,10 +435,10 @@ MOCKPP_ASSERT_TRUE_MESSAGE(MOCKPP_PCHAR("did not throw the exception"), false); } #ifndef MOCKPP_NO_EXCEPTIONS - catch (mockpp::AssertionFailedError &ex ) + catch (MOCKPP_NS::AssertionFailedError &ex ) { - MOCKPP_ASSERT_TRUE(ex.getMessage().find(MOCKPP_PCHAR("invoke-fail")) != mockpp::String::npos ); - MOCKPP_ASSERT_TRUE(ex.getMessage().find(MOCKPP_PCHAR("adc-name")) != mockpp::String::npos ); + MOCKPP_ASSERT_TRUE(ex.getMessage().find(MOCKPP_PCHAR("invoke-fail")) != MOCKPP_NS::String::npos ); + MOCKPP_ASSERT_TRUE(ex.getMessage().find(MOCKPP_PCHAR("adc-name")) != MOCKPP_NS::String::npos ); } #endif @@ -447,7 +447,7 @@ } -} // namesspace +MOCKPP_NS_END Index: IsInstanceOf_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/IsInstanceOf_test.cpp,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- IsInstanceOf_test.cpp 1 Jan 2006 16:34:48 -0000 1.23 +++ IsInstanceOf_test.cpp 15 Mar 2006 21:34:08 -0000 1.24 @@ -124,8 +124,8 @@ void IsInstanceOf_test::test_describe() { - mockpp::IsInstanceOf<A, B> instance; - mockpp::String s = MOCKPP_PCHAR("instance?"); + MOCKPP_NS::IsInstanceOf<A, B> instance; + MOCKPP_NS::String s = MOCKPP_PCHAR("instance?"); MOCKPP_ASSERT_TRUE(instance.describeTo(s).find(MOCKPP_PCHAR("instance?derived from ")) == 0); MOCKPP_ASSERT_TRUE(s.find(MOCKPP_PCHAR("instance?derived from ")) == 0); } @@ -138,7 +138,7 @@ A *pc = new C; A *pd = (A*)new D; - mockpp::IsInstanceOf<A, B> instance; + MOCKPP_NS::IsInstanceOf<A, B> instance; MOCKPP_ASSERT_TRUE(instance.eval((B*)pa) == false); MOCKPP_ASSERT_TRUE(instance.eval(pb) == true); Index: ExpectationList_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/ExpectationList_test.cpp,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- ExpectationList_test.cpp 1 Jan 2006 16:34:47 -0000 1.25 +++ ExpectationList_test.cpp 15 Mar 2006 21:34:08 -0000 1.26 @@ -155,7 +155,7 @@ void ExpectationList_test::test_chain() { int exp_prep[10] = { 0, 1 }; - mockpp::ExpectationList<int> ab (MOCKPP_PCHAR("testExpectationList"), 0); + MOCKPP_NS::ExpectationList<int> ab (MOCKPP_PCHAR("testExpectationList"), 0); ab.addExpected(200) .addExpected(exp_prep+0, exp_prep+2) @@ -171,7 +171,7 @@ void ExpectationList_test::test_name() { - mockpp::ExpectationList<int> ec (MOCKPP_PCHAR("testList"), 0); + MOCKPP_NS::ExpectationList<int> ec (MOCKPP_PCHAR("testList"), 0); MOCKPP_ASSERT_TRUE(ec.getVerifiableName() == (MOCKPP_PCHAR("testList"))); } @@ -179,13 +179,13 @@ void ExpectationList_test::test_hasExpectations() { { - mockpp::ExpectationList<int> ec (MOCKPP_PCHAR("testList"), 0); + MOCKPP_NS::ExpectationList<int> ec (MOCKPP_PCHAR("testList"), 0); MOCKPP_ASSERT_TRUE(false == ec.hasExpectations()); ec.addExpected(2); MOCKPP_ASSERT_TRUE(true == ec.hasExpectations()); } - mockpp::ExpectationList<int> ec2 (MOCKPP_PCHAR("testList"), 0); + MOCKPP_NS::ExpectationList<int> ec2 (MOCKPP_PCHAR("testList"), 0); MOCKPP_ASSERT_TRUE(false == ec2.hasExpectations()); ec2.setExpectNothing(); MOCKPP_ASSERT_TRUE(true == ec2.hasExpectations()); @@ -194,7 +194,7 @@ void ExpectationList_test::test_clear() { - mockpp::ExpectationList<int> ec (MOCKPP_PCHAR("nothingValue"), 0); + MOCKPP_NS::ExpectationList<int> ec (MOCKPP_PCHAR("nothingValue"), 0); ec.addExpected(1234); ec.reset(); MOCKPP_ASSERT_TRUE(false == ec.hasExpectations()); @@ -204,7 +204,7 @@ void ExpectationList_test::fail_clearActual() { - mockpp::ExpectationList<int> ec (MOCKPP_PCHAR("testList"), 0); + MOCKPP_NS::ExpectationList<int> ec (MOCKPP_PCHAR("testList"), 0); ec.addExpected(3); ec.addActual(3); ec.clearActual(); @@ -214,7 +214,7 @@ ec.verify(); } #ifndef MOCKPP_NO_EXCEPTIONS - catch(mockpp::AssertionFailedError &) + catch(MOCKPP_NS::AssertionFailedError &) { thrown = true; } @@ -225,14 +225,14 @@ void ExpectationList_test::test_ifNoExpected() { - mockpp::ExpectationList<int> ec (MOCKPP_PCHAR("nothingList"), 0); + MOCKPP_NS::ExpectationList<int> ec (MOCKPP_PCHAR("nothingList"), 0); ec.addActual(3); // fails because no expectation value } void ExpectationList_test::fail_ifNoActual() { - mockpp::ExpectationList<int> ec (MOCKPP_PCHAR("nothingList"), 0); + MOCKPP_NS::ExpectationList<int> ec (MOCKPP_PCHAR("nothingList"), 0); ec.addExpected(3); bool thrown = false; MOCKPP_TRY @@ -240,7 +240,7 @@ ec.verify(); // fails because no value } #ifndef MOCKPP_NO_EXCEPTIONS - catch(mockpp::AssertionFailedError &) + catch(MOCKPP_NS::AssertionFailedError &) { thrown = true; } @@ -249,7 +249,7 @@ } -static void doNothing(mockpp::ExpectationList<int> &ec) +static void doNothing(MOCKPP_NS::ExpectationList<int> &ec) { ec.addExpected(3); ec.setExpectNothing(); @@ -258,7 +258,7 @@ void ExpectationList_test::test_expectNothing() { - mockpp::ExpectationList<int> ec (MOCKPP_PCHAR("nothingList"), 0); + MOCKPP_NS::ExpectationList<int> ec (MOCKPP_PCHAR("nothingList"), 0); doNothing(ec); ec.verify(); // no fail } @@ -266,7 +266,7 @@ void ExpectationList_test::test_expectNothing_revoked() { - mockpp::ExpectationList<int> ec (MOCKPP_PCHAR("nothingList"), 0); + MOCKPP_NS::ExpectationList<int> ec (MOCKPP_PCHAR("nothingList"), 0); ec.setExpectNothing(); ec.addExpected(3); ec.addActual(3); @@ -276,7 +276,7 @@ void ExpectationList_test::fail_expectNothing() { - mockpp::ExpectationList<int> ec (MOCKPP_PCHAR("nothingList"), 0); + MOCKPP_NS::ExpectationList<int> ec (MOCKPP_PCHAR("nothingList"), 0); doNothing(ec); bool thrown = false; MOCKPP_TRY @@ -284,7 +284,7 @@ ec.addActual(3); // fails even if equal } #ifndef MOCKPP_NO_EXCEPTIONS - catch(mockpp::AssertionFailedError &) + catch(MOCKPP_NS::AssertionFailedError &) { thrown = true; } @@ -293,7 +293,7 @@ } -static void doActualImmediate(mockpp::ExpectationList<int> &ec) +static void doActualImmediate(MOCKPP_NS::ExpectationList<int> &ec) { ec.addExpected(1234); ec.addExpected(5678); @@ -309,7 +309,7 @@ void ExpectationList_test::test_expectActualImmediate() { - mockpp::ExpectationList<int> ec (MOCKPP_PCHAR("actualList"), 0); + MOCKPP_NS::ExpectationList<int> ec (MOCKPP_PCHAR("actualList"), 0); doActualImmediate(ec); ec.verify(); // no fail } @@ -317,7 +317,7 @@ void ExpectationList_test::test_many() { - mockpp::ExpectationList<int> ec (MOCKPP_PCHAR("actualList"), 0); + MOCKPP_NS::ExpectationList<int> ec (MOCKPP_PCHAR("actualList"), 0); int prep[10] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; ec.addExpected(prep+0, prep+10); @@ -327,7 +327,7 @@ void ExpectationList_test::fail_many() { - mockpp::ExpectationList<int> ec (MOCKPP_PCHAR("actualList"), 0); + MOCKPP_NS::ExpectationList<int> ec (MOCKPP_PCHAR("actualList"), 0); int prep[10] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; @@ -338,7 +338,7 @@ ec.addActual(prep+2, prep+10); } #ifndef MOCKPP_NO_EXCEPTIONS - catch(mockpp::AssertionFailedError &) + catch(MOCKPP_NS::AssertionFailedError &) { thrown = true; } @@ -349,7 +349,7 @@ void ExpectationList_test::fail_expectActualImmediate() { - mockpp::ExpectationList<int> ec (MOCKPP_PCHAR("actualList"), 0); + MOCKPP_NS::ExpectationList<int> ec (MOCKPP_PCHAR("actualList"), 0); doActualImmediate(ec); bool thrown = false; MOCKPP_TRY @@ -357,7 +357,7 @@ ec.addActual(4321); // fails } #ifndef MOCKPP_NO_EXCEPTIONS - catch(mockpp::AssertionFailedError &) + catch(MOCKPP_NS::AssertionFailedError &) { thrown = true; } @@ -366,7 +366,7 @@ } -static void doActualVerify(mockpp::ExpectationList<int> &ec) +static void doActualVerify(MOCKPP_NS::ExpectationList<int> &ec) { ec.addExpected(1234); ec.setFailOnVerify(); @@ -376,14 +376,14 @@ void ExpectationList_test::test_expectActualVerify() { - mockpp::ExpectationList<int> ec (MOCKPP_PCHAR("verifyList"), 0); + MOCKPP_NS::ExpectationList<int> ec (MOCKPP_PCHAR("verifyList"), 0); doActualVerify(ec); // no fail } void ExpectationList_test::fail_expectActualVerify() { - mockpp::ExpectationList<int> ec (MOCKPP_PCHAR("verifyList"), 0); + MOCKPP_NS::ExpectationList<int> ec (MOCKPP_PCHAR("verifyList"), 0); doActualVerify(ec); // no fail bool thrown = false; MOCKPP_TRY @@ -391,7 +391,7 @@ ec.verify(); // fails } #ifndef MOCKPP_NO_EXCEPTIONS - catch(mockpp::AssertionFailedError &) + catch(MOCKPP_NS::AssertionFailedError &) { thrown = true; } @@ -402,7 +402,7 @@ void ExpectationList_test::test_balance() { - mockpp::ExpectationList<int> ec (MOCKPP_PCHAR("verifyList"), 0); + MOCKPP_NS::ExpectationList<int> ec (MOCKPP_PCHAR("verifyList"), 0); ec.addExpected(1); ec.addExpected(2); Index: IsLessThan_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/IsLessThan_test.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- IsLessThan_test.cpp 1 Jan 2006 16:34:48 -0000 1.15 +++ IsLessThan_test.cpp 15 Mar 2006 21:34:08 -0000 1.16 @@ -83,8 +83,8 @@ void IsLessThan_test::test_describe() { - mockpp::IsLessThan<int> less (12); - mockpp::String s = MOCKPP_PCHAR("less?"); + MOCKPP_NS::IsLessThan<int> less (12); + MOCKPP_NS::String s = MOCKPP_PCHAR("less?"); MOCKPP_ASSERT_TRUE(less.describeTo(s) == MOCKPP_PCHAR("less?lessThan 12")); MOCKPP_ASSERT_TRUE(s == MOCKPP_PCHAR("less?lessThan 12")); } @@ -92,7 +92,7 @@ void IsLessThan_test::test_invoke() { - mockpp::IsLessThan<int> less (10); + MOCKPP_NS::IsLessThan<int> less (10); MOCKPP_ASSERT_TRUE(less.eval(11) == false); MOCKPP_ASSERT_TRUE(less.eval(10) == false); MOCKPP_ASSERT_TRUE(less.eval(9) == true); Index: ExpectationMap_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/ExpectationMap_test.cpp,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- ExpectationMap_test.cpp 1 Jan 2006 19:40:37 -0000 1.26 +++ ExpectationMap_test.cpp 15 Mar 2006 21:34:08 -0000 1.27 @@ -168,13 +168,13 @@ void ExpectationMap_test::test_chain() { - mockpp::ExpectationMap<int, MOCKPP_STL::string> ec (MOCKPP_PCHAR("actualMap"), 0); + MOCKPP_NS::ExpectationMap<int, MOCKPP_STL::string> ec (MOCKPP_PCHAR("actualMap"), 0); MOCKPP_STL::vector<MOCKPP_STL::pair<int, MOCKPP_STL::string> > vp; vp.push_back(MOCKPP_STL::make_pair(3, (const char*)"three")); // gcc2.95 needs this "const char*" thing vp.push_back(MOCKPP_STL::make_pair(4, (const char*)"four")); - mockpp::ExpectationMap<int, MOCKPP_STL::string> ab = - mockpp::ExpectationMap<int, MOCKPP_STL::string> + MOCKPP_NS::ExpectationMap<int, MOCKPP_STL::string> ab = + MOCKPP_NS::ExpectationMap<int, MOCKPP_STL::string> (MOCKPP_PCHAR("testExpectationMap"), 0) .addExpected(MOCKPP_STL::pair<int, MOCKPP_STL::string>(6,"six")) .addExpected(vp.begin(), vp.end()) @@ -194,7 +194,7 @@ void ExpectationMap_test::test_name() { - mockpp::ExpectationMap<int, MOCKPP_STL::string> ec (MOCKPP_PCHAR("testMap"), 0); + MOCKPP_NS::ExpectationMap<int, MOCKPP_STL::string> ec (MOCKPP_PCHAR("testMap"), 0); MOCKPP_ASSERT_TRUE(ec.getVerifiableName() == MOCKPP_PCHAR("testMap")); } @@ -202,13 +202,13 @@ void ExpectationMap_test::test_hasExpectations() { { - mockpp::ExpectationMap<int, MOCKPP_STL::string> ec (MOCKPP_PCHAR("testMap"), 0); + MOCKPP_NS::ExpectationMap<int, MOCKPP_STL::string> ec (MOCKPP_PCHAR("testMap"), 0); MOCKPP_ASSERT_TRUE(false == ec.hasExpectations()); ec.addExpected(2, "two"); MOCKPP_ASSERT_TRUE(true == ec.hasExpectations()); } - mockpp::ExpectationMap<int, MOCKPP_STL::string> ec2 (MOCKPP_PCHAR("testMap"), 0); + MOCKPP_NS::ExpectationMap<int, MOCKPP_STL::string> ec2 (MOCKPP_PCHAR("testMap"), 0); MOCKPP_ASSERT_TRUE(false == ec2.hasExpectations()); ec2.setExpectNothing(); MOCKPP_ASSERT_TRUE(true == ec2.hasExpectations()); @@ -217,7 +217,7 @@ void ExpectationMap_test::test_clear() { - mockpp::ExpectationMap<int, MOCKPP_STL::string> ec (MOCKPP_PCHAR("testMap"), 0); + MOCKPP_NS::ExpectationMap<int, MOCKPP_STL::string> ec (MOCKPP_PCHAR("testMap"), 0); ec.addExpected(3, "three"); ec.reset(); MOCKPP_ASSERT_TRUE(false == ec.hasExpectations()); @@ -226,7 +226,7 @@ void ExpectationMap_test::fail_clearActual() { - mockpp::ExpectationMap<int, MOCKPP_STL::string> ec (MOCKPP_PCHAR("testMap"), 0); + MOCKPP_NS::ExpectationMap<int, MOCKPP_STL::string> ec (MOCKPP_PCHAR("testMap"), 0); ec.addExpected(3, "three"); ec.clearActual(); bool thrown = false; @@ -235,7 +235,7 @@ ec.verify(); } #ifndef MOCKPP_NO_EXCEPTIONS - catch(mockpp::AssertionFailedError &) + catch(MOCKPP_NS::AssertionFailedError &) { thrown = true; } @@ -246,14 +246,14 @@ void ExpectationMap_test::test_ifNoExpected() { - mockpp::ExpectationMap<int, MOCKPP_STL::string> ec (MOCKPP_PCHAR("nothingMap"), 0); + MOCKPP_NS::ExpectationMap<int, MOCKPP_STL::string> ec (MOCKPP_PCHAR("nothingMap"), 0); ec.addActual(3); // fails because no expectation value } void ExpectationMap_test::fail_ifNoActual() { - mockpp::ExpectationMap<int, MOCKPP_STL::string> ec (MOCKPP_PCHAR("nothingMap"), 0); + MOCKPP_NS::ExpectationMap<int, MOCKPP_STL::string> ec (MOCKPP_PCHAR("nothingMap"), 0); ec.addExpected(3, "three"); bool thrown = false; MOCKPP_TRY @@ -261,7 +261,7 @@ ec.verify(); // fails because no value } #ifndef MOCKPP_NO_EXCEPTIONS - catch(mockpp::AssertionFailedError &) + catch(MOCKPP_NS::AssertionFailedError &) { thrown = true; } @@ -270,7 +270,7 @@ } -static void doNothing(mockpp::ExpectationMap<int, MOCKPP_STL::string> &ec) +static void doNothing(MOCKPP_NS::ExpectationMap<int, MOCKPP_STL::string> &ec) { ec.addExpected(3, "three"); ec.setExpectNothing(); @@ -279,7 +279,7 @@ void ExpectationMap_test::test_expectNothing() { - mockpp::ExpectationMap<int, MOCKPP_STL::string> ec (MOCKPP_PCHAR("nothingMap"), 0); + MOCKPP_NS::ExpectationMap<int, MOCKPP_STL::string> ec (MOCKPP_PCHAR("nothingMap"), 0); doNothing(ec); ec.verify(); // no fail } @@ -287,7 +287,7 @@ void ExpectationMap_test::test_expectNothing_revoked() { - mockpp::ExpectationMap<int, MOCKPP_STL::string> ec (MOCKPP_PCHAR("nothingMap"), 0); + MOCKPP_NS::ExpectationMap<int, MOCKPP_STL::string> ec (MOCKPP_PCHAR("nothingMap"), 0); ec.setExpectNothing(); ec.addExpected(3, "three"); ec.addActual(3); @@ -297,7 +297,7 @@ void ExpectationMap_test::fail_expectNothing() { - mockpp::ExpectationMap<int, MOCKPP_STL::string> ec (MOCKPP_PCHAR("nothingMap"), 0); + MOCKPP_NS::ExpectationMap<int, MOCKPP_STL::string> ec (MOCKPP_PCHAR("nothingMap"), 0); doNothing(ec); bool thrown = false; MOCKPP_TRY @@ -305,7 +305,7 @@ ec.addActual(3); // fails even if equal } #ifndef MOCKPP_NO_EXCEPTIONS - catch(mockpp::AssertionFailedError &) + catch(MOCKPP_NS::AssertionFailedError &) { thrown = true; } @@ -316,7 +316,7 @@ void ExpectationMap_test::test_get() { - mockpp::ExpectationMap<int, MOCKPP_STL::string> ec (MOCKPP_PCHAR("actualMap"), 0); + MOCKPP_NS::ExpectationMap<int, MOCKPP_STL::string> ec (MOCKPP_PCHAR("actualMap"), 0); ec.addExpected(3, "three"); ec.addExpected(4, "four"); MOCKPP_ASSERT_TRUE("three" == ec.get(3)); @@ -325,7 +325,7 @@ void ExpectationMap_test::test_pair_get() { - mockpp::ExpectationMap<int, MOCKPP_STL::string> ec (MOCKPP_PCHAR("actualMap"), 0); + MOCKPP_NS::ExpectationMap<int, MOCKPP_STL::string> ec (MOCKPP_PCHAR("actualMap"), 0); ec.addExpected(MOCKPP_STL::make_pair(3, (const char*)"three")); // gcc2.95 needs this "const char*" thing ec.addExpected(MOCKPP_STL::make_pair(4, (const char*)"four")); MOCKPP_ASSERT_TRUE("three" == ec.get(3)); @@ -335,7 +335,7 @@ void ExpectationMap_test::test_pair_getmany() { - mockpp::ExpectationMap<int, MOCKPP_STL::string> ec (MOCKPP_PCHAR("actualMap"), 0); + MOCKPP_NS::ExpectationMap<int, MOCKPP_STL::string> ec (MOCKPP_PCHAR("actualMap"), 0); MOCKPP_STL::vector<MOCKPP_STL::pair<int, MOCKPP_STL::string> > vp; vp.push_back(MOCKPP_STL::make_pair(3, (const char*)"three")); // gcc2.95 needs this "const char*" thing vp.push_back(MOCKPP_STL::make_pair(4, (const char*)"four")); @@ -351,7 +351,7 @@ void ExpectationMap_test::test_many() { - mockpp::ExpectationMap<int, MOCKPP_STL::string> ec (MOCKPP_PCHAR("actualMap"), 0); + MOCKPP_NS::ExpectationMap<int, MOCKPP_STL::string> ec (MOCKPP_PCHAR("actualMap"), 0); ec.addExpected(MOCKPP_STL::pair<int, MOCKPP_STL::string>(6,"zero")); ec.addExpected(MOCKPP_STL::pair<int, MOCKPP_STL::string>(5, "one")); @@ -371,7 +371,7 @@ void ExpectationMap_test::fail_many() { - mockpp::ExpectationMap<int, MOCKPP_STL::string> ec (MOCKPP_PCHAR("actualMap"), 0); + MOCKPP_NS::ExpectationMap<int, MOCKPP_STL::string> ec (MOCKPP_PCHAR("actualMap"), 0); ec.addExpected(MOCKPP_STL::pair<int, MOCKPP_STL::string>(6,"zero")); ec.addExpected(MOCKPP_STL::pair<int, MOCKPP_STL::string>(5, "one")); @@ -386,7 +386,7 @@ ec.addActual(10); } #ifndef MOCKPP_NO_EXCEPTIONS - catch(mockpp::AssertionFailedError &) + catch(MOCKPP_NS::AssertionFailedError &) { thrown = true; } @@ -395,7 +395,7 @@ } -static void doActualImmediate(mockpp::ExpectationMap<int, MOCKPP_STL::string> &ec) +static void doActualImmediate(MOCKPP_NS::ExpectationMap<int, MOCKPP_STL::string> &ec) { ec.addExpected(1234, "1234"); ec.addExpected(5678, "5678"); @@ -411,7 +411,7 @@ void ExpectationMap_test::test_expectActualImmediate() { - mockpp::ExpectationMap<int, MOCKPP_STL::string> ec (MOCKPP_PCHAR("actualMap"), 0); + MOCKPP_NS::ExpectationMap<int, MOCKPP_STL::string> ec (MOCKPP_PCHAR("actualMap"), 0); doActualImmediate(ec); ec.verify(); // no fail } @@ -419,7 +419,7 @@ void ExpectationMap_test::fail_expectActualImmediate() { - mockpp::ExpectationMap<int, MOCKPP_STL::string> ec (MOCKPP_PCHAR("actualMap"), 0); + MOCKPP_NS::ExpectationMap<int, MOCKPP_STL::string> ec (MOCKPP_PCHAR("actualMap"), 0); doActualImmediate(ec); bool thrown = false; MOCKPP_TRY @@ -427,7 +427,7 @@ ec.addActual(1111); // fails } #ifndef MOCKPP_NO_EXCEPTIONS - catch(mockpp::AssertionFailedError &) + catch(MOCKPP_NS::AssertionFailedError &) { thrown = true; } @@ -438,7 +438,7 @@ void ExpectationMap_test::test_missing() { - mockpp::ExpectationMap<int, MOCKPP_STL::string> ec (MOCKPP_PCHAR("actualMap"), 0); + MOCKPP_NS::ExpectationMap<int, MOCKPP_STL::string> ec (MOCKPP_PCHAR("actualMap"), 0); ec.addExpectedMissing(1234); ec.addExpectedMissing(5678); ec.addExpectedMissing(8765); @@ -452,7 +452,7 @@ } -static void doActualVerify(mockpp::ExpectationMap<int, MOCKPP_STL::string> &ec) +static void doActualVerify(MOCKPP_NS::ExpectationMap<int, MOCKPP_STL::string> &ec) { ec.addExpected(1234, "1234"); ec.setFailOnVerify(); @@ -462,14 +462,14 @@ void ExpectationMap_test::test_expectActualVerify() { - mockpp::ExpectationMap<int, MOCKPP_STL::string> ec (MOCKPP_PCHAR("verifyMap"), 0); + MOCKPP_NS::ExpectationMap<int, MOCKPP_STL::string> ec (MOCKPP_PCHAR("verifyMap"), 0); doActualVerify(ec); // no fail } void ExpectationMap_test::fail_expectActualVerify() { - mockpp::ExpectationMap<int, MOCKPP_STL::string> ec (MOCKPP_PCHAR("verifyMap"), 0); + MOCKPP_NS::ExpectationMap<int, MOCKPP_STL::string> ec (MOCKPP_PCHAR("verifyMap"), 0); doActualVerify(ec); // no fail bool thrown = false; MOCKPP_TRY @@ -477,7 +477,7 @@ ec.verify(); // fails } #ifndef MOCKPP_NO_EXCEPTIONS - catch(mockpp::AssertionFailedError &) + catch(MOCKPP_NS::AssertionFailedError &) { thrown = true; } Index: CustomStub_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/CustomStub_test.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- CustomStub_test.cpp 1 Jan 2006 16:34:47 -0000 1.19 +++ CustomStub_test.cpp 15 Mar 2006 21:34:08 -0000 1.20 @@ -78,11 +78,11 @@ template <typename R, // Returntype typename I> // Invocation -class MyCustomStub : public mockpp::CustomStub<R, I> +class MyCustomStub : public MOCKPP_NS::CustomStub<R, I> { public: - MyCustomStub( const mockpp::String &in_description ) - : mockpp::CustomStub<R, I>(in_description) + MyCustomStub( const MOCKPP_NS::String &in_description ) + : MOCKPP_NS::CustomStub<R, I>(in_description) { } @@ -96,9 +96,9 @@ void CustomStub_test::test_invoke() { MyCustomStub<int, int> cs(MOCKPP_PCHAR("custom")); - mockpp::String s; - MOCKPP_ASSERT_TRUE(cs.describeTo(s) == mockpp::String(MOCKPP_PCHAR("custom"))); - MOCKPP_ASSERT_TRUE(s == mockpp::String(MOCKPP_PCHAR("custom"))); + MOCKPP_NS::String s; + MOCKPP_ASSERT_TRUE(cs.describeTo(s) == MOCKPP_NS::String(MOCKPP_PCHAR("custom"))); + MOCKPP_ASSERT_TRUE(s == MOCKPP_NS::String(MOCKPP_PCHAR("custom"))); } Index: VisitableMockObject_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/VisitableMockObject_test.cpp,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- VisitableMockObject_test.cpp 1 Jan 2006 16:34:49 -0000 1.33 +++ VisitableMockObject_test.cpp 15 Mar 2006 21:34:08 -0000 1.34 @@ -151,12 +151,12 @@ -class MyVisitableMockObject : public mockpp::VisitableMockObject +class MyVisitableMockObject : public MOCKPP_NS::VisitableMockObject { public: - MyVisitableMockObject(const mockpp::String &name) - : mockpp::VisitableMockObject(name, 0) + MyVisitableMockObject(const MOCKPP_NS::String &name) + : MOCKPP_NS::VisitableMockObject(name, 0) , MOCKPP_CONSTRUCT_MEMBERS_FOR_VISITABLE0(visitable) , MOCKPP_CONSTRUCT_MEMBERS_FOR_VISITABLE0(visitable_e_Shadow) {} @@ -185,12 +185,12 @@ }; -class MyVisitableMockObject_ex : public mockpp::VisitableMockObject +class MyVisitableMockObject_ex : public MOCKPP_NS::VisitableMockObject { public: - MyVisitableMockObject_ex(const mockpp::String &name) - : mockpp::VisitableMockObject(name, 0), + MyVisitableMockObject_ex(const MOCKPP_NS::String &name) + : MOCKPP_NS::VisitableMockObject(name, 0), MOCKPP_CONSTRUCT_MEMBERS_FOR_VISITABLE_EXT0(visitable, Ext) {} @@ -231,9 +231,9 @@ { MyVisitableMockObject mvo(MOCKPP_PCHAR("mvo")); MOCKPP_CONTROLLER_FOR(MyVisitableMockObject, visitable) ctr (&mvo); - ctr.addThrowable(mockpp::make_throwable(MOCKPP_STL::string("exceptional string"))); + ctr.addThrowable(MOCKPP_NS::make_throwable(MOCKPP_STL::string("exceptional string"))); ctr.addThrowable(MOCKPP_STL::string("exceptional string"), 3); - ctr.setDefaultThrowable(mockpp::make_throwable(int(123))); + ctr.setDefaultThrowable(MOCKPP_NS::make_throwable(int(123))); ctr.addReturnValue(11); ctr.setDefaultReturnValue(123); } @@ -243,9 +243,9 @@ { MyVisitableMockObject mvo(MOCKPP_PCHAR("mvo")); MOCKPP_CONTROLLER_FOR(MyVisitableMockObject, visitable) ctr (&mvo); - ctr.addThrowable(mockpp::make_throwable(MOCKPP_STL::string("exceptional string 1"))); + ctr.addThrowable(MOCKPP_NS::make_throwable(MOCKPP_STL::string("exceptional string 1"))); ctr.addThrowable(MOCKPP_STL::string("exceptional string 2"), 2); - ctr.setDefaultThrowable(mockpp::make_throwable(MOCKPP_STL::string("exceptional string 3"))); + ctr.setDefaultThrowable(MOCKPP_NS::make_throwable(MOCKPP_STL::string("exceptional string 3"))); mvo.visitable(); mvo.visitable(); @@ -284,7 +284,7 @@ mvo.visitable(); } #ifndef MOCKPP_NO_EXCEPTIONS - catch(mockpp::AssertionFailedError &) + catch(MOCKPP_NS::AssertionFailedError &) { thrown = true; } @@ -307,8 +307,8 @@ #ifndef MOCKPP_NO_EXCEPTIONS MOCKPP_ASSERT_THROWING_COND(mvo.verify(), MOCKPP_PCSTRING("mvo.verify()"), - mockpp::AssertionFailedError, - exception_object.getMessage().find(MOCKPP_PCHAR("did not receive the expected item list")) != mockpp::String::npos); + MOCKPP_NS::AssertionFailedError, + exception_object.getMessage().find(MOCKPP_PCHAR("did not receive the expected item list")) != MOCKPP_NS::String::npos); #endif } @@ -321,10 +321,10 @@ bool thrown = false; MOCKPP_TRY { - ctr.addThrowable(mockpp::make_throwable(MOCKPP_STL::string("exceptional string"))); + ctr.addThrowable(MOCKPP_NS::make_throwable(MOCKPP_STL::string("exceptional string"))); } #ifndef MOCKPP_NO_EXCEPTIONS - catch(mockpp::AssertionFailedError &) + catch(MOCKPP_NS::AssertionFailedError &) { thrown = true; } @@ -344,7 +344,7 @@ ctr.addThrowable(MOCKPP_STL::string("exceptional string"), 1); } #ifndef MOCKPP_NO_EXCEPTIONS - catch(mockpp::AssertionFailedError &) + catch(MOCKPP_NS::AssertionFailedError &) { thrown = true; } @@ -361,10 +361,10 @@ bool thrown = false; MOCKPP_TRY { - ctr.setDefaultThrowable(mockpp::make_throwable(MOCKPP_STL::string("exceptional string"))); + ctr.setDefaultThrowable(MOCKPP_NS::make_throwable(MOCKPP_STL::string("exceptional string"))); } #ifndef MOCKPP_NO_EXCEPTIONS - catch(mockpp::AssertionFailedError &) + catch(MOCKPP_NS::AssertionFailedError &) { thrown = true; } @@ -384,7 +384,7 @@ ctr.addReturnValue(1); } #ifndef MOCKPP_NO_EXCEPTIONS - catch(mockpp::AssertionFailedError &) + catch(MOCKPP_NS::AssertionFailedError &) { thrown = true; } @@ -404,7 +404,7 @@ ctr.setDefaultReturnValue(1); } #ifndef MOCKPP_NO_EXCEPTIONS - catch(mockpp::AssertionFailedError &) + catch(MOCKPP_NS::AssertionFailedError &) { thrown = true; } @@ -435,7 +435,7 @@ mvo.visitable(); // no more return objects } #ifndef MOCKPP_NO_EXCEPTIONS - catch(mockpp::AssertionFailedError &) + catch(MOCKPP_NS::AssertionFailedError &) { thrown = true; } @@ -475,7 +475,7 @@ MOCKPP_CONTROLLER_FOR(MyVisitableMockObject, visitable) ctr (&mvo); ctr.addThrowable(MOCKPP_STL::string("exceptional string"), 3); - ctr.setDefaultThrowable(mockpp::make_throwable(int(123))); + ctr.setDefaultThrowable(MOCKPP_NS::make_throwable(int(123))); ctr.addReturnValue(1); ctr.setDefaultReturnValue(123); @@ -491,7 +491,7 @@ { MyVisitableMockObject mvo(MOCKPP_PCHAR("mvo")); MOCKPP_CONTROLLER_FOR(MyVisitableMockObject, visitable) ctr (&mvo); - ctr.setDefaultThrowable(mockpp::make_throwable(MOCKPP_STL::string("throw default"))); + ctr.setDefaultThrowable(MOCKPP_NS::make_throwable(MOCKPP_STL::string("throw default"))); mvo.activate(); bool thrown = false; MOCKPP_TRY @@ -499,7 +499,7 @@ mvo.verify(); } #ifndef MOCKPP_NO_EXCEPTIONS - catch(mockpp::AssertionFailedError &) + catch(MOCKPP_NS::AssertionFailedError &) { thrown = true; } @@ -520,7 +520,7 @@ mvo.verify(); } #ifndef MOCKPP_NO_EXCEPTIONS - catch(mockpp::AssertionFailedError &) + catch(MOCKPP_NS::AssertionFailedError &) { thrown = true; } @@ -534,9 +534,9 @@ MyVisitableMockObject mvo(MOCKPP_PCHAR("mvo")); MOCKPP_CONTROLLER_FOR(MyVisitableMockObject, visitable) ctr (&mvo); ctr.addReturnValue(111); - ctr.addThrowable(mockpp::make_throwable(MOCKPP_STL::string("throw 1"))); + ctr.addThrowable(MOCKPP_NS::make_throwable(MOCKPP_STL::string("throw 1"))); ctr.addReturnValue(222); - ctr.addThrowable(mockpp::make_throwable(MOCKPP_STL::string("throw 2"))); + ctr.addThrowable(MOCKPP_NS::make_throwable(MOCKPP_STL::string("throw 2"))); mvo.unsetThrowablesInline(); // old pre-1.2 mode mvo.activate(); @@ -577,9 +577,9 @@ MyVisitableMockObject mvo(MOCKPP_PCHAR("mvo")); MOCKPP_CONTROLLER_FOR(MyVisitableMockObject, visitable) ctr (&mvo); ctr.addReturnValue(111); - ctr.addThrowable(mockpp::make_throwable(MOCKPP_STL::string("throw 1"))); + ctr.addThrowable(MOCKPP_NS::make_throwable(MOCKPP_STL::string("throw 1"))); ctr.addReturnValue(222); - ctr.addThrowable(mockpp::make_throwable(MOCKPP_STL::string("throw 2"))); + ctr.addThrowable(MOCKPP_NS::make_throwable(MOCKPP_STL::string("throw 2"))); mvo.activate(); MOCKPP_ASSERT_TRUE(111 == mvo.visitable()); Index: Assert_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/Assert_test.cpp,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- Assert_test.cpp 1 Jan 2006 16:34:47 -0000 1.27 +++ Assert_test.cpp 15 Mar 2006 21:34:08 -0000 1.28 @@ -168,7 +168,7 @@ MOCKPP_ASSERT_EQUALS_MESSAGE(MOCKPP_PCHAR("equals 1==2"), 1, 2); } #ifndef MOCKPP_NO_EXCEPTIONS - catch (mockpp::AssertionFailedError &ae) + catch (MOCKPP_NS::AssertionFailedError &ae) { thrown = true; MOCKPP_ASSERT_TRUE(MOCKPP_PCHAR("equals 1==2") == ae.getMessage()); @@ -183,7 +183,7 @@ MOCKPP_ASSERT_EQUALS(123, 321); } #ifndef MOCKPP_NO_EXCEPTIONS - catch (mockpp::AssertionFailedError &ae) + catch (MOCKPP_NS::AssertionFailedError &ae) { thrown = true; MOCKPP_ASSERT_TRUE(MOCKPP_PCHAR("invalid: 123 == 321") == ae.getMessage()); @@ -198,7 +198,7 @@ MOCKPP_ASSERT_DELTA_MESSAGE(MOCKPP_PCHAR("range 1 +- 2 == 4"), 1, 4, 2); } #ifndef MOCKPP_NO_EXCEPTIONS - catch (mockpp::AssertionFailedError &ae) + catch (MOCKPP_NS::AssertionFailedError &ae) { thrown = true; MOCKPP_ASSERT_TRUE(MOCKPP_PCHAR("range 1 +- 2 == 4") == ae.getMessage()); @@ -213,7 +213,7 @@ MOCKPP_ASSERT_DELTA(123, 321, 3); } #ifndef MOCKPP_NO_EXCEPTIONS - catch (mockpp::AssertionFailedError &ae) + catch (MOCKPP_NS::AssertionFailedError &ae) { thrown = true; MOCKPP_ASSERT_TRUE(MOCKPP_PCHAR("invalid: 123 +- 3 == 321") == ae.getMessage()); @@ -228,7 +228,7 @@ MOCKPP_ASSERT_BOUNDARY(123, 321, 789); } #ifndef MOCKPP_NO_EXCEPTIONS - catch (mockpp::AssertionFailedError &ae) + catch (MOCKPP_NS::AssertionFailedError &ae) { thrown = true; MOCKPP_ASSERT_TRUE(MOCKPP_PCHAR("invalid: 123 < 789 < 321") == ae.getMessage()); @@ -243,7 +243,7 @@ MOCKPP_ASSERT_BOUNDARY_MESSAGE(MOCKPP_PCHAR("123 321 789"), 123, 321, 789); } #ifndef MOCKPP_NO_EXCEPTIONS -catch (mockpp::AssertionFailedError &ae) +catch (MOCKPP_NS::AssertionFailedError &ae) { thrown = true; MOCKPP_ASSERT_TRUE(MOCKPP_PCHAR("123 321 789") == ae.getMessage()); @@ -258,7 +258,7 @@ MOCKPP_ASSERT_TRUE_MESSAGE(MOCKPP_PCHAR("condition true == false"), true == false); } #ifndef MOCKPP_NO_EXCEPTIONS - catch (mockpp::AssertionFailedError &ae) + catch (MOCKPP_NS::AssertionFailedError &ae) { thrown = true; MOCKPP_ASSERT_TRUE(MOCKPP_PCHAR("condition true == false") == ae.getMessage()); @@ -273,7 +273,7 @@ MOCKPP_ASSERT_TRUE( true == false ); // some spaces AROUND the expression } #ifndef MOCKPP_NO_EXCEPTIONS - catch (mockpp::AssertionFailedError &ae) + catch (MOCKPP_NS::AssertionFailedError &ae) { thrown = true; MOCKPP_ASSERT_TRUE(MOCKPP_PCHAR("!true: true == false") == ae.getMessage()); @@ -288,7 +288,7 @@ MOCKPP_ASSERT_FALSE_MESSAGE(MOCKPP_PCHAR("condition true != false"), true != false); } #ifndef MOCKPP_NO_EXCEPTIONS - catch (mockpp::AssertionFailedError &ae) + catch (MOCKPP_NS::AssertionFailedError &ae) { thrown = true; MOCKPP_ASSERT_TRUE(MOCKPP_PCHAR("condition true != false") == ae.getMessage()); @@ -303,7 +303,7 @@ MOCKPP_ASSERT_FALSE( true != false ); // some spaces AROUND the expression } #ifndef MOCKPP_NO_EXCEPTIONS - catch (mockpp::AssertionFailedError &ae) + catch (MOCKPP_NS::AssertionFailedError &ae) { thrown = true; MOCKPP_ASSERT_TRUE(MOCKPP_PCHAR("!false: true != false") == ae.getMessage()); @@ -328,7 +328,7 @@ MOCKPP_STL::string("123"), MOCKPP_STL::string("321")); } #ifndef MOCKPP_NO_EXCEPTIONS - catch(mockpp::AssertionFailedError &) + catch(MOCKPP_NS::AssertionFailedError &) { thrown = true; } @@ -342,7 +342,7 @@ MOCKPP_ASSERT_EQUALS_MESSAGE(MOCKPP_PCHAR(""), MOCKPP_STL::string("123"), MOCKPP_STL::string("321")); } #ifndef MOCKPP_NO_EXCEPTIONS - catch(mockpp::AssertionFailedError &) + catch(MOCKPP_NS::AssertionFailedError &) { thrown = true; } @@ -368,7 +368,7 @@ MOCKPP_STL::basic_string<wchar_t>(L"123"), MOCKPP_STL::basic_string<wchar_t>(L"321")); } #ifndef MOCKPP_NO_EXCEPTIONS - catch(mockpp::AssertionFailedError &) + catch(MOCKPP_NS::AssertionFailedError &) { thrown = true; } @@ -382,7 +382,7 @@ MOCKPP_ASSERT_EQUALS_MESSAGE(MOCKPP_PCHAR(""), MOCKPP_STL::basic_string<wchar_t>(L"123"), MOCKPP_STL::basic_string<wchar_t>(L"321")); } #ifndef MOCKPP_NO_EXCEPTIONS - catch(mockpp::AssertionFailedError &) + catch(MOCKPP_NS::AssertionFailedError &) { thrown = true; } @@ -407,7 +407,7 @@ "123", "321"); } #ifndef MOCKPP_NO_EXCEPTIONS - catch(mockpp::AssertionFailedError &) + catch(MOCKPP_NS::AssertionFailedError &) { thrown = true; } @@ -421,7 +421,7 @@ MOCKPP_ASSERT_EQUALS_MESSAGE(MOCKPP_PCHAR(""), "123", "321"); } #ifndef MOCKPP_NO_EXCEPTIONS - catch(mockpp::AssertionFailedError &) + catch(MOCKPP_NS::AssertionFailedError &) { thrown = true; } @@ -446,7 +446,7 @@ L"123", L"321"); } #ifndef MOCKPP_NO_EXCEPTIONS - catch(mockpp::AssertionFailedError &) + catch(MOCKPP_NS::AssertionFailedError &) { thrown = true; } @@ -460,7 +460,7 @@ MOCKPP_ASSERT_EQUALS_MESSAGE(MOCKPP_PCHAR(""), L"123", L"321"); } #ifndef MOCKPP_NO_EXCEPTIONS - catch(mockpp::AssertionFailedError &) + catch(MOCKPP_NS::AssertionFailedError &) { thrown = true; } @@ -484,7 +484,7 @@ (long) 12345678, (long) 87654321); } #ifndef MOCKPP_NO_EXCEPTIONS - catch(mockpp::AssertionFailedError &) + catch(MOCKPP_NS::AssertionFailedError &) { thrown = true; } @@ -497,7 +497,7 @@ MOCKPP_ASSERT_EQUALS_MESSAGE(MOCKPP_PCHAR(""), (long) -12345678, (long) -87654321); } #ifndef MOCKPP_NO_EXCEPTIONS - catch(mockpp::AssertionFailedError &) + catch(MOCKPP_NS::AssertionFailedError &) { thrown = true; } @@ -520,7 +520,7 @@ MOCKPP_ASSERT_EQUALS_MESSAGE(MOCKPP_PCHAR(""), (short) -1234, (short) -4321); } #ifndef MOCKPP_NO_EXCEPTIONS - catch(mockpp::AssertionFailedError &) + catch(MOCKPP_NS::AssertionFailedError &) { thrown = true; } @@ -535,7 +535,7 @@ (short) -1234, (short) -4321); } #ifndef MOCKPP_NO_EXCEPTIONS - catch(mockpp::AssertionFailedError &) + catch(MOCKPP_NS::AssertionFailedError &) { thrown = true; } @@ -558,7 +558,7 @@ (int) 1234, (int) 4321); } #ifndef MOCKPP_NO_EXCEPTIONS - catch(mockpp::AssertionFailedError &) + catch(MOCKPP_NS::AssertionFailedError &) { thrown = true; } @@ -572,7 +572,7 @@ MOCKPP_ASSERT_EQUALS_MESSAGE(MOCKPP_PCHAR(""), (int) 1234, (int) 4321); } #ifndef MOCKPP_NO_EXCEPTIONS - catch(mockpp::AssertionFailedError &) + catch(MOCKPP_NS::AssertionFailedError &) { thrown = true; } @@ -596,7 +596,7 @@ MOCKPP_CHAR('x'), MOCKPP_CHAR('u')); } #ifndef MOCKPP_NO_EXCEPTIONS - catch(mockpp::AssertionFailedError &) + catch(MOCKPP_NS::AssertionFailedError &) { thrown = true; } @@ -610,7 +610,7 @@ MOCKPP_ASSERT_EQUALS_MESSAGE(MOCKPP_PCHAR(""), MOCKPP_CHAR('x'), MOCKPP_CHAR('u')); } #ifndef MOCKPP_NO_EXCEPTIONS - catch(mockpp::AssertionFailedError &) + catch(MOCKPP_NS::AssertionFailedError &) { thrown = true; } @@ -634,7 +634,7 @@ (bool)true, (bool)false); } #ifndef MOCKPP_NO_EXCEPTIONS - catch(mockpp::AssertionFailedError &) + catch(MOCKPP_NS::AssertionFailedError &) { thrown = true; } @@ -648,7 +648,7 @@ MOCKPP_ASSERT_EQUALS_MESSAGE(MOCKPP_PCHAR(""), (bool)true, (bool)false); } #ifndef MOCKPP_NO_EXCEPTIONS - catch(mockpp::AssertionFailedError &) + catch(MOCKPP_NS::AssertionFailedError &) { thrown = true; } @@ -684,7 +684,7 @@ (double)12.5, (double)13.1, (double)0.5); } #ifndef MOCKPP_NO_EXCEPTIONS - catch(mockpp::AssertionFailedError &) + catch(MOCKPP_NS::AssertionFailedError &) { thrown = true; } @@ -698,7 +698,7 @@ MOCKPP_ASSERT_DELTA((double)12.5, (double)13.1, (double)-0.5); } #ifndef MOCKPP_NO_EXCEPTIONS - catch(mockpp::AssertionFailedError &) + catch(MOCKPP_NS::AssertionFailedError &) { thrown = true; } @@ -734,7 +734,7 @@ (float)12.5, (float)11.9, (float)0.5); } #ifndef MOCKPP_NO_EXCEPTIONS - catch(mockpp::AssertionFailedError &) + catch(MOCKPP_NS::AssertionFailedError &) { thrown = true; } @@ -748,7 +748,7 @@ MOCKPP_ASSERT_DELTA((float)12.5, (float)11.9, (float)0.5); } #ifndef MOCKPP_NO_EXCEPTIONS - catch(mockpp::AssertionFailedError &) + catch(MOCKPP_NS::AssertionFailedError &) { thrown = true; } @@ -774,7 +774,7 @@ MOCKPP_ASSERT_TRUE_MESSAGE(MOCKPP_PCHAR("assertTrue 1 != 1"), 1 != 1); } #ifndef MOCKPP_NO_EXCEPTIONS - catch(mockpp::AssertionFailedError &) + catch(MOCKPP_NS::AssertionFailedError &) { thrown = true; } @@ -788,7 +788,7 @@ MOCKPP_ASSERT_TRUE_MESSAGE(MOCKPP_PCHAR(""), 1 != 1); } #ifndef MOCKPP_NO_EXCEPTIONS - catch(mockpp::AssertionFailedError &) + catch(MOCKPP_NS::AssertionFailedError &) { thrown = true; } @@ -802,7 +802,7 @@ MOCKPP_ASSERT_FALSE_MESSAGE(MOCKPP_PCHAR("assertTrue 1 == 1"), 1 == 1); } #ifndef MOCKPP_NO_EXCEPTIONS - catch(mockpp::AssertionFailedError &) + catch(MOCKPP_NS::AssertionFailedError &) { thrown = true; } @@ -816,7 +816,7 @@ MOCKPP_ASSERT_FALSE_MESSAGE(MOCKPP_PCHAR(""), 1 == 1); } #ifndef MOCKPP_NO_EXCEPTIONS - catch(mockpp::AssertionFailedError &) + catch(MOCKPP_NS::AssertionFailedError &) { thrown = true; } @@ -833,7 +833,7 @@ MOCKPP_FAIL(MOCKPP_PCHAR("")); } #ifndef MOCKPP_NO_EXCEPTIONS - catch(mockpp::AssertionFailedError &) + catch(MOCKPP_NS::AssertionFailedError &) { thrown = true; } @@ -850,7 +850,7 @@ MOCKPP_FAIL(MOCKPP_PCHAR("fail with msg")); } #ifndef MOCKPP_NO_EXCEPTIONS - catch(mockpp::AssertionFailedError &) + catch(MOCKPP_NS::AssertionFailedError &) { thrown = true; } @@ -874,7 +874,7 @@ MOCKPP_ASSERT_BOUNDARY(2, 4, 1); } #ifndef MOCKPP_NO_EXCEPTIONS - catch(mockpp::AssertionFailedError &) + catch(MOCKPP_NS::AssertionFailedError &) { thrown = true; } @@ -888,7 +888,7 @@ MOCKPP_ASSERT_BOUNDARY(2, 4, 5); } #ifndef MOCKPP_NO_EXCEPTIONS - catch(mockpp::AssertionFailedError &) + catch(MOCKPP_NS::AssertionFailedError &) { thrown = true; ... [truncated message content] |
Update of /cvsroot/mockpp/mockpp/mockpp/visiting In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv763/mockpp/visiting Modified Files: CountedVisitableMethod.h ResponseVector1.h ResponseVector2.h ResponseVector3.h ResponseVector4.h ResponseVector5.h ResponseVector6.h VisitableMockMethod.cpp VisitableMockMethod.h VisitableMockMethod0.h VisitableMockMethod1.h VisitableMockMethod2.h VisitableMockMethod3.h VisitableMockMethod4.h VisitableMockMethod5.h VisitableMockMethod6.h VisitableMockObject.cpp VisitableMockObject.h VisitableMockObject_macro.h VisitableMockObject_template.h gen_countvisitable_N.pl gen_responsevector_N.pl gen_visitablemethod_N.pl Log Message: optionally disable mockpp namespace Index: ResponseVector3.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/visiting/ResponseVector3.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ResponseVector3.h 29 Dec 2005 19:29:52 -0000 1.2 +++ ResponseVector3.h 15 Mar 2006 21:34:09 -0000 1.3 @@ -35,7 +35,7 @@ #include <mockpp/constraint/IsEqual.h> -namespace mockpp { +MOCKPP_NS_START /** Class returning a throwable depending on the parameters @@ -92,9 +92,9 @@ { counter.push_back(count); tvec.push_back(t); - typename mockpp::Constraint<P1>::AP cons1 (p1); - typename mockpp::Constraint<P2>::AP cons2 (p2); - typename mockpp::Constraint<P3>::AP cons3 (p3); + typename MOCKPP_NS::Constraint<P1>::AP cons1 (p1); + typename MOCKPP_NS::Constraint<P2>::AP cons2 (p2); + typename MOCKPP_NS::Constraint<P3>::AP cons3 (p3); t1vec.push_back(cons1.release()); t2vec.push_back(cons2.release()); t3vec.push_back(cons3.release()); @@ -286,7 +286,7 @@ MOCKPP_STL::vector<R> rvec; }; -} // ns mockpp +MOCKPP_NS_END #endif // MOCKPP_ResponseVector3_H Index: ResponseVector2.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/visiting/ResponseVector2.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ResponseVector2.h 29 Dec 2005 19:29:52 -0000 1.2 +++ ResponseVector2.h 15 Mar 2006 21:34:09 -0000 1.3 @@ -35,7 +35,7 @@ #include <mockpp/constraint/IsEqual.h> -namespace mockpp { +MOCKPP_NS_START /** Class returning a throwable depending on the parameters @@ -88,8 +88,8 @@ { counter.push_back(count); tvec.push_back(t); - typename mockpp::Constraint<P1>::AP cons1 (p1); - typename mockpp::Constraint<P2>::AP cons2 (p2); + typename MOCKPP_NS::Constraint<P1>::AP cons1 (p1); + typename MOCKPP_NS::Constraint<P2>::AP cons2 (p2); t1vec.push_back(cons1.release()); t2vec.push_back(cons2.release()); } @@ -265,7 +265,7 @@ MOCKPP_STL::vector<R> rvec; }; -} // ns mockpp +MOCKPP_NS_END #endif // MOCKPP_ResponseVector2_H Index: VisitableMockObject_macro.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/visiting/VisitableMockObject_macro.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- VisitableMockObject_macro.h 29 Dec 2005 19:29:52 -0000 1.2 +++ VisitableMockObject_macro.h 15 Mar 2006 21:34:10 -0000 1.3 @@ -193,9 +193,9 @@ } #define MOCKPP_CONTROLLER_IMPL_THROW(methname) \ - void addThrowable(mockpp::Throwable *t_) \ + void addThrowable(MOCKPP_NS::Throwable *t_) \ { \ - std::auto_ptr<mockpp::Throwable> at (t_); \ + std::auto_ptr<MOCKPP_NS::Throwable> at (t_); \ MOCKPP_ASSERT_FALSE(objptr->isActivated()); \ objptr->methname ## Throwables.push_back(at.release()); \ objptr->methname ## ThrowableInsteadReturn.push_back(true); \ @@ -205,12 +205,12 @@ void addThrowable(const T &w, unsigned count = 1) \ { \ for ( ; count > 0; --count) \ - addThrowable(mockpp::make_throwable(w)); \ + addThrowable(MOCKPP_NS::make_throwable(w)); \ } \ \ - void setDefaultThrowable(mockpp::Throwable *t_) \ + void setDefaultThrowable(MOCKPP_NS::Throwable *t_) \ { \ - std::auto_ptr<mockpp::Throwable> at (t_); \ + std::auto_ptr<MOCKPP_NS::Throwable> at (t_); \ MOCKPP_ASSERT_FALSE(objptr->isActivated()); \ objptr->methname ## DefaultThrowable.take(at.release()); \ } @@ -223,15 +223,15 @@ { \ if (objptr->methname ## haveDefaultReturnValue) \ { \ - mockpp::String fmt = mockpp_i18n(MOCKPP_PCHAR("%1 is unused.")); \ + MOCKPP_NS::String fmt = mockpp_i18n(MOCKPP_PCHAR("%1 is unused.")); \ fmt << MOCKPP_PCHAR(#methname) MOCKPP_PCHAR("DefaultReturnValueUsed"); \ MOCKPP_ASSERT_TRUE_MESSAGE(fmt, objptr->methname ## DefaultReturnValueUsed); \ } \ \ - mockpp::Throwable *dt = objptr->methname ## DefaultThrowable.get(); \ + MOCKPP_NS::Throwable *dt = objptr->methname ## DefaultThrowable.get(); \ if (dt != 0) \ { \ - mockpp::String fmt = mockpp_i18n(MOCKPP_PCHAR("%1 is unused.")); \ + MOCKPP_NS::String fmt = mockpp_i18n(MOCKPP_PCHAR("%1 is unused.")); \ fmt << MOCKPP_PCHAR(#methname) MOCKPP_PCHAR("DefaultThrowable"); \ MOCKPP_ASSERT_TRUE_MESSAGE(fmt, dt->hasThrown()); \ } \ @@ -244,10 +244,10 @@ #define MOCKPP_CONTROLLER_IMPL_VOID_VERIFY(methname) \ virtual void verify() \ { \ - mockpp::Throwable *dt = objptr->methname ## DefaultThrowable.get(); \ + MOCKPP_NS::Throwable *dt = objptr->methname ## DefaultThrowable.get(); \ if (dt != 0) \ { \ - mockpp::String fmt = mockpp_i18n(MOCKPP_PCHAR("%1 is unused.")); \ + MOCKPP_NS::String fmt = mockpp_i18n(MOCKPP_PCHAR("%1 is unused.")); \ fmt << MOCKPP_PCHAR(#methname) MOCKPP_PCHAR("DefaultThrowable"); \ MOCKPP_ASSERT_TRUE_MESSAGE(fmt, dt->hasThrown()); \ } \ @@ -286,7 +286,7 @@ objptr->methname ## ResponseValues.add(rv, (type1&)p1, count); \ } \ \ - void addResponseValue(const ret_type &rv, const mockpp::ConstraintHolder< type1 > &p1, unsigned count = MOCKPP_UNLIMITED) \ + void addResponseValue(const ret_type &rv, const MOCKPP_NS::ConstraintHolder< type1 > &p1, unsigned count = MOCKPP_UNLIMITED) \ { \ MOCKPP_ASSERT_FALSE(objptr->isActivated()); \ objptr->methname ## ResponseValues.add(rv, p1, count); \ @@ -299,8 +299,8 @@ objptr->methname ## ResponseValues.add(rv, (type1&)p1, (type2&)p2, count); \ } \ \ - void addResponseValue(const ret_type &rv, const mockpp::ConstraintHolder< type1 > &p1, \ - const mockpp::ConstraintHolder< type2 > &p2, unsigned count = MOCKPP_UNLIMITED) \ + void addResponseValue(const ret_type &rv, const MOCKPP_NS::ConstraintHolder< type1 > &p1, \ + const MOCKPP_NS::ConstraintHolder< type2 > &p2, unsigned count = MOCKPP_UNLIMITED) \ { \ MOCKPP_ASSERT_FALSE(objptr->isActivated()); \ objptr->methname ## ResponseValues.add(rv, p1, p2, count); \ @@ -313,9 +313,9 @@ objptr->methname ## ResponseValues.add(rv, (type1&)p1, (type2&)p2, (type3&)p3, count); \ } \ \ - void addResponseValue(const ret_type &rv, const mockpp::ConstraintHolder< type1 > &p1, \ - const mockpp::ConstraintHolder< type2 > &p2, \ - const mockpp::ConstraintHolder< type3 > &p3, unsigned count = MOCKPP_UNLIMITED) \ + void addResponseValue(const ret_type &rv, const MOCKPP_NS::ConstraintHolder< type1 > &p1, \ + const MOCKPP_NS::ConstraintHolder< type2 > &p2, \ + const MOCKPP_NS::ConstraintHolder< type3 > &p3, unsigned count = MOCKPP_UNLIMITED) \ { \ MOCKPP_ASSERT_FALSE(objptr->isActivated()); \ objptr->methname ## ResponseValues.add(rv, p1, p2, p3, count); \ @@ -328,10 +328,10 @@ objptr->methname ## ResponseValues.add(rv, (type1 &)p1, (type2 &)p2, (type3 &)p3, (type4 &)p4, count); \ } \ \ - void addResponseValue(const ret_type &rv, const mockpp::ConstraintHolder< type1 > &p1, \ - const mockpp::ConstraintHolder< type2 > &p2, \ - const mockpp::ConstraintHolder< type3 > &p3, \ - const mockpp::ConstraintHolder< type4 > &p4, unsigned count = MOCKPP_UNLIMITED) \ + void addResponseValue(const ret_type &rv, const MOCKPP_NS::ConstraintHolder< type1 > &p1, \ + const MOCKPP_NS::ConstraintHolder< type2 > &p2, \ + const MOCKPP_NS::ConstraintHolder< type3 > &p3, \ + const MOCKPP_NS::ConstraintHolder< type4 > &p4, unsigned count = MOCKPP_UNLIMITED) \ { \ MOCKPP_ASSERT_FALSE(objptr->isActivated()); \ objptr->methname ## ResponseValues.add(rv, p1, p2, p3, p4, count); \ @@ -344,11 +344,11 @@ objptr->methname ## ResponseValues.add(rv, (type1)p1, (type2)p2, (type3)p3, (type4)p4, (type5)p5, count); \ } \ \ - void addResponseValue(const ret_type &rv, const mockpp::ConstraintHolder< type1 > &p1, \ - const mockpp::ConstraintHolder< type2 > &p2, \ - const mockpp::ConstraintHolder< type3 > &p3, \ - const mockpp::ConstraintHolder< type4 > &p4, \ - const mockpp::ConstraintHolder< type5 > &p5, unsigned count = MOCKPP_UNLIMITED) \ + void addResponseValue(const ret_type &rv, const MOCKPP_NS::ConstraintHolder< type1 > &p1, \ + const MOCKPP_NS::ConstraintHolder< type2 > &p2, \ + const MOCKPP_NS::ConstraintHolder< type3 > &p3, \ + const MOCKPP_NS::ConstraintHolder< type4 > &p4, \ + const MOCKPP_NS::ConstraintHolder< type5 > &p5, unsigned count = MOCKPP_UNLIMITED) \ { \ MOCKPP_ASSERT_FALSE(objptr->isActivated()); \ objptr->methname ## ResponseValues.add(rv, p1, p2, p3, p4, p5, count); \ @@ -359,75 +359,75 @@ // #define MOCKPP_CONTROLLER_IMPL_RESP_THROW1(methname, type1) \ - void addResponseThrowable(mockpp::Throwable *t, const type1 &p1, unsigned count = MOCKPP_UNLIMITED) \ + void addResponseThrowable(MOCKPP_NS::Throwable *t, const type1 &p1, unsigned count = MOCKPP_UNLIMITED) \ { \ MOCKPP_ASSERT_FALSE(objptr->isActivated()); \ objptr->methname ## ResponseValues.add(t, (type1&)p1, count); \ } \ \ - void addResponseThrowable(mockpp::Throwable *t, const mockpp::ConstraintHolder< type1 > &p1, unsigned count = MOCKPP_UNLIMITED) \ + void addResponseThrowable(MOCKPP_NS::Throwable *t, const MOCKPP_NS::ConstraintHolder< type1 > &p1, unsigned count = MOCKPP_UNLIMITED) \ { \ MOCKPP_ASSERT_FALSE(objptr->isActivated()); \ objptr->methname ## ResponseValues.add(t, p1, count); \ } #define MOCKPP_CONTROLLER_IMPL_RESP_THROW2(methname, type1, type2) \ - void addResponseThrowable(mockpp::Throwable *t, const type1 &p1, const type2 &p2, unsigned count = MOCKPP_UNLIMITED) \ + void addResponseThrowable(MOCKPP_NS::Throwable *t, const type1 &p1, const type2 &p2, unsigned count = MOCKPP_UNLIMITED) \ { \ MOCKPP_ASSERT_FALSE(objptr->isActivated()); \ objptr->methname ## ResponseValues.add(t, (type1&)p1, (type2&)p2, count); \ } \ \ - void addResponseThrowable(mockpp::Throwable *t, const mockpp::ConstraintHolder< type1 > &p1, \ - const mockpp::ConstraintHolder< type2 > &p2, unsigned count = MOCKPP_UNLIMITED) \ + void addResponseThrowable(MOCKPP_NS::Throwable *t, const MOCKPP_NS::ConstraintHolder< type1 > &p1, \ + const MOCKPP_NS::ConstraintHolder< type2 > &p2, unsigned count = MOCKPP_UNLIMITED) \ { \ MOCKPP_ASSERT_FALSE(objptr->isActivated()); \ objptr->methname ## ResponseValues.add(t, p1, p2, count); \ } #define MOCKPP_CONTROLLER_IMPL_RESP_THROW3(methname, type1, type2, type3) \ - void addResponseThrowable(mockpp::Throwable *t, const type1 &p1, const type2 &p2, const type3 &p3, unsigned count = MOCKPP_UNLIMITED) \ + void addResponseThrowable(MOCKPP_NS::Throwable *t, const type1 &p1, const type2 &p2, const type3 &p3, unsigned count = MOCKPP_UNLIMITED) \ { \ MOCKPP_ASSERT_FALSE(objptr->isActivated()); \ objptr->methname ## ResponseValues.add(t, (type1 &)p1, (type2&)p2, (type3&)p3, count); \ } \ \ - void addResponseThrowable(mockpp::Throwable *t, const mockpp::ConstraintHolder< type1 > &p1, \ - const mockpp::ConstraintHolder< type2 > &p2, \ - const mockpp::ConstraintHolder< type3 > &p3, unsigned count = MOCKPP_UNLIMITED) \ + void addResponseThrowable(MOCKPP_NS::Throwable *t, const MOCKPP_NS::ConstraintHolder< type1 > &p1, \ + const MOCKPP_NS::ConstraintHolder< type2 > &p2, \ + const MOCKPP_NS::ConstraintHolder< type3 > &p3, unsigned count = MOCKPP_UNLIMITED) \ { \ MOCKPP_ASSERT_FALSE(objptr->isActivated()); \ objptr->methname ## ResponseValues.add(t, p1, p2, p3, count); \ } #define MOCKPP_CONTROLLER_IMPL_RESP_THROW4(methname, type1, type2, type3, type4) \ - void addResponseThrowable(mockpp::Throwable *t, const type1 &p1, const type2 &p2, const type3 &p3, const type4 &p4, unsigned count = MOCKPP_UNLIMITED) \ + void addResponseThrowable(MOCKPP_NS::Throwable *t, const type1 &p1, const type2 &p2, const type3 &p3, const type4 &p4, unsigned count = MOCKPP_UNLIMITED) \ { \ MOCKPP_ASSERT_FALSE(objptr->isActivated()); \ objptr->methname ## ResponseValues.add(t, (type1 &)p1, (type2 &)p2, (type3 &)p3, (type4 &)p4, count); \ } \ \ - void addResponseThrowable(mockpp::Throwable *t, const mockpp::ConstraintHolder< type1 > &p1, \ - const mockpp::ConstraintHolder< type2 > &p2, \ - const mockpp::ConstraintHolder< type3 > &p3, \ - const mockpp::ConstraintHolder< type4 > &p4, unsigned count = MOCKPP_UNLIMITED) \ + void addResponseThrowable(MOCKPP_NS::Throwable *t, const MOCKPP_NS::ConstraintHolder< type1 > &p1, \ + const MOCKPP_NS::ConstraintHolder< type2 > &p2, \ + const MOCKPP_NS::ConstraintHolder< type3 > &p3, \ + const MOCKPP_NS::ConstraintHolder< type4 > &p4, unsigned count = MOCKPP_UNLIMITED) \ { \ MOCKPP_ASSERT_FALSE(objptr->isActivated()); \ objptr->methname ## ResponseValues.add(t, p1, p2, p3, p4, count); \ } #define MOCKPP_CONTROLLER_IMPL_RESP_THROW5(methname, type1, type2, type3, type4, type5) \ - void addResponseThrowable(mockpp::Throwable *t, const type1 &p1, const type2 &p2, const type3 &p3, const type4 &p4, const type5 &p5, unsigned count = MOCKPP_UNLIMITED) \ + void addResponseThrowable(MOCKPP_NS::Throwable *t, const type1 &p1, const type2 &p2, const type3 &p3, const type4 &p4, const type5 &p5, unsigned count = MOCKPP_UNLIMITED) \ { \ MOCKPP_ASSERT_FALSE(objptr->isActivated()); \ objptr->methname ## ResponseValues.add(t, (type1)p1, (type2)p2, (type3)p3, (type4)p4, (type5)p5, count); \ } \ \ - void addResponseThrowable(mockpp::Throwable *t, const mockpp::ConstraintHolder< type1 > &p1, \ - const mockpp::ConstraintHolder< type2 > &p2, \ - const mockpp::ConstraintHolder< type3 > &p3, \ - const mockpp::ConstraintHolder< type4 > &p4, \ - const mockpp::ConstraintHolder< type5 > &p5, unsigned count = MOCKPP_UNLIMITED) \ + void addResponseThrowable(MOCKPP_NS::Throwable *t, const MOCKPP_NS::ConstraintHolder< type1 > &p1, \ + const MOCKPP_NS::ConstraintHolder< type2 > &p2, \ + const MOCKPP_NS::ConstraintHolder< type3 > &p3, \ + const MOCKPP_NS::ConstraintHolder< type4 > &p4, \ + const MOCKPP_NS::ConstraintHolder< type5 > &p5, unsigned count = MOCKPP_UNLIMITED) \ { \ MOCKPP_ASSERT_FALSE(objptr->isActivated()); \ objptr->methname ## ResponseValues.add(t, p1, p2, p3, p4, p5, count); \ @@ -440,7 +440,7 @@ #define MOCKPP_CONTROLLER_DECL_START(classname, methname) \ friend class ControllerFor ## methname; \ public: \ - class ControllerFor ## methname : public mockpp::VisitableMockObject::Controller \ + class ControllerFor ## methname : public MOCKPP_NS::VisitableMockObject::Controller \ { \ classname *objptr; \ public: \ @@ -585,13 +585,13 @@ // #define MOCKPP_DECLARE_DEFAULT_VARS(name) \ - mockpp::ThrowableItem name ## DefaultThrowable; \ - mutable mockpp::ThrowableList name ## Throwables; \ + MOCKPP_NS::ThrowableItem name ## DefaultThrowable; \ + mutable MOCKPP_NS::ThrowableList name ## Throwables; \ bool name ## ThrowablesInline; \ mutable MOCKPP_STL::vector<bool> name ## ThrowableInsteadReturn #define MOCKPP_DECLARE_RETURN_VARS(ret_type, name) \ - mutable mockpp::ReturnObjectList< ret_type > name ## ReturnValues; \ + mutable MOCKPP_NS::ReturnObjectList< ret_type > name ## ReturnValues; \ bool name ## haveDefaultReturnValue; \ mutable bool name ## DefaultReturnValueUsed; \ ret_type name ## DefaultReturnValue @@ -601,23 +601,23 @@ // #define MOCKPP_DECLARE_PARAMETER_VARS1(name, type1) \ - mutable mockpp::ConstraintList< type1 > name ## Parameter1 + mutable MOCKPP_NS::ConstraintList< type1 > name ## Parameter1 #define MOCKPP_DECLARE_PARAMETER_VARS2(name, type1, type2) \ MOCKPP_DECLARE_PARAMETER_VARS1(name, type1); \ - mutable mockpp::ConstraintList< type2 > name ## Parameter2 + mutable MOCKPP_NS::ConstraintList< type2 > name ## Parameter2 #define MOCKPP_DECLARE_PARAMETER_VARS3(name, type1, type2, type3) \ MOCKPP_DECLARE_PARAMETER_VARS2(name, type1, type2); \ - mutable mockpp::ConstraintList< type3 > name ## Parameter3 + mutable MOCKPP_NS::ConstraintList< type3 > name ## Parameter3 #define MOCKPP_DECLARE_PARAMETER_VARS4(name, type1, type2, type3, type4) \ MOCKPP_DECLARE_PARAMETER_VARS3(name, type1, type2, type3); \ - mutable mockpp::ConstraintList< type4 > name ## Parameter4 + mutable MOCKPP_NS::ConstraintList< type4 > name ## Parameter4 #define MOCKPP_DECLARE_PARAMETER_VARS5(name, type1, type2, type3, type4, type5) \ MOCKPP_DECLARE_PARAMETER_VARS4(name, type1, type2, type3, type4); \ - mutable mockpp::ConstraintList< type5 > name ## Parameter5 + mutable MOCKPP_NS::ConstraintList< type5 > name ## Parameter5 //////////////////////////////////////////////////////////////////////////// // @@ -671,7 +671,7 @@ } \ if (do_throw && name ## Throwables.hasMoreObjects() != 0) \ { \ - mockpp::Throwable *thr = name ## Throwables.nextThrowableObject(); \ + MOCKPP_NS::Throwable *thr = name ## Throwables.nextThrowableObject(); \ if (thr != 0) \ thr->throw_me(); \ } \ @@ -691,12 +691,12 @@ MOCKPP_STL::string func_name (#m_name); \ if (!isActivated() ) \ { \ - addExpectedMethod(mockpp::getLatin1(getVerifiableName()) + "." + func_name); \ + addExpectedMethod(MOCKPP_NS::getLatin1(getVerifiableName()) + "." + func_name); \ return;\ } \ else \ { \ - addActualMethod(mockpp::getLatin1(getVerifiableName()) + "." + func_name); \ + addActualMethod(MOCKPP_NS::getLatin1(getVerifiableName()) + "." + func_name); \ MOCKPP_THROWER_IMPL(m_name ); \ return;\ } \ @@ -721,15 +721,15 @@ MOCKPP_STL::string func_name (#m_name); \ if (!isActivated() ) \ { \ - addExpectedMethod(mockpp::getLatin1(getVerifiableName()) + "." + func_name); \ + addExpectedMethod(MOCKPP_NS::getLatin1(getVerifiableName()) + "." + func_name); \ m_name ## Parameter1.addExpected((v_type1)param1); \ return; \ } \ else \ { \ MOCKPP_TRY { \ - addActualMethod(mockpp::getLatin1(getVerifiableName()) + "." + func_name); \ - mockpp::Throwable *t; \ + addActualMethod(MOCKPP_NS::getLatin1(getVerifiableName()) + "." + func_name); \ + MOCKPP_NS::Throwable *t; \ if (m_name ## ResponseValues.find(t, (v_type1)param1)) \ t->throw_me(); \ MOCKPP_THROWER_IMPL(m_name); \ @@ -742,14 +742,14 @@ } \ } \ \ - void a_name (const mockpp::ConstraintHolder< v_type1 > ¶m1) /* @todo const? */ \ + void a_name (const MOCKPP_NS::ConstraintHolder< v_type1 > ¶m1) /* @todo const? */ \ { \ - addExpectedMethod(mockpp::getLatin1(getVerifiableName()) + "." + #m_name); \ + addExpectedMethod(MOCKPP_NS::getLatin1(getVerifiableName()) + "." + #m_name); \ m_name ## Parameter1.addExpected(param1); \ } \ MOCKPP_MEMBER_RESTRICTOR_PRIVATE: \ MOCKPP_DECLARE_DEFAULT_VARS(m_name); \ - mutable mockpp::ResponseThrowableVector1< v_type1 > m_name ## ResponseValues; \ + mutable MOCKPP_NS::ResponseThrowableVector1< v_type1 > m_name ## ResponseValues; \ MOCKPP_DECLARE_PARAMETER_VARS1(m_name, v_type1); \ MOCKPP_VOID_CONTROLLER_DECL1(classname, m_name, v_type1) @@ -771,7 +771,7 @@ MOCKPP_STL::string func_name (#m_name); \ if (!isActivated() ) \ { \ - addExpectedMethod(mockpp::getLatin1(getVerifiableName()) + "." + func_name); \ + addExpectedMethod(MOCKPP_NS::getLatin1(getVerifiableName()) + "." + func_name); \ m_name ## Parameter1.addExpected((v_type1)param1); \ m_name ## Parameter2.addExpected((v_type2)param2); \ return; \ @@ -779,8 +779,8 @@ else \ { \ MOCKPP_TRY { \ - addActualMethod(mockpp::getLatin1(getVerifiableName()) + "." + func_name); \ - mockpp::Throwable *t; \ + addActualMethod(MOCKPP_NS::getLatin1(getVerifiableName()) + "." + func_name); \ + MOCKPP_NS::Throwable *t; \ if (m_name ## ResponseValues.find(t, (v_type1)param1, (v_type2)param2)) \ t->throw_me(); \ MOCKPP_THROWER_IMPL(m_name); \ @@ -795,16 +795,16 @@ } \ } \ \ - void a_name(const mockpp::ConstraintHolder< v_type1 > ¶m1, \ - const mockpp::ConstraintHolder< v_type2 > ¶m2) /* @todo const? */ \ + void a_name(const MOCKPP_NS::ConstraintHolder< v_type1 > ¶m1, \ + const MOCKPP_NS::ConstraintHolder< v_type2 > ¶m2) /* @todo const? */ \ { \ - addExpectedMethod(mockpp::getLatin1(getVerifiableName()) + "." + #m_name); \ + addExpectedMethod(MOCKPP_NS::getLatin1(getVerifiableName()) + "." + #m_name); \ m_name ## Parameter1.addExpected(param1); \ m_name ## Parameter2.addExpected(param2); \ } \ MOCKPP_MEMBER_RESTRICTOR_PRIVATE: \ MOCKPP_DECLARE_DEFAULT_VARS(m_name); \ - mutable mockpp::ResponseThrowableVector2< v_type1, v_type2 > m_name ## ResponseValues; \ + mutable MOCKPP_NS::ResponseThrowableVector2< v_type1, v_type2 > m_name ## ResponseValues; \ MOCKPP_DECLARE_PARAMETER_VARS2(m_name, v_type1, v_type2); \ MOCKPP_VOID_CONTROLLER_DECL2(classname, m_name, v_type1, v_type2) @@ -828,7 +828,7 @@ MOCKPP_STL::string func_name (#m_name); \ if (!isActivated() ) \ { \ - addExpectedMethod(mockpp::getLatin1(getVerifiableName()) + "." + func_name); \ + addExpectedMethod(MOCKPP_NS::getLatin1(getVerifiableName()) + "." + func_name); \ m_name ## Parameter1.addExpected((v_type1)param1); \ m_name ## Parameter2.addExpected((v_type2)param2); \ m_name ## Parameter3.addExpected((v_type3)param3); \ @@ -837,8 +837,8 @@ else \ { \ MOCKPP_TRY { \ - addActualMethod(mockpp::getLatin1(getVerifiableName()) + "." + func_name); \ - mockpp::Throwable *t; \ + addActualMethod(MOCKPP_NS::getLatin1(getVerifiableName()) + "." + func_name); \ + MOCKPP_NS::Throwable *t; \ if (m_name ## ResponseValues.find(t, (v_type1)param1, (v_type2)param2, (v_type3)param3)) \ t->throw_me(); \ MOCKPP_THROWER_IMPL(m_name); \ @@ -855,18 +855,18 @@ } \ } \ \ - void a_name(const mockpp::ConstraintHolder< v_type1 > ¶m1, \ - const mockpp::ConstraintHolder< v_type2 > ¶m2, \ - const mockpp::ConstraintHolder< v_type3 > ¶m3) /* @todo const? */ \ + void a_name(const MOCKPP_NS::ConstraintHolder< v_type1 > ¶m1, \ + const MOCKPP_NS::ConstraintHolder< v_type2 > ¶m2, \ + const MOCKPP_NS::ConstraintHolder< v_type3 > ¶m3) /* @todo const? */ \ { \ - addExpectedMethod(mockpp::getLatin1(getVerifiableName()) + "." + #m_name); \ + addExpectedMethod(MOCKPP_NS::getLatin1(getVerifiableName()) + "." + #m_name); \ m_name ## Parameter1.addExpected(param1); \ m_name ## Parameter2.addExpected(param2); \ m_name ## Parameter3.addExpected(param3); \ } \ MOCKPP_MEMBER_RESTRICTOR_PRIVATE: \ MOCKPP_DECLARE_DEFAULT_VARS(m_name); \ - mutable mockpp::ResponseThrowableVector3< v_type1, v_type2, v_type3 > m_name ## ResponseValues; \ + mutable MOCKPP_NS::ResponseThrowableVector3< v_type1, v_type2, v_type3 > m_name ## ResponseValues; \ MOCKPP_DECLARE_PARAMETER_VARS3(m_name, v_type1, v_type2, v_type3); \ MOCKPP_VOID_CONTROLLER_DECL3(classname, m_name, v_type1, v_type2, v_type3) @@ -892,7 +892,7 @@ MOCKPP_STL::string func_name (#m_name); \ if (!isActivated() ) \ { \ - addExpectedMethod(mockpp::getLatin1(getVerifiableName()) + "." + func_name); \ + addExpectedMethod(MOCKPP_NS::getLatin1(getVerifiableName()) + "." + func_name); \ m_name ## Parameter1.addExpected((v_type1)param1); \ m_name ## Parameter2.addExpected((v_type2)param2); \ m_name ## Parameter3.addExpected((v_type3)param3); \ @@ -902,8 +902,8 @@ else \ { \ MOCKPP_TRY { \ - addActualMethod(mockpp::getLatin1(getVerifiableName()) + "." + func_name); \ - mockpp::Throwable *t; \ + addActualMethod(MOCKPP_NS::getLatin1(getVerifiableName()) + "." + func_name); \ + MOCKPP_NS::Throwable *t; \ if (m_name ## ResponseValues.find(t, (v_type1)param1, (v_type2)param2, (v_type3)param3, (v_type4)param4)) \ t->throw_me(); \ MOCKPP_THROWER_IMPL(m_name); \ @@ -922,12 +922,12 @@ } \ } \ \ - void a_name(const mockpp::ConstraintHolder< v_type1 > ¶m1, \ - const mockpp::ConstraintHolder< v_type2 > ¶m2, \ - const mockpp::ConstraintHolder< v_type3 > ¶m3, \ - const mockpp::ConstraintHolder< v_type4 > ¶m4) /* @todo const? */ \ + void a_name(const MOCKPP_NS::ConstraintHolder< v_type1 > ¶m1, \ + const MOCKPP_NS::ConstraintHolder< v_type2 > ¶m2, \ + const MOCKPP_NS::ConstraintHolder< v_type3 > ¶m3, \ + const MOCKPP_NS::ConstraintHolder< v_type4 > ¶m4) /* @todo const? */ \ { \ - addExpectedMethod(mockpp::getLatin1(getVerifiableName()) + "." + #m_name); \ + addExpectedMethod(MOCKPP_NS::getLatin1(getVerifiableName()) + "." + #m_name); \ m_name ## Parameter1.addExpected(param1); \ m_name ## Parameter2.addExpected(param2); \ m_name ## Parameter3.addExpected(param3); \ @@ -935,7 +935,7 @@ } \ MOCKPP_MEMBER_RESTRICTOR_PRIVATE: \ MOCKPP_DECLARE_DEFAULT_VARS(m_name); \ - mutable mockpp::ResponseThrowableVector4< v_type1, v_type2, v_type3, v_type4 > m_name ## ResponseValues; \ + mutable MOCKPP_NS::ResponseThrowableVector4< v_type1, v_type2, v_type3, v_type4 > m_name ## ResponseValues; \ MOCKPP_DECLARE_PARAMETER_VARS4(m_name, v_type1, v_type2, v_type3, v_type4); \ MOCKPP_VOID_CONTROLLER_DECL4(classname, m_name, v_type1, v_type2, v_type3, v_type4) @@ -963,7 +963,7 @@ MOCKPP_STL::string func_name (#m_name); \ if (!isActivated() ) \ { \ - addExpectedMethod(mockpp::getLatin1(getVerifiableName()) + "." + func_name); \ + addExpectedMethod(MOCKPP_NS::getLatin1(getVerifiableName()) + "." + func_name); \ m_name ## Parameter1.addExpected((v_type1)param1); \ m_name ## Parameter2.addExpected((v_type2)param2); \ m_name ## Parameter3.addExpected((v_type3)param3); \ @@ -974,8 +974,8 @@ else \ { \ MOCKPP_TRY { \ - addActualMethod(mockpp::getLatin1(getVerifiableName()) + "." + func_name); \ - mockpp::Throwable *t; \ + addActualMethod(MOCKPP_NS::getLatin1(getVerifiableName()) + "." + func_name); \ + MOCKPP_NS::Throwable *t; \ if (m_name ## ResponseValues.find(t, (v_type1)param1, (v_type2)param2, (v_type3)param3, (v_type4)param4, (v_type5)param5)) \ t->throw_me(); \ MOCKPP_THROWER_IMPL(m_name); \ @@ -996,13 +996,13 @@ } \ } \ \ - void a_name(const mockpp::ConstraintHolder< v_type1 > ¶m1, \ - const mockpp::ConstraintHolder< v_type2 > ¶m2, \ - const mockpp::ConstraintHolder< v_type3 > ¶m3, \ - const mockpp::ConstraintHolder< v_type4 > ¶m4, \ - const mockpp::ConstraintHolder< v_type5 > ¶m5) /* @todo const? */ \ + void a_name(const MOCKPP_NS::ConstraintHolder< v_type1 > ¶m1, \ + const MOCKPP_NS::ConstraintHolder< v_type2 > ¶m2, \ + const MOCKPP_NS::ConstraintHolder< v_type3 > ¶m3, \ + const MOCKPP_NS::ConstraintHolder< v_type4 > ¶m4, \ + const MOCKPP_NS::ConstraintHolder< v_type5 > ¶m5) /* @todo const? */ \ { \ - addExpectedMethod(mockpp::getLatin1(getVerifiableName()) + "." + #m_name); \ + addExpectedMethod(MOCKPP_NS::getLatin1(getVerifiableName()) + "." + #m_name); \ m_name ## Parameter1.addExpected(param1); \ m_name ## Parameter2.addExpected(param2); \ m_name ## Parameter3.addExpected(param3); \ @@ -1011,7 +1011,7 @@ } \ MOCKPP_MEMBER_RESTRICTOR_PRIVATE: \ MOCKPP_DECLARE_DEFAULT_VARS(m_name); \ - mutable mockpp::ResponseThrowableVector5< v_type1, v_type2, v_type3, v_type4, v_type5 > m_name ## ResponseValues; \ + mutable MOCKPP_NS::ResponseThrowableVector5< v_type1, v_type2, v_type3, v_type4, v_type5 > m_name ## ResponseValues; \ MOCKPP_DECLARE_PARAMETER_VARS5(m_name, v_type1, v_type2, v_type3, v_type4, v_type5); \ MOCKPP_VOID_CONTROLLER_DECL5(classname, m_name, v_type1, v_type2, v_type3, v_type4, v_type5) @@ -1030,13 +1030,13 @@ MOCKPP_STL::string func_name = #m_name; \ if (!isActivated() ) \ { \ - addExpectedMethod(mockpp::getLatin1(getVerifiableName()) + "." + func_name); \ + addExpectedMethod(MOCKPP_NS::getLatin1(getVerifiableName()) + "." + func_name); \ v_ret_type ret_val = v_ret_type(); \ return ret_val; \ } \ else \ { \ - addActualMethod(mockpp::getLatin1(getVerifiableName()) + "." + func_name); \ + addActualMethod(MOCKPP_NS::getLatin1(getVerifiableName()) + "." + func_name); \ MOCKPP_THROWER_IMPL(m_name); \ \ if (m_name ## ReturnValues.hasMoreObjects()) \ @@ -1070,7 +1070,7 @@ MOCKPP_STL::string func_name = #m_name; \ if (!isActivated() ) \ { \ - addExpectedMethod(mockpp::getLatin1(getVerifiableName()) + "." + func_name); \ + addExpectedMethod(MOCKPP_NS::getLatin1(getVerifiableName()) + "." + func_name); \ m_name ## Parameter1.addExpected((v_type1)param1); \ v_ret_type ret_val = v_ret_type(); \ return ret_val; \ @@ -1078,8 +1078,8 @@ else \ { \ MOCKPP_TRY { \ - addActualMethod(mockpp::getLatin1(getVerifiableName()) + "." + func_name); \ - mockpp::Throwable *t; \ + addActualMethod(MOCKPP_NS::getLatin1(getVerifiableName()) + "." + func_name); \ + MOCKPP_NS::Throwable *t; \ if (m_name ## ResponseValues.find(t, (v_type1)param1)) \ t->throw_me(); \ MOCKPP_THROWER_IMPL(m_name); \ @@ -1100,16 +1100,16 @@ } \ } \ \ - m_ret_type a_name(const mockpp::ConstraintHolder< v_type1 > ¶m1) /* @todo const? */ \ + m_ret_type a_name(const MOCKPP_NS::ConstraintHolder< v_type1 > ¶m1) /* @todo const? */ \ { \ - addExpectedMethod(mockpp::getLatin1(getVerifiableName()) + "." + #m_name); \ + addExpectedMethod(MOCKPP_NS::getLatin1(getVerifiableName()) + "." + #m_name); \ m_name ## Parameter1.addExpected(param1); \ return v_ret_type(); \ } \ MOCKPP_MEMBER_RESTRICTOR_PRIVATE: \ MOCKPP_DECLARE_DEFAULT_VARS(m_name); \ MOCKPP_DECLARE_RETURN_VARS(v_ret_type, m_name); \ - mutable mockpp::ResponseVector1< v_ret_type, v_type1 > m_name ## ResponseValues; \ + mutable MOCKPP_NS::ResponseVector1< v_ret_type, v_type1 > m_name ## ResponseValues; \ MOCKPP_DECLARE_PARAMETER_VARS1(m_name, v_type1); \ MOCKPP_CONTROLLER_DECL1(classname, v_ret_type, m_name, v_type1) @@ -1133,7 +1133,7 @@ MOCKPP_STL::string func_name = #m_name; \ if (!isActivated() ) \ { \ - addExpectedMethod(mockpp::getLatin1(getVerifiableName()) + "." + func_name); \ + addExpectedMethod(MOCKPP_NS::getLatin1(getVerifiableName()) + "." + func_name); \ m_name ## Parameter1.addExpected((v_type1)param1); \ m_name ## Parameter2.addExpected((v_type2)param2); \ v_ret_type ret_val = v_ret_type(); \ @@ -1142,8 +1142,8 @@ else \ { \ MOCKPP_TRY { \ - addActualMethod(mockpp::getLatin1(getVerifiableName()) + "." + func_name); \ - mockpp::Throwable *t; \ + addActualMethod(MOCKPP_NS::getLatin1(getVerifiableName()) + "." + func_name); \ + MOCKPP_NS::Throwable *t; \ if (m_name ## ResponseValues.find(t, (v_type1)param1, (v_type2)param2)) \ t->throw_me(); \ MOCKPP_THROWER_IMPL(m_name); \ @@ -1166,10 +1166,10 @@ } \ } \ \ - m_ret_type a_name(const mockpp::ConstraintHolder< v_type1 > ¶m1, \ - const mockpp::ConstraintHolder< v_type2 > ¶m2) /* @todo const? */ \ + m_ret_type a_name(const MOCKPP_NS::ConstraintHolder< v_type1 > ¶m1, \ + const MOCKPP_NS::ConstraintHolder< v_type2 > ¶m2) /* @todo const? */ \ { \ - addExpectedMethod(mockpp::getLatin1(getVerifiableName()) + "." + #m_name); \ + addExpectedMethod(MOCKPP_NS::getLatin1(getVerifiableName()) + "." + #m_name); \ m_name ## Parameter1.addExpected(param1); \ m_name ## Parameter2.addExpected(param2); \ return v_ret_type(); \ @@ -1177,7 +1177,7 @@ MOCKPP_MEMBER_RESTRICTOR_PRIVATE: \ MOCKPP_DECLARE_DEFAULT_VARS(m_name); \ MOCKPP_DECLARE_RETURN_VARS(v_ret_type, m_name); \ - mutable mockpp::ResponseVector2< v_ret_type, v_type1, v_type2 > m_name ## ResponseValues; \ + mutable MOCKPP_NS::ResponseVector2< v_ret_type, v_type1, v_type2 > m_name ## ResponseValues; \ MOCKPP_DECLARE_PARAMETER_VARS2(m_name, v_type1, v_type2); \ MOCKPP_CONTROLLER_DECL2(classname, v_ret_type, m_name, v_type1, v_type2) @@ -1203,7 +1203,7 @@ MOCKPP_STL::string func_name = #m_name; \ if (!isActivated() ) \ { \ - addExpectedMethod(mockpp::getLatin1(getVerifiableName()) + "." + func_name); \ + addExpectedMethod(MOCKPP_NS::getLatin1(getVerifiableName()) + "." + func_name); \ m_name ## Parameter1.addExpected((v_type1)param1); \ m_name ## Parameter2.addExpected((v_type2)param2); \ m_name ## Parameter3.addExpected((v_type3)param3); \ @@ -1213,8 +1213,8 @@ else \ { \ MOCKPP_TRY { \ - addActualMethod(mockpp::getLatin1(getVerifiableName()) + "." + func_name); \ - mockpp::Throwable *t; \ + addActualMethod(MOCKPP_NS::getLatin1(getVerifiableName()) + "." + func_name); \ + MOCKPP_NS::Throwable *t; \ if (m_name ## ResponseValues.find(t, (v_type1)param1, (v_type2)param2, (v_type3)param3)) \ t->throw_me(); \ MOCKPP_THROWER_IMPL(m_name); \ @@ -1239,11 +1239,11 @@ } \ } \ \ - m_ret_type a_name(const mockpp::ConstraintHolder< v_type1 > ¶m1, \ - const mockpp::ConstraintHolder< v_type2 > ¶m2, \ - const mockpp::ConstraintHolder< v_type3 > ¶m3) /* @todo const? */ \ + m_ret_type a_name(const MOCKPP_NS::ConstraintHolder< v_type1 > ¶m1, \ + const MOCKPP_NS::ConstraintHolder< v_type2 > ¶m2, \ + const MOCKPP_NS::ConstraintHolder< v_type3 > ¶m3) /* @todo const? */ \ { \ - addExpectedMethod(mockpp::getLatin1(getVerifiableName()) + "." + #m_name); \ + addExpectedMethod(MOCKPP_NS::getLatin1(getVerifiableName()) + "." + #m_name); \ m_name ## Parameter1.addExpected(param1); \ m_name ## Parameter2.addExpected(param2); \ m_name ## Parameter3.addExpected(param3); \ @@ -1252,7 +1252,7 @@ MOCKPP_MEMBER_RESTRICTOR_PRIVATE: \ MOCKPP_DECLARE_DEFAULT_VARS(m_name); \ MOCKPP_DECLARE_RETURN_VARS(v_ret_type, m_name); \ - mutable mockpp::ResponseVector3< v_ret_type, v_type1, v_type2, v_type3 > m_name ## ResponseValues; \ + mutable MOCKPP_NS::ResponseVector3< v_ret_type, v_type1, v_type2, v_type3 > m_name ## ResponseValues; \ MOCKPP_DECLARE_PARAMETER_VARS3(m_name, v_type1, v_type2, v_type3); \ MOCKPP_CONTROLLER_DECL3(classname, v_ret_type, m_name, v_type1, v_type2, v_type3) @@ -1279,7 +1279,7 @@ MOCKPP_STL::string func_name = #m_name; \ if (!isActivated() ) \ { \ - addExpectedMethod(mockpp::getLatin1(getVerifiableName()) + "." + func_name); \ + addExpectedMethod(MOCKPP_NS::getLatin1(getVerifiableName()) + "." + func_name); \ m_name ## Parameter1.addExpected((v_type1)param1); \ m_name ## Parameter2.addExpected((v_type2)param2); \ m_name ## Parameter3.addExpected((v_type3)param3); \ @@ -1290,8 +1290,8 @@ else \ { \ MOCKPP_TRY { \ - addActualMethod(mockpp::getLatin1(getVerifiableName()) + "." + func_name); \ - mockpp::Throwable *t; \ + addActualMethod(MOCKPP_NS::getLatin1(getVerifiableName()) + "." + func_name); \ + MOCKPP_NS::Throwable *t; \ if (m_name ## ResponseValues.find(t, (v_type1)param1, (v_type2)param2, (v_type3)param3, (v_type4)param4)) \ t->throw_me(); \ MOCKPP_THROWER_IMPL(m_name); \ @@ -1318,12 +1318,12 @@ } \ } \ \ - m_ret_type a_name(const mockpp::ConstraintHolder< v_type1 > ¶m1, \ - const mockpp::ConstraintHolder< v_type2 > ¶m2, \ - const mockpp::ConstraintHolder< v_type3 > ¶m3, \ - const mockpp::ConstraintHolder< v_type4 > ¶m4) /* @todo const? */ \ + m_ret_type a_name(const MOCKPP_NS::ConstraintHolder< v_type1 > ¶m1, \ + const MOCKPP_NS::ConstraintHolder< v_type2 > ¶m2, \ + const MOCKPP_NS::ConstraintHolder< v_type3 > ¶m3, \ + const MOCKPP_NS::ConstraintHolder< v_type4 > ¶m4) /* @todo const? */ \ { \ - addExpectedMethod(mockpp::getLatin1(getVerifiableName()) + "." + #m_name); \ + addExpectedMethod(MOCKPP_NS::getLatin1(getVerifiableName()) + "." + #m_name); \ m_name ## Parameter1.addExpected(param1); \ m_name ## Parameter2.addExpected(param2); \ m_name ## Parameter3.addExpected(param3); \ @@ -1333,7 +1333,7 @@ MOCKPP_MEMBER_RESTRICTOR_PRIVATE: \ MOCKPP_DECLARE_DEFAULT_VARS(m_name); \ MOCKPP_DECLARE_RETURN_VARS(v_ret_type, m_name); \ - mutable mockpp::ResponseVector4< v_ret_type, v_type1, v_type2, v_type3, v_type4 > m_name ## ResponseValues; \ + mutable MOCKPP_NS::ResponseVector4< v_ret_type, v_type1, v_type2, v_type3, v_type4 > m_name ## ResponseValues; \ MOCKPP_DECLARE_PARAMETER_VARS4(m_name, v_type1, v_type2, v_type3, v_type4); \ MOCKPP_CONTROLLER_DECL4(classname, v_ret_type, m_name, v_type1, v_type2, v_type3, v_type4) @@ -1362,7 +1362,7 @@ MOCKPP_STL::string func_name = #m_name; \ if (!isActivated() ) \ { \ - addExpectedMethod(mockpp::getLatin1(getVerifiableName()) + "." + func_name); \ + addExpectedMethod(MOCKPP_NS::getLatin1(getVerifiableName()) + "." + func_name); \ m_name ## Parameter1.addExpected((v_type1)param1); \ m_name ## Parameter2.addExpected((v_type2)param2); \ m_name ## Parameter3.addExpected((v_type3)param3); \ @@ -1374,8 +1374,8 @@ else \ { \ MOCKPP_TRY { \ - addActualMethod(mockpp::getLatin1(getVerifiableName()) + "." + func_name); \ - mockpp::Throwable *t; \ + addActualMethod(MOCKPP_NS::getLatin1(getVerifiableName()) + "." + func_name); \ + MOCKPP_NS::Throwable *t; \ if (m_name ## ResponseValues.find(t, (v_type1)param1, (v_type2)param2, (v_type3)param3, (v_type4)param4, (v_type5)param5)) \ t->throw_me(); \ MOCKPP_THROWER_IMPL(m_name); \ @@ -1404,13 +1404,13 @@ } \ } \ \ - m_ret_type a_name(const mockpp::ConstraintHolder< v_type1 > ¶m1, \ - const mockpp::ConstraintHolder< v_type2 > ¶m2, \ - const mockpp::ConstraintHolder< v_type3 > ¶m3, \ - const mockpp::ConstraintHolder< v_type4 > ¶m4, \ - const mockpp::ConstraintHolder< v_type5 > ¶m5) /* @todo const? */ \ + m_ret_type a_name(const MOCKPP_NS::ConstraintHolder< v_type1 > ¶m1, \ + const MOCKPP_NS::ConstraintHolder< v_type2 > ¶m2, \ + const MOCKPP_NS::ConstraintHolder< v_type3 > ¶m3, \ + const MOCKPP_NS::ConstraintHolder< v_type4 > ¶m4, \ + const MOCKPP_NS::ConstraintHolder< v_type5 > ¶m5) /* @todo const? */ \ { \ - addExpectedMethod(mockpp::getLatin1(getVerifiableName()) + "." + #m_name); \ + addExpectedMethod(MOCKPP_NS::getLatin1(getVerifiableName()) + "." + #m_name); \ m_name ## Parameter1.addExpected(param1); \ m_name ## Parameter2.addExpected(param2); \ m_name ## Parameter3.addExpected(param3); \ @@ -1421,7 +1421,7 @@ MOCKPP_MEMBER_RESTRICTOR_PRIVATE: \ MOCKPP_DECLARE_DEFAULT_VARS(m_name); \ MOCKPP_DECLARE_RETURN_VARS(v_ret_type, m_name); \ - mutable mockpp::ResponseVector5< v_ret_type, v_type1, v_type2, v_type3, v_type4, v_type5 > m_name ## ResponseValues; \ + mutable MOCKPP_NS::ResponseVector5< v_ret_type, v_type1, v_type2, v_type3, v_type4, v_type5 > m_name ## ResponseValues; \ MOCKPP_DECLARE_PARAMETER_VARS5(m_name, v_type1, v_type2, v_type3, v_type4, v_type5); \ MOCKPP_CONTROLLER_DECL5(classname, v_ret_type, m_name, v_type1, v_type2, v_type3, v_type4, v_type5) Index: gen_visitablemethod_N.pl =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/visiting/gen_visitablemethod_N.pl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- gen_visitablemethod_N.pl 29 Dec 2005 19:29:52 -0000 1.2 +++ gen_visitablemethod_N.pl 15 Mar 2006 21:34:10 -0000 1.3 @@ -54,16 +54,16 @@ #include <mockpp/mockpp.h> -#include <mockpp/VisitableMockObject.h> -#include <mockpp/VisitableMockMethod.h>"; +#include <mockpp/visiting/VisitableMockObject.h> +#include <mockpp/visiting/VisitableMockMethod.h>"; if ($numArgs > 0){ print OUT " -#include <mockpp/ResponseVector" . $numArgs . ".h>"; } +#include <mockpp/visiting/ResponseVector" . $numArgs . ".h>"; } print OUT " -namespace mockpp { +MOCKPP_NS_START "; @@ -542,7 +542,7 @@ }; -} // ns mockpp +MOCKPP_NS_END #endif // MOCKPP_VisitableMockMethod" . $numArgs . "_H Index: CountedVisitableMethod.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/visiting/CountedVisitableMethod.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- CountedVisitableMethod.h 18 Jan 2006 19:56:50 -0000 1.5 +++ CountedVisitableMethod.h 15 Mar 2006 21:34:09 -0000 1.6 @@ -42,7 +42,7 @@ #include <mockpp/visiting/VisitableMockMethod6.h> -namespace mockpp { +MOCKPP_NS_START #ifndef MOCKPP_COUNTED_WEAKNESS @@ -455,7 +455,7 @@ #endif // MOCKPP_COUNTED_WEAKNESS -} // ns mockpp +MOCKPP_NS_END #endif // MOCKPP_COUNTEDVISITABLEMETHOD_H Index: VisitableMockMethod4.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/visiting/VisitableMockMethod4.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- VisitableMockMethod4.h 29 Dec 2005 19:29:52 -0000 1.3 +++ VisitableMockMethod4.h 15 Mar 2006 21:34:10 -0000 1.4 @@ -38,7 +38,7 @@ #include <mockpp/visiting/ResponseVector4.h> -namespace mockpp { +MOCKPP_NS_START /** Common stuff to set up visitable mock method expectations with 4 parameters. @@ -315,7 +315,7 @@ }; -} // ns mockpp +MOCKPP_NS_END #endif // MOCKPP_VisitableMockMethod4_H Index: gen_countvisitable_N.pl =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/visiting/gen_countvisitable_N.pl,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- gen_countvisitable_N.pl 18 Jan 2006 19:56:50 -0000 1.4 +++ gen_countvisitable_N.pl 15 Mar 2006 21:34:10 -0000 1.5 @@ -65,7 +65,7 @@ print OUT " -namespace mockpp { +MOCKPP_NS_START #ifndef MOCKPP_COUNTED_WEAKNESS @@ -259,7 +259,7 @@ #endif // MOCKPP_COUNTED_WEAKNESS -} // ns mockpp +MOCKPP_NS_END #endif // MOCKPP_COUNTEDVISITABLEMETHOD_H Index: VisitableMockMethod5.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/visiting/VisitableMockMethod5.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- VisitableMockMethod5.h 29 Dec 2005 19:29:52 -0000 1.3 +++ VisitableMockMethod5.h 15 Mar 2006 21:34:10 -0000 1.4 @@ -38,7 +38,7 @@ #include <mockpp/visiting/ResponseVector5.h> -namespace mockpp { +MOCKPP_NS_START /** Common stuff to set up visitable mock method expectations with 5 parameters. @@ -331,7 +331,7 @@ }; -} // ns mockpp +MOCKPP_NS_END #endif // MOCKPP_VisitableMockMethod5_H Index: VisitableMockMethod.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/visiting/VisitableMockMethod.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- VisitableMockMethod.cpp 29 Dec 2005 19:29:52 -0000 1.3 +++ VisitableMockMethod.cpp 15 Mar 2006 21:34:09 -0000 1.4 @@ -34,7 +34,7 @@ #include <mockpp/visiting/VisitableMockMethod.h> -namespace mockpp { +MOCKPP_NS_START MOCKPP_EXPORT VisitableMockMethodBase::VisitableMockMethodBase(const String &name, @@ -68,5 +68,5 @@ } -} // namespace mockpp +MOCKPP_NS_END Index: gen_responsevector_N.pl =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/visiting/gen_responsevector_N.pl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- gen_responsevector_N.pl 29 Dec 2005 19:29:52 -0000 1.2 +++ gen_responsevector_N.pl 15 Mar 2006 21:34:10 -0000 1.3 @@ -56,7 +56,7 @@ #include <mockpp/constraint/IsEqual.h> -namespace mockpp { +MOCKPP_NS_START "; @@ -223,7 +223,7 @@ tvec.push_back(t);"; for($p = 1; $p <= $numArgs; ++$p) { print OUT " - typename mockpp::Constraint<P" . $p . ">::AP cons" . $p . " (p" . $p . ");"; } + typename MOCKPP_NS::Constraint<P" . $p . ">::AP cons" . $p . " (p" . $p . ");"; } for($p = 1; $p <= $numArgs; ++$p) { print OUT " t" . $p . "vec.push_back(cons" . $p . ".release());"; } @@ -435,7 +435,7 @@ MOCKPP_STL::vector<R> rvec; }; -} // ns mockpp +MOCKPP_NS_END #endif // MOCKPP_ResponseVector" . $numArgs . "_H Index: VisitableMockMethod6.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/visiting/VisitableMockMethod6.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- VisitableMockMethod6.h 29 Dec 2005 19:29:52 -0000 1.3 +++ VisitableMockMethod6.h 15 Mar 2006 21:34:10 -0000 1.4 @@ -38,7 +38,7 @@ #include <mockpp/visiting/ResponseVector6.h> -namespace mockpp { +MOCKPP_NS_START /** Common stuff to set up visitable mock method expectations with 6 parameters. @@ -347,7 +347,7 @@ }; -} // ns mockpp +MOCKPP_NS_END #endif // MOCKPP_VisitableMockMethod6_H Index: ResponseVector4.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/visiting/ResponseVector4.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ResponseVector4.h 29 Dec 2005 19:29:52 -0000 1.2 +++ ResponseVector4.h 15 Mar 2006 21:34:09 -0000 1.3 @@ -35,7 +35,7 @@ #include <mockpp/constraint/IsEqual.h> -namespace mockpp { +MOCKPP_NS_START /** Class returning a throwable depending on the parameters @@ -96,10 +96,10 @@ { counter.push_back(count); tvec.push_back(t); - typename mockpp::Constraint<P1>::AP cons1 (p1); - typename mockpp::Constraint<P2>::AP cons2 (p2); - typename mockpp::Constraint<P3>::AP cons3 (p3); - typename mockpp::Constraint<P4>::AP cons4 (p4); + typename MOCKPP_NS::Constraint<P1>::AP cons1 (p1); + typename MOCKPP_NS::Constraint<P2>::AP cons2 (p2); + typename MOCKPP_NS::Constraint<P3>::AP cons3 (p3); + typename MOCKPP_NS::Constraint<P4>::AP cons4 (p4); t1vec.push_back(cons1.release()); t2vec.push_back(cons2.release()); t3vec.push_back(cons3.release()); @@ -307,7 +307,7 @@ MOCKPP_STL::vector<R> rvec; }; -} // ns mockpp +MOCKPP_NS_END #endif // MOCKPP_ResponseVector4_H Index: ResponseVector5.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/visiting/ResponseVector5.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ResponseVector5.h 29 Dec 2005 19:29:52 -0000 1.2 +++ ResponseVector5.h 15 Mar 2006 21:34:09 -0000 1.3 @@ -35,7 +35,7 @@ #include <mockpp/constraint/IsEqual.h> -namespace mockpp { +MOCKPP_NS_START /** Class returning a throwable depending on the parameters @@ -100,11 +100,11 @@ { counter.push_back(count); tvec.push_back(t); - typename mockpp::Constraint<P1>::AP cons1 (p1); - typename mockpp::Constraint<P2>::AP cons2 (p2); - typename mockpp::Constraint<P3>::AP cons3 (p3); - typename mockpp::Constraint<P4>::AP cons4 (p4); - typename mockpp::Constraint<P5>::AP cons5 (p5); + typename MOCKPP_NS::Constraint<P1>::AP cons1 (p1); + typename MOCKPP_NS::Constraint<P2>::AP cons2 (p2); + typename MOCKPP_NS::Constraint<P3>::AP cons3 (p3); + typename MOCKPP_NS::Constraint<P4>::AP cons4 (p4); + typename MOCKPP_NS::Constraint<P5>::AP cons5 (p5); t1vec.push_back(cons1.release()); t2vec.push_back(cons2.release()); t3vec.push_back(cons3.release()); @@ -328,7 +328,7 @@ MOCKPP_STL::vector<R> rvec; }; -} // ns mockpp +MOCKPP_NS_END #endif // MOCKPP_ResponseVector5_H Index: VisitableMockMethod0.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/visiting/VisitableMockMethod0.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- VisitableMockMethod0.h 29 Dec 2005 19:29:52 -0000 1.3 +++ VisitableMockMethod0.h 15 Mar 2006 21:34:09 -0000 1.4 @@ -37,7 +37,7 @@ #include <mockpp/visiting/VisitableMockMethod.h> -namespace mockpp { +MOCKPP_NS_START /** Common stuff to set up visitable mock method expectations with 0 parameters. @@ -150,7 +150,7 @@ }; -} // ns mockpp +MOCKPP_NS_END #endif // MOCKPP_VisitableMockMethod0_H Index: ResponseVector6.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/visiting/ResponseVector6.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ResponseVector6.h 29 Dec 2005 19:29:52 -0000 1.2 +++ ResponseVector6.h 15 Mar 2006 21:34:09 -0000 1.3 @@ -35,7 +35,7 @@ #include <mockpp/constraint/IsEqual.h> -namespace mockpp { +MOCKPP_NS_START /** Class returning a throwable depending on the parameters @@ -104,12 +104,12 @@ { counter.push_back(count); tvec.push_back(t); - typename mockpp::Constraint<P1>::AP cons1 (p1); - typename mockpp::Constraint<P2>::AP cons2 (p2); - typename mockpp::Constraint<P3>::AP cons3 (p3); - typename mockpp::Constraint<P4>::AP cons4 (p4); - typename mockpp::Constraint<P5>::AP cons5 (p5); - typename mockpp::Constraint<P6>::AP cons6 (p6); + typename MOCKPP_NS::Constraint<P1>::AP cons1 (p1); + typename MOCKPP_NS::Constraint<P2>::AP cons2 (p2); + typename MOCKPP_NS::Constraint<P3>::AP cons3 (p3); + typename MOCKPP_NS::Constraint<P4>::AP cons4 (p4); + typename MOCKPP_NS::Constraint<P5>::AP cons5 (p5); + typename MOCKPP_NS::Constraint<P6>::AP cons6 (p6); t1vec.push_back(cons1.release()); t2vec.push_back(cons2.release()); t3vec.push_back(cons3.release()); @@ -349,7 +349,7 @@ MOCKPP_STL::vector<R> rvec; }; -} // ns mockpp +MOCKPP_NS_END #endif // MOCKPP_ResponseVector6_H Index: VisitableMockMethod1.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/visiting/VisitableMockMethod1.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- VisitableMockMethod1.h 29 Dec 2005 19:29:52 -0000 1.3 +++ VisitableMockMethod1.h 15 Mar 2006 21:34:09 -0000 1.4 @@ -38,7 +38,7 @@ #include <mockpp/visiting/ResponseVector1.h> -namespace mockpp { +MOCKPP_NS_START /** Common stuff to set up visitable mock method expectations with 1 parameters. @@ -267,7 +267,7 @@ }; -} // ns mockpp +MOCKPP_NS_END #endif // MOCKPP_VisitableMockMethod1_H Index: VisitableMockMethod.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/visiting/VisitableMockMethod.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- VisitableMockMethod.h 29 Dec 2005 19:29:52 -0000 1.3 +++ VisitableMockMethod.h 15 Mar 2006 21:34:09 -0000 1.4 @@ -37,7 +37,7 @@ //#include <mockpp/CountedVisitableMethod.h> -namespace mockpp { +MOCKPP_NS_START /** Base of all mock methods. @@ -302,7 +302,7 @@ }; -} // namespace mockpp +MOCKPP_NS_END #endif // MOCKPP_VisitableMockMethod_H Index: VisitableMockMethod2.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/visiting/VisitableMockMethod2.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- VisitableMockMethod2.h 29 Dec 2005 19:29:52 -0000 1.3 +++ VisitableMockMethod2.h 15 Mar 2006 21:34:10 -0000 1.4 @@ -38,7 +38,7 @@ #include <mockpp/visiting/ResponseVector2.h> -namespace mockpp { +MOCKPP_NS_START /** Common stuff to set up visitable mock method expectations with 2 parameters. @@ -283,7 +283,7 @@ }; -} // ns mockpp +MOCKPP_NS_END #endif // MOCKPP_VisitableMockMethod2_H Index: VisitableMockObject_template.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/visiting/VisitableMockObject_template.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- VisitableMockObject_template.h 29 Dec 2005 19:29:52 -0000 1.2 +++ VisitableMockObject_template.h 15 Mar 2006 21:34:10 -0000 1.3 @@ -35,7 +35,7 @@ #include <mockpp/constraint/IsEqual.h> -namespace mockpp { +MOCKPP_NS_START #ifndef DOXYGEN_SHOULD_SKIP_THIS @@ -97,7 +97,7 @@ #endif // DOXYGEN_SHOULD_SKIP_THIS -} // namespace mockpp +MOCKPP_NS_END #include "ResponseVector1.h" Index: VisitableMockObject.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/visiting/VisitableMockObject.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- VisitableMockObject.cpp 3 Jan 2006 15:12:35 -0000 1.4 +++ VisitableMockObject.cpp 15 Mar 2006 21:34:10 -0000 1.5 @@ -33,7 +33,7 @@ #include <mockpp/visiting/VisitableMockObject.h> -namespace mockpp { +MOCKPP_NS_START MOCKPP_EXPORT VisitableMockObjectBase::VisitableMockObjectBase(const String &name, VerifiableList *parent) @@ -155,4 +155,4 @@ } -} // namespace mockpp +MOCKPP_NS_END Index: VisitableMockMethod3.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/visiting/VisitableMockMethod3.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- VisitableMockMethod3.h 29 Dec 2005 19:29:52 -0000 1.3 +++ VisitableMockMethod3.h 15 Mar 2006 21:34:10 -0000 1.4 @@ -38,7 +38,7 @@ #include <mockpp/visiting/ResponseVector3.h> -namespace mockpp { +MOCKPP_NS_START /** Common stuff to set up visitable mock method expectations with 3 parameters. @@ -299,7 +299,7 @@ }; -} // ns mockpp +MOCKPP_NS_END #endif // MOCKPP_VisitableMockMethod3_H Index: ResponseVector1.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/visiting/ResponseVector1.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ResponseVector1.h 29 Dec 2005 19:29:52 -0000 1.2 +++ ResponseVector1.h 15 Mar 2006 21:34:09 -0000 1.3 @@ -35,7 +35,7 @@ #include <mockpp/constraint/IsEqual.h> -namespace mockpp { +MOCKPP_NS_START /** Class returning a throwable depending on the parameters @@ -84,7 +84,7 @@ { counter.push_back(count); tvec.push_back(t); - typename mockpp::Constraint<P1>::AP cons1 (p1); + typename MOCKPP_NS::Constraint<P1>::AP cons1 (p1); t1vec.push_back(cons1.release()); } @@ -244,7 +244,7 @@ MOCKPP_STL::vector<R> rvec; }; -} // ns mockpp +MOCKPP_NS_END #endif // MOCKPP_ResponseVector1_H Index: VisitableMockObject.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/visiting/VisitableMockObject.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- VisitableMockObject.h 3 Jan 2006 15:12:35 -0000 1.4 +++ VisitableMockObjec... [truncated message content] |
Update of /cvsroot/mockpp/mockpp/mockpp/matcher In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv763/mockpp/matcher Modified Files: AnyArgumentsMatcher.h ArgumentsMatcher.h InvocationMatcher.h InvokeAtLeastMatcher.cpp InvokeAtLeastMatcher.h InvokeAtLeastOnceMatcher.cpp InvokeAtLeastOnceMatcher.h InvokeAtMostMatcher.cpp InvokeAtMostMatcher.h InvokeCountMatcher.cpp InvokeCountMatcher.h InvokeOnceMatcher.cpp InvokeOnceMatcher.h InvokedAfterMatcher.h InvokedBeforeMatcher.h InvokedRecorder.cpp InvokedRecorder.h MatcherHolder.h NoArgumentsMatcher.h StatelessInvocationMatcher.h TestFailureMatcher.cpp TestFailureMatcher.h TypelessMatcher.cpp TypelessMatcher.h UnlimitedMatcher.cpp UnlimitedMatcher.h Log Message: optionally disable mockpp namespace Index: InvokeOnceMatcher.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/matcher/InvokeOnceMatcher.h,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- InvokeOnceMatcher.h 29 Dec 2005 19:29:51 -0000 1.21 +++ InvokeOnceMatcher.h 15 Mar 2006 21:34:06 -0000 1.22 @@ -39,12 +39,12 @@ #include <mockpp/matcher/InvokedRecorder.h> -namespace mockpp { +MOCKPP_NS_START /** Has the method been invoked exactly once? * @ingroup grp_matcher - * @see mockpp::once + * @see MOCKPP_NS::once */ class InvokeOnceMatcher : public InvokedRecorder { @@ -73,7 +73,7 @@ }; -} // namespace mockpp +MOCKPP_NS_END #endif // MOCKPP_INVOKEONCEMATCHER_H Index: MatcherHolder.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/matcher/MatcherHolder.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- MatcherHolder.h 29 Dec 2005 19:29:51 -0000 1.10 +++ MatcherHolder.h 15 Mar 2006 21:34:06 -0000 1.11 @@ -39,7 +39,7 @@ #include <mockpp/matcher/TypelessMatcher.h> -namespace mockpp { +MOCKPP_NS_START /** Proxy class to conveniently move Matchers into matcher related methods. @@ -102,7 +102,7 @@ }; -} // namespace mockpp +MOCKPP_NS_END #endif // MOCKPP_MATCHERHOLDER_H Index: TypelessMatcher.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/matcher/TypelessMatcher.h,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- TypelessMatcher.h 29 Dec 2005 19:29:51 -0000 1.16 +++ TypelessMatcher.h 15 Mar 2006 21:34:06 -0000 1.17 @@ -42,7 +42,7 @@ #include <mockpp/matcher/InvocationMatcher.h> -namespace mockpp { +MOCKPP_NS_START /** Base for matchers regardless of method parameter values. @@ -150,7 +150,7 @@ }; -} // namespace mockpp +MOCKPP_NS_END #endif // MOCKPP_TYPELESSMATCHER_H Index: AnyArgumentsMatcher.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/matcher/AnyArgumentsMatcher.h,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- AnyArgumentsMatcher.h 29 Dec 2005 19:29:51 -0000 1.16 +++ AnyArgumentsMatcher.h 15 Mar 2006 21:34:06 -0000 1.17 @@ -39,11 +39,11 @@ #include <mockpp/matcher/StatelessInvocationMatcher.h> -namespace mockpp { +MOCKPP_NS_START /** Matches any arguments. * @ingroup grp_matcher - * @see mockpp::any + * @see MOCKPP_NS::any */ template <typename I> // Invocation class AnyArgumentsMatcher : public StatelessInvocationMatcher<I> @@ -72,7 +72,7 @@ }; -} // namespace mockpp +MOCKPP_NS_END #endif // MOCKPP_ANYARGUMENTSMATCHER_H Index: ArgumentsMatcher.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/matcher/ArgumentsMatcher.h,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- ArgumentsMatcher.h 29 Dec 2005 19:29:51 -0000 1.20 +++ ArgumentsMatcher.h 15 Mar 2006 21:34:06 -0000 1.21 @@ -42,7 +42,7 @@ #include <mockpp/matcher/StatelessInvocationMatcher.h> -namespace mockpp { +MOCKPP_NS_START /** Match the arguments passed to a mock method. @@ -90,7 +90,7 @@ }; -} // namespace mockpp +MOCKPP_NS_END #endif // MOCKPP_ARGUMENTSMATCHER_H Index: InvokedAfterMatcher.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/matcher/InvokedAfterMatcher.h,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- InvokedAfterMatcher.h 29 Dec 2005 19:29:51 -0000 1.22 +++ InvokedAfterMatcher.h 15 Mar 2006 21:34:06 -0000 1.23 @@ -40,12 +40,12 @@ #include <mockpp/matcher/InvokedRecorder.h> -namespace mockpp { +MOCKPP_NS_START /** Has the method been invoked after another? * @ingroup grp_matcher - * @see mockpp::MatchBuilder::after + * @see MOCKPP_NS::MatchBuilder::after */ template <typename I> // Invocation class InvokedAfterMatcher : public StatelessInvocationMatcher<I> @@ -107,7 +107,7 @@ }; -} // namespace mockpp +MOCKPP_NS_END #endif // MOCKPP_INVOKEDAFTERMATCHER_H Index: TypelessMatcher.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/matcher/TypelessMatcher.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- TypelessMatcher.cpp 29 Dec 2005 19:29:51 -0000 1.5 +++ TypelessMatcher.cpp 15 Mar 2006 21:34:06 -0000 1.6 @@ -32,7 +32,7 @@ #include <mockpp/matcher/TypelessMatcher.h> -namespace mockpp { +MOCKPP_NS_START MOCKPP_EXPORT TypelessMatcher::TypelessMatcher() @@ -51,5 +51,5 @@ } -} // namespace mockpp +MOCKPP_NS_END Index: InvokedRecorder.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/matcher/InvokedRecorder.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- InvokedRecorder.cpp 29 Dec 2005 19:29:51 -0000 1.5 +++ InvokedRecorder.cpp 15 Mar 2006 21:34:06 -0000 1.6 @@ -36,7 +36,7 @@ #include <mockpp/matcher/InvokedRecorder.h> -namespace mockpp { +MOCKPP_NS_START MOCKPP_EXPORT InvokedRecorder::InvokedRecorder() @@ -108,4 +108,4 @@ } -} // namespace mockpp +MOCKPP_NS_END Index: InvokeAtMostMatcher.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/matcher/InvokeAtMostMatcher.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- InvokeAtMostMatcher.cpp 29 Dec 2005 19:29:51 -0000 1.4 +++ InvokeAtMostMatcher.cpp 15 Mar 2006 21:34:06 -0000 1.5 @@ -33,7 +33,7 @@ #include <mockpp/matcher/InvokeAtMostMatcher.h> -namespace mockpp { +MOCKPP_NS_START MOCKPP_EXPORT InvokeAtMostMatcher::InvokeAtMostMatcher( int count ) @@ -79,6 +79,6 @@ } -} // namespace mockpp +MOCKPP_NS_END Index: UnlimitedMatcher.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/matcher/UnlimitedMatcher.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- UnlimitedMatcher.h 29 Dec 2005 19:29:51 -0000 1.3 +++ UnlimitedMatcher.h 15 Mar 2006 21:34:06 -0000 1.4 @@ -38,12 +38,12 @@ #include <mockpp/matcher/InvokedRecorder.h> -namespace mockpp { +MOCKPP_NS_START /** Matches any invcotion * @ingroup grp_matcher - * @see mockpp::unlimited + * @see MOCKPP_NS::unlimited */ class UnlimitedMatcher : public InvokedRecorder { @@ -71,7 +71,7 @@ }; -} // namespace mockpp +MOCKPP_NS_END #endif // MOCKPP_UnlimitedMATCHER_H Index: InvokeCountMatcher.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/matcher/InvokeCountMatcher.h,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- InvokeCountMatcher.h 29 Dec 2005 19:29:51 -0000 1.20 +++ InvokeCountMatcher.h 15 Mar 2006 21:34:06 -0000 1.21 @@ -39,12 +39,12 @@ #include <mockpp/matcher/InvokedRecorder.h> -namespace mockpp { +MOCKPP_NS_START /** Has the object been invoked a given number? * @ingroup grp_matcher - * @see mockpp::exactly + * @see MOCKPP_NS::exactly */ class InvokeCountMatcher : public InvokedRecorder { @@ -86,7 +86,7 @@ }; -} // namespace mockpp +MOCKPP_NS_END #endif // MOCKPP_INVOKECOUNTMATCHER_H Index: InvokeAtLeastMatcher.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/matcher/InvokeAtLeastMatcher.h,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- InvokeAtLeastMatcher.h 29 Dec 2005 19:29:51 -0000 1.13 +++ InvokeAtLeastMatcher.h 15 Mar 2006 21:34:06 -0000 1.14 @@ -35,12 +35,12 @@ #include <mockpp/matcher/InvokedRecorder.h> -namespace mockpp { +MOCKPP_NS_START /** Has the method been invoked at least a count? * @ingroup grp_matcher - * @see mockpp::atLeast + * @see MOCKPP_NS::atLeast */ class InvokeAtLeastMatcher : public InvokedRecorder { @@ -82,7 +82,7 @@ }; -} // namespace mockpp +MOCKPP_NS_END #endif // MOCKPP_INVOKEATLEASTMATCHER_H Index: InvocationMatcher.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/matcher/InvocationMatcher.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- InvocationMatcher.h 29 Dec 2005 19:29:51 -0000 1.10 +++ InvocationMatcher.h 15 Mar 2006 21:34:06 -0000 1.11 @@ -45,7 +45,7 @@ #include <mockpp/util/AutoPointer.h> -namespace mockpp { +MOCKPP_NS_START /** Base for invocation matchers. Matchers form a sub-expectation of a @@ -97,7 +97,7 @@ }; -} // namespace mockpp +MOCKPP_NS_END #endif // MOCKPP_INVOCATIONMATCHER_H Index: UnlimitedMatcher.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/matcher/UnlimitedMatcher.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- UnlimitedMatcher.cpp 29 Dec 2005 19:29:51 -0000 1.2 +++ UnlimitedMatcher.cpp 15 Mar 2006 21:34:06 -0000 1.3 @@ -36,7 +36,7 @@ #include <mockpp/matcher/UnlimitedMatcher.h> -namespace mockpp { +MOCKPP_NS_START void MOCKPP_EXPORT UnlimitedMatcher::verify() @@ -69,5 +69,5 @@ } -} // namespace mockpp +MOCKPP_NS_END Index: InvokeAtLeastOnceMatcher.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/matcher/InvokeAtLeastOnceMatcher.h,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- InvokeAtLeastOnceMatcher.h 29 Dec 2005 19:29:51 -0000 1.23 +++ InvokeAtLeastOnceMatcher.h 15 Mar 2006 21:34:06 -0000 1.24 @@ -38,12 +38,12 @@ #include <mockpp/matcher/InvokedRecorder.h> -namespace mockpp { +MOCKPP_NS_START /** Has the method been invoked at least once? * @ingroup grp_matcher - * @see mockpp::atLeastOnce + * @see MOCKPP_NS::atLeastOnce */ class InvokeAtLeastOnceMatcher : public InvokedRecorder { @@ -72,7 +72,7 @@ }; -} // namespace mockpp +MOCKPP_NS_END #endif // MOCKPP_INVOKEATLEASTONCEMATCHER_H Index: InvokeCountMatcher.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/matcher/InvokeCountMatcher.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- InvokeCountMatcher.cpp 29 Dec 2005 19:29:51 -0000 1.4 +++ InvokeCountMatcher.cpp 15 Mar 2006 21:34:06 -0000 1.5 @@ -36,7 +36,7 @@ #include <mockpp/matcher/InvokeCountMatcher.h> -namespace mockpp { +MOCKPP_NS_START MOCKPP_EXPORT InvokeCountMatcher::InvokeCountMatcher( int count ) @@ -77,6 +77,6 @@ } -} // namespace mockpp +MOCKPP_NS_END Index: InvokeAtLeastOnceMatcher.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/matcher/InvokeAtLeastOnceMatcher.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- InvokeAtLeastOnceMatcher.cpp 29 Dec 2005 19:29:51 -0000 1.2 +++ InvokeAtLeastOnceMatcher.cpp 15 Mar 2006 21:34:06 -0000 1.3 @@ -35,7 +35,7 @@ #include <mockpp/matcher/InvokeAtLeastOnceMatcher.h> -namespace mockpp { +MOCKPP_NS_START void MOCKPP_EXPORT InvokeAtLeastOnceMatcher::verify() { @@ -66,6 +66,6 @@ } -} // namespace mockpp +MOCKPP_NS_END Index: TestFailureMatcher.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/matcher/TestFailureMatcher.h,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- TestFailureMatcher.h 29 Dec 2005 19:29:51 -0000 1.23 +++ TestFailureMatcher.h 15 Mar 2006 21:34:06 -0000 1.24 @@ -40,12 +40,12 @@ #include <mockpp/matcher/TypelessMatcher.h> -namespace mockpp { +MOCKPP_NS_START /** An invocation count matcher that always fails upon invocation * @ingroup grp_matcher - * @see mockpp::never + * @see MOCKPP_NS::never */ class TestFailureMatcher : public TypelessMatcher { @@ -88,7 +88,7 @@ }; -} // namespace mockpp +MOCKPP_NS_END #endif // MOCKPP_TESTFAILUREMATCHER_H Index: TestFailureMatcher.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/matcher/TestFailureMatcher.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- TestFailureMatcher.cpp 29 Dec 2005 19:29:51 -0000 1.5 +++ TestFailureMatcher.cpp 15 Mar 2006 21:34:06 -0000 1.6 @@ -37,7 +37,7 @@ #include <mockpp/compat/AssertionFailedError.h> -namespace mockpp { +MOCKPP_NS_START MOCKPP_EXPORT TestFailureMatcher::TestFailureMatcher( const String &msg ) @@ -77,6 +77,6 @@ } -} // namespace mockpp +MOCKPP_NS_END Index: InvokeAtLeastMatcher.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/matcher/InvokeAtLeastMatcher.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- InvokeAtLeastMatcher.cpp 29 Dec 2005 19:29:51 -0000 1.4 +++ InvokeAtLeastMatcher.cpp 15 Mar 2006 21:34:06 -0000 1.5 @@ -32,7 +32,7 @@ #include <mockpp/matcher/InvokeAtLeastMatcher.h> -namespace mockpp { +MOCKPP_NS_START MOCKPP_EXPORT InvokeAtLeastMatcher::InvokeAtLeastMatcher( int count ) @@ -78,5 +78,5 @@ } -} // namespace mockpp +MOCKPP_NS_END Index: InvokeOnceMatcher.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/matcher/InvokeOnceMatcher.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- InvokeOnceMatcher.cpp 29 Dec 2005 19:29:51 -0000 1.4 +++ InvokeOnceMatcher.cpp 15 Mar 2006 21:34:06 -0000 1.5 @@ -36,7 +36,7 @@ #include <mockpp/matcher/InvokeOnceMatcher.h> -namespace mockpp { +MOCKPP_NS_START bool MOCKPP_EXPORT InvokeOnceMatcher::matches( ) @@ -66,5 +66,5 @@ } -} // namespace mockpp +MOCKPP_NS_END Index: InvokeAtMostMatcher.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/matcher/InvokeAtMostMatcher.h,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- InvokeAtMostMatcher.h 29 Dec 2005 19:29:51 -0000 1.16 +++ InvokeAtMostMatcher.h 15 Mar 2006 21:34:06 -0000 1.17 @@ -34,12 +34,12 @@ #include <mockpp/matcher/InvokedRecorder.h> -namespace mockpp { +MOCKPP_NS_START /** Has the method been invoked a maximal number of times? * @ingroup grp_matcher - * @see mockpp::atMost + * @see MOCKPP_NS::atMost */ class InvokeAtMostMatcher : public InvokedRecorder { @@ -81,7 +81,7 @@ }; -} // namespace mockpp +MOCKPP_NS_END #endif // MOCKPP_INVOKEATMOSTMATCHER_H Index: NoArgumentsMatcher.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/matcher/NoArgumentsMatcher.h,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- NoArgumentsMatcher.h 29 Dec 2005 19:29:51 -0000 1.16 +++ NoArgumentsMatcher.h 15 Mar 2006 21:34:06 -0000 1.17 @@ -41,7 +41,7 @@ #include "StatelessInvocationMatcher.h" -namespace mockpp { +MOCKPP_NS_START /** Matches no arguments at all. * Not too useful but may be nice to express the intent. @@ -74,7 +74,7 @@ }; -} // namespace mockpp +MOCKPP_NS_END #endif // MOCKPP_NOARGUMENTSMATCHER_H Index: StatelessInvocationMatcher.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/matcher/StatelessInvocationMatcher.h,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- StatelessInvocationMatcher.h 29 Dec 2005 19:29:51 -0000 1.22 +++ StatelessInvocationMatcher.h 15 Mar 2006 21:34:06 -0000 1.23 @@ -41,7 +41,7 @@ #include <mockpp/matcher/InvocationMatcher.h> -namespace mockpp { +MOCKPP_NS_START /** Base for invocation matcher with no-chaning state. @@ -79,7 +79,7 @@ }; -} // namespace mockpp +MOCKPP_NS_END #endif // MOCKPP_STATELESSINVOCATIONMATCHER_H Index: InvokedRecorder.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/matcher/InvokedRecorder.h,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- InvokedRecorder.h 29 Dec 2005 19:29:51 -0000 1.28 +++ InvokedRecorder.h 15 Mar 2006 21:34:06 -0000 1.29 @@ -43,7 +43,7 @@ #include <mockpp/compat/Formatter.h> -namespace mockpp { +MOCKPP_NS_START /** Base for objects that match invocation counts. @@ -114,7 +114,7 @@ }; -} // namespace mockpp +MOCKPP_NS_END #endif // MOCKPP_INVOKEDRECORDER_H Index: InvokedBeforeMatcher.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/matcher/InvokedBeforeMatcher.h,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- InvokedBeforeMatcher.h 29 Dec 2005 19:29:51 -0000 1.12 +++ InvokedBeforeMatcher.h 15 Mar 2006 21:34:06 -0000 1.13 @@ -36,12 +36,12 @@ #include <mockpp/matcher/InvokedRecorder.h> -namespace mockpp { +MOCKPP_NS_START /** Has the method been invoked before another? * @ingroup grp_matcher - * @see mockpp::MatchBuilder::before + * @see MOCKPP_NS::MatchBuilder::before */ template <typename I> // Invocation class InvokedBeforeMatcher : public StatelessInvocationMatcher<I> @@ -102,7 +102,7 @@ }; -} // namespace mockpp +MOCKPP_NS_END #endif // MOCKPP_INVOKEDBEFOREMATCHER_H |
Update of /cvsroot/mockpp/mockpp/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv763/mockpp Modified Files: AbstractExpectation.h AbstractExpectationCollection.h CountParameters.h Expectation.h ExpectationBoundary.h ExpectationConglomeration.h ExpectationCounter.cpp ExpectationCounter.h ExpectationList.h ExpectationMap.h ExpectationSegment.h ExpectationSet.h ExpectationValue.h MixedMockObject.cpp MixedMockObject.h MockObject.cpp MockObject.h MockTimeServer.cpp MockTimeServer.h ReturnObjectList.h SelfDescribing.cpp SelfDescribing.h Throwable.cpp Throwable.h ThrowableList.cpp ThrowableList.h TrackingCounter.cpp TrackingCounter.h Verifiable.cpp Verifiable.h VerifiableList.cpp VerifiableList.h gen_countparams_N.pl mockpp.cpp mockpp.h mockpp_dbc.h Log Message: optionally disable mockpp namespace Index: TrackingCounter.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/TrackingCounter.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- TrackingCounter.cpp 29 Dec 2005 19:29:50 -0000 1.13 +++ TrackingCounter.cpp 15 Mar 2006 21:33:56 -0000 1.14 @@ -38,7 +38,7 @@ #include <mockpp/compat/Formatter.h> -namespace mockpp { +MOCKPP_NS_START MOCKPP_EXPORT @@ -284,4 +284,4 @@ } -} // namespace mockpp +MOCKPP_NS_END Index: ExpectationCounter.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/ExpectationCounter.h,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- ExpectationCounter.h 29 Dec 2005 19:29:50 -0000 1.24 +++ ExpectationCounter.h 15 Mar 2006 21:33:56 -0000 1.25 @@ -36,7 +36,7 @@ #include <mockpp/AbstractExpectation.h> -namespace mockpp { +MOCKPP_NS_START /** A class to verify the expected count of an event. @@ -114,7 +114,7 @@ }; -} // namespace mockpp +MOCKPP_NS_END #endif // MOCKPP_EXPECTATIONCOUNTER_H Index: ExpectationList.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/ExpectationList.h,v retrieving revision 1.41 retrieving revision 1.42 diff -u -d -r1.41 -r1.42 --- ExpectationList.h 29 Dec 2005 19:29:50 -0000 1.41 +++ ExpectationList.h 15 Mar 2006 21:33:56 -0000 1.42 @@ -39,7 +39,7 @@ #include <mockpp/util/AssertMo.h> -namespace mockpp { +MOCKPP_NS_START /** A class to verify lists of expectations, one after the other as they occur. @@ -248,7 +248,7 @@ }; -} // namespace mockpp +MOCKPP_NS_END #endif // MOCKPP_EXPECTATIONLIST_H Index: ExpectationConglomeration.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/ExpectationConglomeration.h,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- ExpectationConglomeration.h 29 Dec 2005 19:29:50 -0000 1.21 +++ ExpectationConglomeration.h 15 Mar 2006 21:33:56 -0000 1.22 @@ -41,7 +41,7 @@ #include <mockpp/ExpectationBoundary.h> -namespace mockpp { +MOCKPP_NS_START /** A class to verify conglomerations of expectations: each expected object must occur at @@ -281,7 +281,7 @@ -} // namespace mockpp +MOCKPP_NS_END #endif // MOCKPP_EXPECTATIONCONGLOMERATION_H Index: ExpectationValue.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/ExpectationValue.h,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- ExpectationValue.h 29 Dec 2005 19:29:50 -0000 1.32 +++ ExpectationValue.h 15 Mar 2006 21:33:56 -0000 1.33 @@ -38,7 +38,7 @@ #include <mockpp/util/AssertMo.h> -namespace mockpp { +MOCKPP_NS_START /** A class to verify the equality of expected and actual value. @@ -227,7 +227,7 @@ #endif // DOXYGEN_SHOULD_SKIP_THIS -} // namespace mockpp +MOCKPP_NS_END #endif // MOCKPP_EXPECTATIONVALUE_H Index: Throwable.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/Throwable.h,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- Throwable.h 29 Dec 2005 19:29:50 -0000 1.19 +++ Throwable.h 15 Mar 2006 21:33:56 -0000 1.20 @@ -33,7 +33,7 @@ #include <mockpp/mockpp.h> // always first -namespace mockpp { +MOCKPP_NS_START /** A virtual base class to handle throwable objects @@ -210,7 +210,7 @@ }; -} // namespace mockpp +MOCKPP_NS_END #endif // MOCKPP_THROWABLE_H Index: MockObject.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/MockObject.h,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- MockObject.h 29 Dec 2005 19:29:50 -0000 1.24 +++ MockObject.h 15 Mar 2006 21:33:56 -0000 1.25 @@ -35,7 +35,7 @@ #include <mockpp/VerifiableList.h> -namespace mockpp { +MOCKPP_NS_START /** Advanced Mock Objects provide functionality for some of the common * tasks to set up behaviour for a mock object. @@ -110,7 +110,7 @@ }; -} // namespace mockpp +MOCKPP_NS_END #endif // MOCKPP_MOCKOBJECTS_H Index: SelfDescribing.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/SelfDescribing.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- SelfDescribing.h 29 Dec 2005 19:29:50 -0000 1.6 +++ SelfDescribing.h 15 Mar 2006 21:33:56 -0000 1.7 @@ -37,7 +37,7 @@ #include <mockpp/mockpp.h> // always first -namespace mockpp { +MOCKPP_NS_START /** An object that can describe itself. @@ -65,7 +65,7 @@ }; -} // namespace mockpp +MOCKPP_NS_END #endif // MOCKPP_SELFDESCRIBING_H Index: SelfDescribing.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/SelfDescribing.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- SelfDescribing.cpp 29 Dec 2005 19:29:50 -0000 1.3 +++ SelfDescribing.cpp 15 Mar 2006 21:33:56 -0000 1.4 @@ -36,7 +36,7 @@ #include <mockpp/SelfDescribing.h> -namespace mockpp { +MOCKPP_NS_START MOCKPP_EXPORT String SelfDescribing::toString() const @@ -51,5 +51,5 @@ } -} // namespace mockpp +MOCKPP_NS_END Index: VerifiableList.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/VerifiableList.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- VerifiableList.cpp 29 Dec 2005 19:29:50 -0000 1.21 +++ VerifiableList.cpp 15 Mar 2006 21:33:58 -0000 1.22 @@ -37,7 +37,7 @@ #include <mockpp/compat/Asserter.h> -namespace mockpp { +MOCKPP_NS_START MOCKPP_EXPORT VerifiableList::VerifiableList (const String &name, VerifiableList *parent) @@ -91,5 +91,5 @@ } -} // namespace mockpp +MOCKPP_NS_END Index: AbstractExpectation.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/AbstractExpectation.h,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- AbstractExpectation.h 29 Dec 2005 19:29:50 -0000 1.26 +++ AbstractExpectation.h 15 Mar 2006 21:33:56 -0000 1.27 @@ -38,7 +38,7 @@ #include <mockpp/compat/Formatter.h> -namespace mockpp { +MOCKPP_NS_START class VerifiableList; @@ -170,7 +170,7 @@ }; -} // namespace mockpp +MOCKPP_NS_END #endif // MOCKPP_ABSTRACTEXPECTATION_H Index: mockpp_dbc.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/mockpp_dbc.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- mockpp_dbc.h 29 Dec 2005 19:29:50 -0000 1.4 +++ mockpp_dbc.h 15 Mar 2006 21:33:58 -0000 1.5 @@ -51,17 +51,17 @@ #ifdef MOCK_ENABLE_DBC -# define MOCKPP_PRE(a) mockpp::assertTrue(__LINE__, __FILE__, #a, a) +# define MOCKPP_PRE(a) MOCKPP_NS::assertTrue(__LINE__, __FILE__, #a, a) -# define MOCKPP_PRE_MSG(a, b) mockpp::assertTrue(__LINE__, __FILE__, b, a) +# define MOCKPP_PRE_MSG(a, b) MOCKPP_NS::assertTrue(__LINE__, __FILE__, b, a) -# define MOCKPP_POST(a) mockpp::assertTrue(__LINE__, __FILE__, #a, a) +# define MOCKPP_POST(a) MOCKPP_NS::assertTrue(__LINE__, __FILE__, #a, a) -# define MOCKPP_POST_MSG(a, b) mockpp::assertTrue(__LINE__, __FILE__, b, a) +# define MOCKPP_POST_MSG(a, b) MOCKPP_NS::assertTrue(__LINE__, __FILE__, b, a) -# define MOCKPP_INVARIANT(a) mockpp::assertTrue(__LINE__, __FILE__, #a, a) +# define MOCKPP_INVARIANT(a) MOCKPP_NS::assertTrue(__LINE__, __FILE__, #a, a) -# define MOCKPP_INVARIANT_MSG(a, b) mockpp::assertTrue(__LINE__, __FILE__, b, a) +# define MOCKPP_INVARIANT_MSG(a, b) MOCKPP_NS::assertTrue(__LINE__, __FILE__, b, a) #else // MOCK_ENABLE_DBC Index: MixedMockObject.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/MixedMockObject.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- MixedMockObject.cpp 29 Dec 2005 19:29:50 -0000 1.3 +++ MixedMockObject.cpp 15 Mar 2006 21:33:56 -0000 1.4 @@ -33,7 +33,7 @@ #include <mockpp/MixedMockObject.h> -namespace mockpp { +MOCKPP_NS_START MOCKPP_EXPORT MixedMockObject::MixedMockObject(const String &name, VerifiableList *parent) @@ -65,4 +65,4 @@ } -} // namespace mockpp +MOCKPP_NS_END Index: ThrowableList.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/ThrowableList.h,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- ThrowableList.h 29 Dec 2005 19:29:50 -0000 1.24 +++ ThrowableList.h 15 Mar 2006 21:33:56 -0000 1.25 @@ -38,7 +38,7 @@ #include <mockpp/Throwable.h> -namespace mockpp { +MOCKPP_NS_START /** A list of throwable objects. The objects are completely managed which also includes @@ -143,7 +143,7 @@ }; -} // namespace mockpp +MOCKPP_NS_END #endif // MOCKPP_THROWABLELIST_H Index: ExpectationCounter.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/ExpectationCounter.cpp,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- ExpectationCounter.cpp 29 Dec 2005 19:29:50 -0000 1.24 +++ ExpectationCounter.cpp 15 Mar 2006 21:33:56 -0000 1.25 @@ -33,7 +33,7 @@ #include <mockpp/compat/Formatter.h> -namespace mockpp { +MOCKPP_NS_START MOCKPP_EXPORT @@ -138,4 +138,4 @@ } -} // namespace mockpp +MOCKPP_NS_END Index: ExpectationMap.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/ExpectationMap.h,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- ExpectationMap.h 29 Dec 2005 19:29:50 -0000 1.27 +++ ExpectationMap.h 15 Mar 2006 21:33:56 -0000 1.28 @@ -38,7 +38,7 @@ #include <mockpp/ExpectationSet.h> -namespace mockpp { +MOCKPP_NS_START /** A class to verify maps of expectations: each expected object must occur at @@ -138,7 +138,7 @@ }; -} // namespace mockpp +MOCKPP_NS_END #endif // MOCKPP_EXPECTATIONMAP_H Index: MockObject.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/MockObject.cpp,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- MockObject.cpp 29 Dec 2005 19:29:50 -0000 1.26 +++ MockObject.cpp 15 Mar 2006 21:33:56 -0000 1.27 @@ -37,7 +37,7 @@ #include <mockpp/util/AssertMo.h> -namespace mockpp { +MOCKPP_NS_START MOCKPP_EXPORT MockObject::MockObject(const String &name, VerifiableList *parent) @@ -114,4 +114,4 @@ } -} // namespace mockpp +MOCKPP_NS_END Index: ThrowableList.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/ThrowableList.cpp,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- ThrowableList.cpp 29 Dec 2005 19:29:50 -0000 1.25 +++ ThrowableList.cpp 15 Mar 2006 21:33:56 -0000 1.26 @@ -34,7 +34,7 @@ #include <mockpp/ThrowableList.h> -namespace mockpp { +MOCKPP_NS_START MOCKPP_EXPORT ThrowableList::ThrowableList(const String &name, VerifiableList *parent) @@ -125,5 +125,5 @@ MOCKPP_ASSERT_EQUALS_MESSAGE(fmt, (size_t)0, list.size()); } -} // namespace mockpp +MOCKPP_NS_END Index: gen_countparams_N.pl =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/gen_countparams_N.pl,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- gen_countparams_N.pl 29 Dec 2005 19:29:50 -0000 1.3 +++ gen_countparams_N.pl 15 Mar 2006 21:33:58 -0000 1.4 @@ -13,14 +13,14 @@ $totalNumArgs = $ARGV[0]; if ($totalNumArgs < 5) { $totalNumArgs = 5; } - + open OUT, ">CountParameters.h"; -print OUT +print OUT "/** \@file \@internal NOT INTENDED FOR PUBLIC INCLUSION \@brief Generated with gen_countparameters_N.pl. - + \$I" . "d: CountParameters.h,v 1.7 2005/10/19 20:53:09 ewald-arnold Exp \$ ***************************************************************************/ @@ -51,7 +51,7 @@ #define MOCKPP_COUNTPARAMETERS_N_H -namespace mockpp { +MOCKPP_NS_START /** Helper class to distinguish present from missing parameters. @@ -59,7 +59,7 @@ */ class NoParameter { - NoParameter() {} + NoParameter() {} }; @@ -92,9 +92,9 @@ /** Helper class to sum actual parameters. * \@internal */ -template< typename T +template< typename T , typename P1 = NoParameter"; - + for($p = 2; $p <= $totalNumArgs; ++$p) { print OUT " , typename P" . $p . " = NoParameter"; } @@ -102,19 +102,19 @@ class CountParameters { public: - + enum - { value = CountIfUsed<P1>::value"; + { value = CountIfUsed<P1>::value"; for($p = 2; $p <= $totalNumArgs; ++$p) { print OUT " + CountIfUsed<P" . $p . ">::value"; }; - + print OUT " }; }; -} // ns mockpp +MOCKPP_NS_END #endif // MOCKPP_COUNTPARAMETERS_N_H Index: Throwable.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/Throwable.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- Throwable.cpp 29 Dec 2005 19:29:50 -0000 1.16 +++ Throwable.cpp 15 Mar 2006 21:33:56 -0000 1.17 @@ -37,7 +37,7 @@ #include <iosfwd> -namespace mockpp { +MOCKPP_NS_START MOCKPP_EXPORT ThrowableItem::ThrowableItem(Throwable *it) @@ -93,5 +93,5 @@ } -} // namespace mockpp +MOCKPP_NS_END Index: Verifiable.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/Verifiable.h,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- Verifiable.h 29 Dec 2005 19:29:50 -0000 1.21 +++ Verifiable.h 15 Mar 2006 21:33:57 -0000 1.22 @@ -34,7 +34,7 @@ #include <mockpp/mockpp.h> // always first -namespace mockpp { +MOCKPP_NS_START class VerifiableList; @@ -106,7 +106,7 @@ }; -} // namespace mockpp +MOCKPP_NS_END #endif // MOCKPP_VERIFIABLE_H Index: mockpp.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/mockpp.h,v retrieving revision 1.76 retrieving revision 1.77 diff -u -d -r1.76 -r1.77 --- mockpp.h 4 Feb 2006 14:50:26 -0000 1.76 +++ mockpp.h 15 Mar 2006 21:33:58 -0000 1.77 @@ -5,6 +5,8 @@ ***************************************************************************/ +#define MOCKPP_NO_NAMESPACE + /************************************************************************** begin : Thu Dec 12 2002 @@ -187,10 +189,27 @@ // #ifndef MOCKPP_NO_RTTI -#include <typeinfo> +# include <typeinfo> #else -#undef CPPUNIT_USE_TYPEINFO_NAME -#define CPPUNIT_USE_TYPEINFO_NAME 0 +# undef CPPUNIT_USE_TYPEINFO_NAME +# define CPPUNIT_USE_TYPEINFO_NAME 0 +#endif + +////////////////////////////////////////////////// +// + +#ifdef MOCKPP_NO_NAMESPACE +# define MOCKPP_ANON_NS_START /* nothing */ +# define MOCKPP_NS /* nothing */ +# define MOCKPP_NS_START /* nothing */ +# define MOCKPP_NS_END /* nothing */ +# define USING_NAMESPACE_MOCKPP /* nothing */ +#else +# define MOCKPP_ANON_NS_START namespace { +# define MOCKPP_NS mockpp +# define MOCKPP_NS_START namespace mockpp { +# define MOCKPP_NS_END } +# define USING_NAMESPACE_MOCKPP using namespace mockpp; #endif ////////////////////////////////////////////////// @@ -260,7 +279,7 @@ # define MOCKPP_FUNC_MACRO __FUNC__ #elif defined(_MSC_VER) # if _MSC_VER <= 1200 -# define MOCKPP_FUNC_MACRO (MOCKPP_STL::string(__FILE__) + "_" + mockpp::getLatin1(mockpp::number((long unsigned)__LINE__))) // needs #include <mockpp/compat/Formatter.h> +# define MOCKPP_FUNC_MACRO (MOCKPP_STL::string(__FILE__) + "_" + MOCKPP_NS::getLatin1(MOCKPP_NS::number((long unsigned)__LINE__))) // needs #include <mockpp/compat/Formatter.h> # else # define MOCKPP_FUNC_MACRO __FUNCSIG__ # endif @@ -293,7 +312,7 @@ //! Output char values more readable (e.g. non-alphanumeric as number) #define MOCKPP_MAKE_CHAR_READABLE 1 -//! mockpp::Exception is derived from std::exception +//! MOCKPP_NS::Exception is derived from std::exception #define MOCKPP_USE_STD_EXCEPTION 1 #undef HAVE_MULTITHREAD // obsolete and error prone @@ -389,7 +408,7 @@ #include MOCKPP_STRING_H //! Namespace for project "Mock Objects for C++" -namespace mockpp { +MOCKPP_NS_START #ifdef MOCKPP_UNICODE @@ -413,11 +432,11 @@ #endif -//! transform a string literal into a mockpp::String -#define MOCKPP_PCSTRING(x) mockpp::String(MOCKPP_PCHAR(x)) +//! transform a string literal into a MOCKPP_NS::String +#define MOCKPP_PCSTRING(x) MOCKPP_NS::String(MOCKPP_PCHAR(x)) -//! transform a potential mockpp string into a mockpp::String -#define MOCKPP_STRING(x) mockpp::String(x) +//! transform a potential mockpp string into a MOCKPP_NS::String +#define MOCKPP_STRING(x) MOCKPP_NS::String(x) //! Dummy, tags a string for translation without doing anything #ifndef MOCKPP_I18N_NOOP @@ -496,7 +515,7 @@ AssertionFailedForwarder_t setAssertionFailedForwarder(AssertionFailedForwarder_t fwd); -} // namespace mockpp +MOCKPP_NS_END #ifdef __SUNPRO_CC #define MOCKPP_NO_TEMPLATE_HINT @@ -504,10 +523,10 @@ #ifdef MOCKPP_UNICODE //! transform the string into unicode if needed -# define MOCKPP_GET_STRING(x) mockpp::getUnicode(x) +# define MOCKPP_GET_STRING(x) MOCKPP_NS::getUnicode(x) #else //! transform the string into ascii if needed -# define MOCKPP_GET_STRING(x) mockpp::getLatin1(x) +# define MOCKPP_GET_STRING(x) MOCKPP_NS::getLatin1(x) #endif #if defined(__BORLANDC__) || (__GNUC__ < 3) Index: AbstractExpectationCollection.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/AbstractExpectationCollection.h,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- AbstractExpectationCollection.h 29 Dec 2005 19:29:50 -0000 1.18 +++ AbstractExpectationCollection.h 15 Mar 2006 21:33:56 -0000 1.19 @@ -35,7 +35,7 @@ #include <mockpp/AbstractExpectation.h> -namespace mockpp { +MOCKPP_NS_START /** Base class for expectation collections. @@ -82,7 +82,7 @@ }; -} // namespace mockpp +MOCKPP_NS_END #endif // MOCKPP_ABSTRACTEXPECTATIONCOLLECTION_H Index: MixedMockObject.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/MixedMockObject.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- MixedMockObject.h 29 Dec 2005 19:29:50 -0000 1.5 +++ MixedMockObject.h 15 Mar 2006 21:33:56 -0000 1.6 @@ -37,7 +37,7 @@ #include <mockpp/chaining/ChainableMockObject.h> -namespace mockpp { +MOCKPP_NS_START /** A MockObject that merges all the advanced mock objects. @@ -70,7 +70,7 @@ }; -} // namespace mockpp +MOCKPP_NS_END #endif // MOCKPP_MixedMOCKOBJECT_H Index: mockpp.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/mockpp.cpp,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- mockpp.cpp 6 Mar 2006 18:05:57 -0000 1.25 +++ mockpp.cpp 15 Mar 2006 21:33:58 -0000 1.26 @@ -30,7 +30,7 @@ #include <mockpp/mockpp.h> // always first header -namespace mockpp { +MOCKPP_NS_START void MOCKPP_EXPORT @@ -114,7 +114,7 @@ { MOCKPP_STL::string ret; for (unsigned i = 0; i < uni.length(); ++i) - ret += (mockpp::Char) uni[i]; + ret += (MOCKPP_NS::Char) uni[i]; return ret; } @@ -133,4 +133,4 @@ } -} // namespace mockpp +MOCKPP_NS_END Index: TrackingCounter.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/TrackingCounter.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- TrackingCounter.h 29 Dec 2005 19:29:50 -0000 1.8 +++ TrackingCounter.h 15 Mar 2006 21:33:56 -0000 1.9 @@ -38,7 +38,7 @@ #include MOCKPP_VECTOR_H -namespace mockpp { +MOCKPP_NS_START /** A base class to keep track of occurrences. @@ -253,7 +253,7 @@ }; -} // namespace mockpp +MOCKPP_NS_END #endif // MOCKPP_TrackingCounter_H Index: ExpectationSegment.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/ExpectationSegment.h,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- ExpectationSegment.h 29 Dec 2005 19:29:50 -0000 1.28 +++ ExpectationSegment.h 15 Mar 2006 21:33:56 -0000 1.29 @@ -37,7 +37,7 @@ #include <mockpp/util/AssertMo.h> -namespace mockpp { +MOCKPP_NS_START /** A class to verify the occurence of a substring. @@ -164,7 +164,7 @@ }; -} // namespace mockpp +MOCKPP_NS_END #endif // MOCKPP_EXPECTATIONSEGMENT_H Index: ExpectationSet.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/ExpectationSet.h,v retrieving revision 1.35 retrieving revision 1.36 diff -u -d -r1.35 -r1.36 --- ExpectationSet.h 29 Dec 2005 19:29:50 -0000 1.35 +++ ExpectationSet.h 15 Mar 2006 21:33:56 -0000 1.36 @@ -39,7 +39,7 @@ #include <mockpp/util/AssertMo.h> -namespace mockpp { +MOCKPP_NS_START /** A class to verify sets of expectations: each expected object must occur at @@ -229,7 +229,7 @@ -} // namespace mockpp +MOCKPP_NS_END #endif // MOCKPP_EXPECTATIONSET_H Index: ExpectationBoundary.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/ExpectationBoundary.h,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- ExpectationBoundary.h 29 Dec 2005 19:29:50 -0000 1.22 +++ ExpectationBoundary.h 15 Mar 2006 21:33:56 -0000 1.23 @@ -37,7 +37,7 @@ #include <mockpp/util/AssertMo.h> -namespace mockpp { +MOCKPP_NS_START /** A class to verify that an actual value lies between two boundary values. @@ -208,7 +208,7 @@ }; -} // namespace mockpp +MOCKPP_NS_END #endif // MOCKPP_EXPECTATIONBOUNDARY_H Index: Expectation.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/Expectation.h,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- Expectation.h 29 Dec 2005 19:29:50 -0000 1.18 +++ Expectation.h 15 Mar 2006 21:33:56 -0000 1.19 @@ -36,7 +36,7 @@ #include <mockpp/Verifiable.h> -namespace mockpp { +MOCKPP_NS_START /** Often fully featured mock objects are not appropriate for a testing problem. * In this case you can write your own mock objects with minimal functionality. @@ -103,7 +103,7 @@ */ -} // namespace mockpp +MOCKPP_NS_END #endif // MOCKPP_EXPECTATION_H Index: CountParameters.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/CountParameters.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- CountParameters.h 29 Dec 2005 19:29:50 -0000 1.5 +++ CountParameters.h 15 Mar 2006 21:33:56 -0000 1.6 @@ -1,7 +1,7 @@ /** @file @internal NOT INTENDED FOR PUBLIC INCLUSION @brief Generated with gen_countparameters_N.pl. - + $Id$ ***************************************************************************/ @@ -32,7 +32,7 @@ #define MOCKPP_COUNTPARAMETERS_N_H -namespace mockpp { +MOCKPP_NS_START /** Helper class to distinguish present from missing parameters. @@ -40,7 +40,7 @@ */ class NoParameter { - NoParameter() {} + NoParameter() {} }; @@ -71,7 +71,7 @@ /** Helper class to sum actual parameters. * @internal */ -template< typename T +template< typename T , typename P1 = NoParameter , typename P2 = NoParameter , typename P3 = NoParameter @@ -81,7 +81,7 @@ class CountParameters { public: - + enum { value = CountIfUsed<P1>::value + CountIfUsed<P2>::value @@ -93,7 +93,7 @@ }; -} // ns mockpp +MOCKPP_NS_END #endif // MOCKPP_COUNTPARAMETERS_N_H Index: Verifiable.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/Verifiable.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- Verifiable.cpp 29 Dec 2005 19:29:50 -0000 1.21 +++ Verifiable.cpp 15 Mar 2006 21:33:56 -0000 1.22 @@ -36,7 +36,7 @@ #include <mockpp/VerifiableList.h> -namespace mockpp { +MOCKPP_NS_START MOCKPP_EXPORT Verifiable::Verifiable (const String &name, VerifiableList *parent) @@ -86,7 +86,7 @@ } -} // namespace mockpp +MOCKPP_NS_END Index: ReturnObjectList.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/ReturnObjectList.h,v retrieving revision 1.34 retrieving revision 1.35 diff -u -d -r1.34 -r1.35 --- ReturnObjectList.h 29 Dec 2005 19:29:50 -0000 1.34 +++ ReturnObjectList.h 15 Mar 2006 21:33:56 -0000 1.35 @@ -41,7 +41,7 @@ #include <mockpp/util/AssertMo.h> -namespace mockpp { +MOCKPP_NS_START class VerifiableList; @@ -209,6 +209,6 @@ }; -} // namespace mockpp +MOCKPP_NS_END #endif // MOCKPP_RETURNOBJECTLIST_H Index: VerifiableList.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/VerifiableList.h,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- VerifiableList.h 29 Dec 2005 19:29:50 -0000 1.19 +++ VerifiableList.h 15 Mar 2006 21:33:58 -0000 1.20 @@ -38,7 +38,7 @@ #include MOCKPP_VECTOR_H -namespace mockpp { +MOCKPP_NS_START /** @@ -103,7 +103,7 @@ }; -} // namespace mockpp +MOCKPP_NS_END #endif // MOCKPP_VERIFIABLELIST_H Index: MockTimeServer.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/MockTimeServer.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- MockTimeServer.h 29 Dec 2005 19:29:50 -0000 1.3 +++ MockTimeServer.h 15 Mar 2006 21:33:56 -0000 1.4 @@ -37,7 +37,7 @@ #include <mockpp/ReturnObjectList.h> -namespace mockpp { +MOCKPP_NS_START /** Mock object to return defined time points. * \ingroup grp_basic_mo @@ -52,7 +52,7 @@ * @param name object name * @param parent parent verifiable */ - MockTimeServer(const String &name = MOCKPP_PCHAR("") , mockpp::VerifiableList *parent = 0); + MockTimeServer(const String &name = MOCKPP_PCHAR("") , MOCKPP_NS::VerifiableList *parent = 0); /** Returns the "current" unix time * @return unix time @@ -66,11 +66,11 @@ private: - mockpp::ReturnObjectList<std::time_t> mocktimes; + MOCKPP_NS::ReturnObjectList<std::time_t> mocktimes; }; -} // namespace mockpp +MOCKPP_NS_END #endif // MOCKPP_TimeServerMock_H Index: MockTimeServer.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/MockTimeServer.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- MockTimeServer.cpp 29 Dec 2005 19:29:50 -0000 1.2 +++ MockTimeServer.cpp 15 Mar 2006 21:33:56 -0000 1.3 @@ -32,7 +32,7 @@ #include <mockpp/MockTimeServer.h> -namespace mockpp { +MOCKPP_NS_START MOCKPP_EXPORT @@ -55,5 +55,5 @@ } -} // namespace mockpp +MOCKPP_NS_END |