[Mockpp-commits] mockpp/mockpp/util AssertMo.cpp,1.24,1.25 AssertMo.h,1.26,1.27 AutoPointer.h,1.15,1
Brought to you by:
ewald-arnold
From: Ewald A. <ewa...@us...> - 2006-03-15 21:34:45
|
Update of /cvsroot/mockpp/mockpp/mockpp/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv763/mockpp/util Modified Files: AssertMo.cpp AssertMo.h AutoPointer.h NotImplementedException.cpp NotImplementedException.h Log Message: optionally disable mockpp namespace Index: AssertMo.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/util/AssertMo.cpp,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- AssertMo.cpp 29 Dec 2005 19:29:52 -0000 1.24 +++ AssertMo.cpp 15 Mar 2006 21:34:09 -0000 1.25 @@ -38,7 +38,7 @@ #include <mockpp/util/NotImplementedException.h> -namespace mockpp { +MOCKPP_NS_START void MOCKPP_EXPORT assertExcludes(unsigned srcline, const char* srcfile, @@ -122,11 +122,11 @@ void MOCKPP_EXPORT notImplemented(unsigned srcline, const char* srcfile, const String &mockName) { - mockpp::String fmt = mockpp_i18n(MOCKPP_PCHAR("Not Implemented in %1.")); + MOCKPP_NS::String fmt = mockpp_i18n(MOCKPP_PCHAR("Not Implemented in %1.")); fmt << mockName; MOCKPP_THROW(NotImplementedException(srcline, srcfile, fmt)); } -} // namespace mockpp +MOCKPP_NS_END Index: AssertMo.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/util/AssertMo.h,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- AssertMo.h 29 Dec 2005 19:29:52 -0000 1.26 +++ AssertMo.h 15 Mar 2006 21:34:09 -0000 1.27 @@ -36,7 +36,7 @@ #include <mockpp/compat/Formatter.h> -namespace mockpp { +MOCKPP_NS_START class Verifiable; @@ -158,7 +158,7 @@ const String &mockName); -} // namespace mockpp +MOCKPP_NS_END /** Asserts that a string does contain a substring. If it does not it throws @@ -168,7 +168,7 @@ * @param a string which must occur at the beginning * @param b string in which is searched */ -#define MOCKPP_ASSERT_INCLUDES_MESSAGE(msg, a, b) mockpp::assertIncludes(__LINE__, __FILE__, msg, a, b) +#define MOCKPP_ASSERT_INCLUDES_MESSAGE(msg, a, b) MOCKPP_NS::assertIncludes(__LINE__, __FILE__, msg, a, b) /** @def MOCKPP_ASSERT_INCLUDES * Asserts that a string does contain a substring. If it does not it throws @@ -179,7 +179,7 @@ * @param b string in which is searched */ -# define MOCKPP_ASSERT_INCLUDES(a, b) mockpp::assertIncludes(__LINE__, __FILE__, MOCKPP_PCHAR(#a) MOCKPP_PCHAR(" <in> ") MOCKPP_PCHAR(#b), a, b) +# define MOCKPP_ASSERT_INCLUDES(a, b) MOCKPP_NS::assertIncludes(__LINE__, __FILE__, MOCKPP_PCHAR(#a) MOCKPP_PCHAR(" <in> ") MOCKPP_PCHAR(#b), a, b) /** Asserts that a string does not contain a substring. If it does it throws * an AssertionFailedError with the given infomation. @@ -188,7 +188,7 @@ * @param a string which must occur at the beginning * @param b string in which is searched */ -#define MOCKPP_ASSERT_EXCLUDES_MESSAGE(msg, a, b) mockpp::assertExcludes(__LINE__, __FILE__, msg, a, b) +#define MOCKPP_ASSERT_EXCLUDES_MESSAGE(msg, a, b) MOCKPP_NS::assertExcludes(__LINE__, __FILE__, msg, a, b) /** @def MOCKPP_ASSERT_EXCLUDES * Asserts that a string does not contain a substring. If it does it throws @@ -199,7 +199,7 @@ * @param b string in which is searched */ -#define MOCKPP_ASSERT_EXCLUDES(a, b) mockpp::assertExcludes(__LINE__, __FILE__, MOCKPP_PCHAR(#a) MOCKPP_PCHAR(" <!in> ") MOCKPP_PCHAR(#b), a, b) +#define MOCKPP_ASSERT_EXCLUDES(a, b) MOCKPP_NS::assertExcludes(__LINE__, __FILE__, MOCKPP_PCHAR(#a) MOCKPP_PCHAR(" <!in> ") MOCKPP_PCHAR(#b), a, b) /** Asserts that a string starts with a substring. If it does not it throws * an AssertionFailedError with the given infomation. @@ -208,7 +208,7 @@ * @param a string which must occur at the beginning * @param b string in which is searched */ -#define MOCKPP_ASSERT_STARTSWITH_MESSAGE(msg, a, b) mockpp::assertStartsWith(__LINE__, __FILE__, msg, a, b) +#define MOCKPP_ASSERT_STARTSWITH_MESSAGE(msg, a, b) MOCKPP_NS::assertStartsWith(__LINE__, __FILE__, msg, a, b) /** @def MOCKPP_ASSERT_STARTSWITH * Asserts that a string starts with a substring. If it does not it throws @@ -219,21 +219,21 @@ * @param b string in which is searched */ -#define MOCKPP_ASSERT_STARTSWITH(a, b) mockpp::assertStartsWith(__LINE__, __FILE__, MOCKPP_PCHAR(#a) MOCKPP_PCHAR(" <starts> ") MOCKPP_PCHAR(#b), a, b) +#define MOCKPP_ASSERT_STARTSWITH(a, b) MOCKPP_NS::assertStartsWith(__LINE__, __FILE__, MOCKPP_PCHAR(#a) MOCKPP_PCHAR(" <starts> ") MOCKPP_PCHAR(#b), a, b) /** Asserts that a verify() of an object fails. If it does not it throws * an AssertionFailedError. * @ingroup grp_helper * @param obj object to be verified */ -#define MOCKPP_ASSERT_VERIFYFAILS(obj) mockpp::assertVerifyFails(__LINE__, __FILE__, obj) +#define MOCKPP_ASSERT_VERIFYFAILS(obj) MOCKPP_NS::assertVerifyFails(__LINE__, __FILE__, obj) /** Throws unconditionally a NotImplementedException with the given name to * indicate a not yet implemented method. * @ingroup grp_helper * @param msg name of the object */ -#define MOCKPP_NOT_IMPLEMENTED(msg) mockpp::notImplemented(__LINE__, __FILE__, msg) +#define MOCKPP_NOT_IMPLEMENTED(msg) MOCKPP_NS::notImplemented(__LINE__, __FILE__, msg) // @todo test /** Asserts that an exception is thrown and that the data is correctly Index: AutoPointer.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/util/AutoPointer.h,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- AutoPointer.h 29 Dec 2005 19:29:52 -0000 1.15 +++ AutoPointer.h 15 Mar 2006 21:34:09 -0000 1.16 @@ -34,7 +34,7 @@ #include <mockpp/mockpp.h> // always first -namespace mockpp { +MOCKPP_NS_START /** Implementation of an auto-pointer class. * 99% re-implemented from std::auto_ptr. The main difference is the @@ -133,7 +133,7 @@ }; -} // namespace mockpp +MOCKPP_NS_END #endif // MOCKPP_AUTOPOINTER_H Index: NotImplementedException.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/util/NotImplementedException.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- NotImplementedException.cpp 29 Dec 2005 19:29:52 -0000 1.21 +++ NotImplementedException.cpp 15 Mar 2006 21:34:09 -0000 1.22 @@ -33,7 +33,7 @@ #include <mockpp/util/NotImplementedException.h> -namespace mockpp { +MOCKPP_NS_START MOCKPP_EXPORT @@ -44,7 +44,7 @@ } -} // namespace mockpp +MOCKPP_NS_END Index: NotImplementedException.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/util/NotImplementedException.h,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- NotImplementedException.h 29 Dec 2005 19:29:52 -0000 1.15 +++ NotImplementedException.h 15 Mar 2006 21:34:09 -0000 1.16 @@ -36,7 +36,7 @@ #include <mockpp/compat/AssertionFailedError.h> -namespace mockpp { +MOCKPP_NS_START /** Signal not-yet implemented methods. @@ -55,7 +55,7 @@ }; -} // namespace mockpp +MOCKPP_NS_END #endif // MOCKPP_NOTIMPLEMENTEDEXCEPTION_H |