mockpp-commits Mailing List for Mock Objects for C++ (Page 43)
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...> - 2005-04-02 20:46:09
|
Update of /cvsroot/mockpp/mockpp/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3635/mockpp Modified Files: Makefile.am VisitableMockObject_template.h mockpp.cpp mockpp.h Log Message: more fixes for msvc6 Index: mockpp.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/mockpp.h,v retrieving revision 1.49 retrieving revision 1.50 diff -u -d -r1.49 -r1.50 --- mockpp.h 2 Apr 2005 13:46:28 -0000 1.49 +++ mockpp.h 2 Apr 2005 20:45:29 -0000 1.50 @@ -86,26 +86,30 @@ # ifdef _MSC_VER // Compilation Warning remover // needed to prevent MSVC6 complain about itself :-/ -# pragma warning (disable:4786) // this warning occurs when VC6 truncate a debug symbol which is longer than 255 chars. -# pragma warning (disable:4251) // this warning occurs when a class member doesn't have a dll-interface. -# pragma warning (disable:4180) -# pragma warning (disable:4355) -# pragma warning (disable:4512) -# pragma warning (disable:4511) -# pragma warning (disable:4018) -# pragma warning (disable:4100) -# pragma warning (disable:4663) -# pragma warning (disable:4146) -# pragma warning (disable:4244) +# pragma warning (disable:4786) // identifier was truncated to 'number' characters in the debug information +# pragma warning (disable:4251) // class 'type' needs to have dll-interface to be used by clients of class 'type2' +# pragma warning (disable:4180) // qualifier applied to function type has no meaning +# pragma warning (disable:4355) // 'this' : used in base member initializer list +# pragma warning (disable:4512) // assignment operator could not be generated +# pragma warning (disable:4511) // copy constructor could not be generated +# pragma warning (disable:4018) // signed/unsigned mismatch +# pragma warning (disable:4100) // unreferenced formal parameter +# pragma warning (disable:4663) // C++ language change: to explicitly specialize class template 'identifier' use the following syntax +# pragma warning (disable:4146) // unary minus operator applied to unsigned type, result still unsigned +# pragma warning (disable:4244) // conversion from 'type1' to 'type2', possible loss of data +# pragma warning (disable:4138) // '*/' found outside of comment +# pragma warning (disable:4516) // access-declarations are deprecated; member using-declarations provide a better alternative +# pragma warning (disable:4097) // typedef-name 'identifier1' used as synonym for class-name 'identifier2' +# pragma warning (disable:4702) // unreachable code # endif // _MSC_VER #if defined(_MSC_VER) -# if _MSC_VER <= 1200 -# define _MSC_VER_60_70 1 +# if _MSC_VER <= 1300 +# define _MSC_VER_60_70 # include <mockpp/mockpp_config-msvc_60_70.h> -# else defined(_MSC_VER) -# include <mockpp/mockpp_config-msvc_71.h> +# else +# include <mockpp/mockpp_config-msvc_71.h> # endif #elif defined(__BORLANDC__) @@ -127,6 +131,7 @@ # endif #endif +/* #if defined(MOCKPP_UNICODE) # ifndef _UNICODE # define _UNICODE @@ -135,6 +140,7 @@ # define UNICODE # endif #endif +*/ #if defined(MOCKPP_UNICODE) && defined(__CYGWIN__) // probably ugly hack # define _GLIBCPP_USE_WSTRING 1 @@ -183,6 +189,10 @@ /** @def MOCKPP_UNUSED * Simple macro to suppress warnings about unused variables if possible. + * Note: This is just an empty fallback. The actual content (if any) is in the + * according config-*.h. + * Can be used without semicolon at the end since it is already contained + * in the macro. */ #ifndef MOCKPP_UNUSED #define MOCKPP_UNUSED(x) Index: mockpp.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/mockpp.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- mockpp.cpp 25 Mar 2005 18:47:36 -0000 1.19 +++ mockpp.cpp 2 Apr 2005 20:45:29 -0000 1.20 @@ -48,10 +48,10 @@ num = s.substr(0, pos); if (num.length() == 0) good = false; -#ifdef _MSC_VER_60_70 - major = atoi(num.c_str()); -#else - major = std::atoi(num.c_str()); +#ifdef _MSC_VER_60_70 // MAT using namespace std; instead ? EA: no :-) + major = atoi(num.c_str()); +#else + major = std::atoi(num.c_str()); #endif s.erase(0, pos+1); unsigned pos = s.find('.'); @@ -61,20 +61,20 @@ num = s.substr(0, pos); if (num.length() == 0) good = false; -#ifdef _MSC_VER_60_70 - minor = atoi(num.c_str()); -#else - minor = std::atoi(num.c_str()); -#endif +#ifdef _MSC_VER_60_70 + minor = atoi(num.c_str()); +#else + minor = std::atoi(num.c_str()); +#endif s.erase(0, pos+1); if (s.length() == 0) good = false; -#ifdef _MSC_VER_60_70 - patch = atoi(s.c_str()); -#else - patch = std::atoi(s.c_str()); -#endif +#ifdef _MSC_VER_60_70 + patch = atoi(s.c_str()); +#else + patch = std::atoi(s.c_str()); +#endif } else good = false; Index: VisitableMockObject_template.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/VisitableMockObject_template.h,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- VisitableMockObject_template.h 27 Feb 2005 18:04:29 -0000 1.23 +++ VisitableMockObject_template.h 2 Apr 2005 20:45:29 -0000 1.24 @@ -370,10 +370,10 @@ { counter.clear(); tvec.clear(); - for (unsigned i =0; i < t1vec.size(); ++i) - delete t1vec[i]; - for (unsigned i =0; i < t2vec.size(); ++i) - delete t2vec[i]; + for (unsigned i1 = 0; i1 < t1vec.size(); ++i1) + delete t1vec[i1]; + for (unsigned i2 = 0; i2 < t2vec.size(); ++i2) + delete t2vec[i2]; t1vec.clear(); t2vec.clear(); } @@ -614,12 +614,12 @@ { counter.clear(); tvec.clear(); - for (unsigned i =0; i < t1vec.size(); ++i) - delete t1vec[i]; - for (unsigned i =0; i < t2vec.size(); ++i) - delete t2vec[i]; - for (unsigned i =0; i < t3vec.size(); ++i) - delete t3vec[i]; + for (unsigned i1 = 0; i1 < t1vec.size(); ++i1) + delete t1vec[i1]; + for (unsigned i2 = 0; i2 < t2vec.size(); ++i2) + delete t2vec[i2]; + for (unsigned i3 = 0; i3 < t3vec.size(); ++i3) + delete t3vec[i3]; t1vec.clear(); t2vec.clear(); t3vec.clear(); @@ -878,14 +878,14 @@ { counter.clear(); tvec.clear(); - for (unsigned i =0; i < t1vec.size(); ++i) - delete t1vec[i]; - for (unsigned i =0; i < t2vec.size(); ++i) - delete t2vec[i]; - for (unsigned i =0; i < t3vec.size(); ++i) - delete t3vec[i]; - for (unsigned i =0; i < t4vec.size(); ++i) - delete t4vec[i]; + for (unsigned i1 = 0; i1 < t1vec.size(); ++i1) + delete t1vec[i1]; + for (unsigned i2 = 0; i2 < t2vec.size(); ++i2) + delete t2vec[i2]; + for (unsigned i3 = 0; i3 < t3vec.size(); ++i3) + delete t3vec[i3]; + for (unsigned i4 = 0; i4 < t4vec.size(); ++i4) + delete t4vec[i4]; t1vec.clear(); t2vec.clear(); t3vec.clear(); @@ -1164,16 +1164,16 @@ { counter.clear(); tvec.clear(); - for (unsigned i =0; i < t1vec.size(); ++i) - delete t1vec[i]; - for (unsigned i =0; i < t2vec.size(); ++i) - delete t2vec[i]; - for (unsigned i =0; i < t3vec.size(); ++i) - delete t3vec[i]; - for (unsigned i =0; i < t4vec.size(); ++i) - delete t4vec[i]; - for (unsigned i =0; i < t5vec.size(); ++i) - delete t5vec[i]; + for (unsigned i1 = 0; i1 < t1vec.size(); ++i1) + delete t1vec[i1]; + for (unsigned i2 = 0; i2 < t2vec.size(); ++i2) + delete t2vec[i2]; + for (unsigned i3 = 0; i3 < t3vec.size(); ++i3) + delete t3vec[i3]; + for (unsigned i4 = 0; i4 < t4vec.size(); ++i4) + delete t4vec[i4]; + for (unsigned i5 = 0; i5 < t5vec.size(); ++i5) + delete t5vec[i5]; t1vec.clear(); t2vec.clear(); t3vec.clear(); Index: Makefile.am =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/Makefile.am,v retrieving revision 1.75 retrieving revision 1.76 diff -u -d -r1.75 -r1.76 --- Makefile.am 2 Apr 2005 13:46:27 -0000 1.75 +++ Makefile.am 2 Apr 2005 20:45:28 -0000 1.76 @@ -149,47 +149,7 @@ echo "#define HAVE_STD_WCSCMP" >>$@ echo "" >>$@ echo "/* Define to supress compiler warnings about unused variables. */" >>$@ - echo "#define MOCKPP_UNUSED(x) x" >>$@ - echo "" >>$@ - -test $@ -ef $(srcdir) || cp $@ $(srcdir) - -mockpp_config-cygwin.h: - echo "// #define's for Cygwin" >$@ - echo "// derived from automatically generated config.h. See Makefile.am." >>$@ - TODAY=`date +%Y-%m-%d` ; echo "/* Generated: $$TODAY */" >>$@ - echo "" >>$@ - echo "/* Define to turn debugging globally on. */" >>$@ - echo "#undef DEBUG" >>$@ - echo "" >>$@ - echo "/* Version number of package */" >>$@ - echo "#define MOCKPP_VERSION \"$(VERSION)\"" >>$@ - echo "" >>$@ - echo "/* Name of package */" >>$@ - echo "#define MOCKPP_PACKAGE \"$(PACKAGE)\"" >>$@ - echo "" >>$@ - echo "/* Define if you have CppUnit installed. */" >>$@ - echo "#define HAVE_CPPUNIT" >>$@ - echo "" >>$@ - echo "/* Define to 1 if you have the <limits> header file. */" >>$@ - echo "#define HAVE_LIMITS" >>$@ - echo "" >>$@ - echo "/* Define to 1 if you have the <cppunit/Message.h> header file. */" >>$@ - echo "#define HAVE_CPPUNIT_MESSAGE_H 1" >>$@ - echo "" >>$@ - echo "/* Define to compile for unicode environment. */" >>$@ - echo "#undef MOCKPP_UNICODE" >>$@ - echo "" >>$@ - echo "/* Define if you have the cwchar header. */" >>$@ - echo "#define HAVE_CWCHAR" >>$@ - echo "" >>$@ - echo "/* Define if you have the std::wstring type. */" >>$@ - echo "#define HAVE_WSTRING" >>$@ - echo "" >>$@ - echo "/* Define if you have the wcscmp function. */" >>$@ - echo "#define HAVE_WCSCMP" >>$@ - echo "" >>$@ - echo "/* Define if you have the std::wcscmp function. */" >>$@ - echo "#undef HAVE_STD_WCSCMP" >>$@ + echo "define MOCKPP_UNUSED(x) x;" >>$@ echo "" >>$@ -test $@ -ef $(srcdir) || cp $@ $(srcdir) @@ -232,7 +192,7 @@ echo "#define HAVE_STD_WCSCMP" >>$@ echo "" >>$@ echo "/* Define to supress compiler warnings about unused variables. */" >>$@ - echo "#define MOCKPP_UNUSED(x) x" >>$@ + echo "define MOCKPP_UNUSED(x) x;" >>$@ echo "" >>$@ -test $@ -ef $(srcdir) || cp $@ $(srcdir) @@ -278,7 +238,7 @@ echo "#undef HAVE_STD_WCSCMP" >>$@ echo "" >>$@ echo "/* Define to supress compiler warnings about unused variables. */" >>$@ - echo "#define MOCKPP_UNUSED(x) x" >>$@ + echo "define MOCKPP_UNUSED(x) x;" >>$@ echo "" >>$@ -test $@ -ef $(srcdir) || cp $@ $(srcdir) |
From: Ewald A. <ewa...@us...> - 2005-04-02 20:46:08
|
Update of /cvsroot/mockpp/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3635 Modified Files: configure.in Log Message: more fixes for msvc6 Index: configure.in =================================================================== RCS file: /cvsroot/mockpp/mockpp/configure.in,v retrieving revision 1.71 retrieving revision 1.72 diff -u -d -r1.71 -r1.72 --- configure.in 2 Apr 2005 14:15:24 -0000 1.71 +++ configure.in 2 Apr 2005 20:45:27 -0000 1.72 @@ -45,7 +45,7 @@ AC_CONFIG_AUX_DIR(config) AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(mockpp, $MOCKPP_VERSION-rc3) +AM_INIT_AUTOMAKE(mockpp, $MOCKPP_VERSION-rc4) AC_SUBST(all_includes) AC_SUBST(all_libraries) @@ -312,10 +312,10 @@ AC_LANG_CPLUSPLUS cat > conftest.$ac_ext <<EOF -#include <string> +#include <cwchar> int main() { - std::wcscmp(0); + std::wcscmp(0, 0); } EOF @@ -384,6 +384,10 @@ AH_TEMPLATE([MOCKPP_PTI_WEAKNESS], [Turn on support for weak template capabilities.]) +AH_TEMPLATE([MOCKPP_UNUSED], +[Define to something that supresses compiler warnings about unused variables.\n +MOCKPP_UNUSED(x) (x = x); ]) + # ---------------------------------------------------------------------------- AC_OUTPUT(\ |
From: Ewald A. <ewa...@us...> - 2005-04-02 20:45:43
|
Update of /cvsroot/mockpp/mockpp/mockpp/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3635/mockpp/tests Modified Files: AbstractDynamicChainingMock_test.cpp ChainableMockObject_1_test.cpp ChainableMockObject_2_test.cpp ChainableMockObject_3_test.cpp ChainableMockObject_4_test.cpp ChainableMockObject_5_test.cpp ChainableMockObject_test.cpp InvocationMockerBuilder_test.cpp InvocationMocker_test.cpp mock_test.cpp Log Message: more fixes for msvc6 Index: ChainableMockObject_5_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/ChainableMockObject_5_test.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- ChainableMockObject_5_test.cpp 24 Mar 2005 21:43:07 -0000 1.7 +++ ChainableMockObject_5_test.cpp 2 Apr 2005 20:45:32 -0000 1.8 @@ -293,7 +293,7 @@ try { - mcm.chainable_i(1, 2, 3, 4, 5) == 999; + mcm.chainable_i(1, 2, 3, 4, 5); CPPUNIT_ASSERT_MESSAGE("should have thrown", false); } catch(mockpp::AssertionFailedError &ex) Index: ChainableMockObject_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/ChainableMockObject_test.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- ChainableMockObject_test.cpp 24 Mar 2005 21:43:07 -0000 1.19 +++ ChainableMockObject_test.cpp 2 Apr 2005 20:45:32 -0000 1.20 @@ -440,7 +440,7 @@ CPPUNIT_ASSERT(mcm.chainable_b() == 456); try { - mcm.chainable_a() == 123; + mcm.chainable_a(); CPPUNIT_ASSERT_MESSAGE("should have thrown", false); } catch(mockpp::AssertionFailedError &ex) Index: ChainableMockObject_4_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/ChainableMockObject_4_test.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- ChainableMockObject_4_test.cpp 30 Dec 2004 20:54:05 -0000 1.5 +++ ChainableMockObject_4_test.cpp 2 Apr 2005 20:45:32 -0000 1.6 @@ -109,23 +109,23 @@ .with(mockpp::eq( (unsigned int) 87), mockpp::eq( (unsigned int) 65), mockpp::eq( (unsigned int) 43), - mockpp::eq( (unsigned int) 21)) + mockpp::eq( (unsigned int) 21)) .will(new mockpp::ReturnStub<int>(87654321)); - - CPPUNIT_ASSERT(mcm.chainable(12, 34, 56, 78) == 12345678); - CPPUNIT_ASSERT(mcm.chainable(87, 65, 43, 21) == 87654321); - + + CPPUNIT_ASSERT(mcm.chainable(12, 34, 56, 78) == 12345678); + CPPUNIT_ASSERT(mcm.chainable(87, 65, 43, 21) == 87654321); + try { - mcm.chainable(1, 2, 3, 4) == 999; + mcm.chainable(1, 2, 3, 4); CPPUNIT_ASSERT_MESSAGE("should have thrown", false); } catch(mockpp::AssertionFailedError &ex) { CPPUNIT_ASSERT(ex.getMessage().find(MOCKPP_PCHAR("unexpected invocation")) != mockpp::String::npos); } - - mcm.verify(); + + mcm.verify(); } Index: InvocationMocker_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/InvocationMocker_test.cpp,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- InvocationMocker_test.cpp 2 Apr 2005 13:46:34 -0000 1.30 +++ InvocationMocker_test.cpp 2 Apr 2005 20:45:33 -0000 1.31 @@ -49,11 +49,6 @@ #include "classes_ABCDE.h" -typedef mockpp::Invocation5<CA, CB, CC, CD, CE> SetterInvocation; -typedef mockpp::Invocation5<CA, CB, CC, CD, CE> GetterInvocation; - -MOCKPP_PTI_DECLARE(SetterInvocation) - namespace { @@ -169,6 +164,8 @@ }; +typedef mockpp::Invocation5<CA, CB, CC, CD, CE> SetterInvocation; +typedef mockpp::Invocation5<CA, CB, CC, CD, CE> GetterInvocation; void InvocationMocker_test::test_instance() @@ -179,6 +176,15 @@ } +} // namespace + + +MOCKPP_PTI_DECLARE(SetterInvocation) + + +namespace { + + void InvocationMocker_test::test_instance_void() { mockpp::InvocationMocker<void, SetterInvocation> im; @@ -357,10 +363,10 @@ } -//MOCKPP_PTI_IMPLEMENT(SetterInvocation) +} // namespace -} // namespace +MOCKPP_PTI_IMPLEMENT(SetterInvocation) #endif // HAVE_CPPUNIT Index: mock_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/mock_test.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- mock_test.cpp 25 Mar 2005 17:20:36 -0000 1.21 +++ mock_test.cpp 2 Apr 2005 20:45:33 -0000 1.22 @@ -42,15 +42,22 @@ # include <cppunit/TestFailure.h> # include <cppunit/CompilerOutputter.h> + +#ifndef MSC_VER +using std::time; +using std::time_t; +#endif + + class MyListener : public CppUnit::TextTestProgressListener { - std::time_t starttime; + time_t starttime; public: void startTest( CppUnit::Test *test ) { - starttime = std::time(0); + starttime = time(0); std::cerr << ">>>>>>>>>>>>>>>> " << test->getName() << " : " << starttime << std::endl; @@ -66,8 +73,8 @@ void endTest(CppUnit::Test *test) { std::cerr << std::endl; - std::time_t endtime = std::time(0); - std::time_t difftime = starttime - endtime; + time_t endtime = time(0); + time_t difftime = starttime - endtime; unsigned m = difftime / 60; unsigned s = difftime % 60; std::cerr << "<<<<<<<<<<<<<<<< " << test->getName() Index: ChainableMockObject_3_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/ChainableMockObject_3_test.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- ChainableMockObject_3_test.cpp 17 Nov 2004 13:08:17 -0000 1.4 +++ ChainableMockObject_3_test.cpp 2 Apr 2005 20:45:32 -0000 1.5 @@ -106,23 +106,23 @@ chain.stubs(mockpp::once()) .with(mockpp::eq( (unsigned int) 65), mockpp::eq( (unsigned int) 43), - mockpp::eq( (unsigned int) 21)) + mockpp::eq( (unsigned int) 21)) .will(new mockpp::ReturnStub<int>(654321)); - - CPPUNIT_ASSERT(mcm.chainable(12, 34, 56) == 123456); - CPPUNIT_ASSERT(mcm.chainable(65, 43, 21) == 654321); - + + CPPUNIT_ASSERT(mcm.chainable(12, 34, 56) == 123456); + CPPUNIT_ASSERT(mcm.chainable(65, 43, 21) == 654321); + try { - mcm.chainable(1, 2, 3) == 999; + mcm.chainable(1, 2, 3); CPPUNIT_ASSERT_MESSAGE("should have thrown", false); } catch(mockpp::AssertionFailedError &ex) { CPPUNIT_ASSERT(ex.getMessage().find(MOCKPP_PCHAR("unexpected invocation")) != mockpp::String::npos); } - - mcm.verify(); + + mcm.verify(); } Index: InvocationMockerBuilder_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/InvocationMockerBuilder_test.cpp,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- InvocationMockerBuilder_test.cpp 30 Dec 2004 20:54:06 -0000 1.25 +++ InvocationMockerBuilder_test.cpp 2 Apr 2005 20:45:32 -0000 1.26 @@ -99,11 +99,11 @@ : mockpp::InvocationMockerBuilder<AMB>( mocker, builderNamespace ) {} -#ifdef __BORLANDC__ +#if defined( __BORLANDC__) || (defined(_MSC_VER) && (_MSC_VER < 1300)) mockpp::MatchBuilder<R, I> &with_cs( const CS &constraintset ) { return mockpp::InvocationMockerBuilder<AMB>::with_cs(constraintset); - } + } #else using mockpp::InvocationMockerBuilder<AMB>::with_cs; #endif Index: ChainableMockObject_2_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/ChainableMockObject_2_test.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- ChainableMockObject_2_test.cpp 30 Dec 2004 20:54:05 -0000 1.5 +++ ChainableMockObject_2_test.cpp 2 Apr 2005 20:45:32 -0000 1.6 @@ -103,23 +103,23 @@ chain.stubs(mockpp::once()) .with(mockpp::eq( (unsigned int) 43), - mockpp::eq( (unsigned int) 21)) + mockpp::eq( (unsigned int) 21)) .will(new mockpp::ReturnStub<int>(4321)); - - CPPUNIT_ASSERT(mcm.chainable(12, 34) == 1234); - CPPUNIT_ASSERT(mcm.chainable(43, 21) == 4321); - + + CPPUNIT_ASSERT(mcm.chainable(12, 34) == 1234); + CPPUNIT_ASSERT(mcm.chainable(43, 21) == 4321); + try { - mcm.chainable(1, 2) == 999; + mcm.chainable(1, 2); CPPUNIT_ASSERT_MESSAGE("should have thrown", false); } catch(mockpp::AssertionFailedError &ex) { CPPUNIT_ASSERT(ex.getMessage().find(MOCKPP_PCHAR("unexpected invocation")) != mockpp::String::npos); } - - mcm.verify(); + + mcm.verify(); } Index: ChainableMockObject_1_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/ChainableMockObject_1_test.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- ChainableMockObject_1_test.cpp 30 Dec 2004 20:54:05 -0000 1.5 +++ ChainableMockObject_1_test.cpp 2 Apr 2005 20:45:32 -0000 1.6 @@ -56,7 +56,7 @@ CPPUNIT_TEST_SUITE_END(); public: - + void test_parameter_1(); }; @@ -98,27 +98,27 @@ MOCKPP_CHAINER_FOR(MyChainableMockObject_1, chainable) chain(&mcm); chain.stubs(mockpp::once()) - .with(mockpp::eq((unsigned int) 12)) + .with(mockpp::eq((unsigned int) 12)) .will(new mockpp::ReturnStub<int>(21)); chain.stubs(mockpp::once()) .with(mockpp::eq((unsigned int) 34)) // @todoc pitfall .will(new mockpp::ReturnStub<int>(43)); - - CPPUNIT_ASSERT(mcm.chainable(12) == 21); - CPPUNIT_ASSERT(mcm.chainable(34) == 43); - + + CPPUNIT_ASSERT(mcm.chainable(12) == 21); + CPPUNIT_ASSERT(mcm.chainable(34) == 43); + try { - mcm.chainable(56) == 999; + mcm.chainable(56); CPPUNIT_ASSERT_MESSAGE("should have thrown", false); } catch(mockpp::AssertionFailedError &ex) { CPPUNIT_ASSERT(ex.getMessage().find(MOCKPP_PCHAR("unexpected invocation")) != mockpp::String::npos); } - - mcm.verify(); + + mcm.verify(); } Index: AbstractDynamicChainingMock_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/AbstractDynamicChainingMock_test.cpp,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- AbstractDynamicChainingMock_test.cpp 25 Mar 2005 17:20:35 -0000 1.26 +++ AbstractDynamicChainingMock_test.cpp 2 Apr 2005 20:45:32 -0000 1.27 @@ -216,7 +216,7 @@ void AbstractDynamicChainingMock_test::test_describer() { -#if !defined(__BORLANDC__) && (__GNUC__ >= 3) // @todo make compiling +#if !defined(__BORLANDC__) && ((__GNUC__ >= 3) || defined(_MSC_VER)) // @todo make compiling mockpp::AbstractDynamicChainingMock<int, GetterInvocation>::Describer desc; CPPUNIT_ASSERT(desc.hasDescription() == false); @@ -224,9 +224,9 @@ mockpp::InvocationMocker<int, GetterInvocation>::List matchers; CPPUNIT_ASSERT(desc.describeTo(s, - matchers, - mockpp::returnValue<int>(1).get(), - mockpp::String(MOCKPP_PCHAR("name")) ) == MOCKPP_PCHAR("") ); + matchers, + mockpp::returnValue<int>(1).get(), + mockpp::String(MOCKPP_PCHAR("name")) ) == MOCKPP_PCHAR("") ); #endif } |
From: Ewald A. <ewa...@us...> - 2005-04-02 20:45:42
|
Update of /cvsroot/mockpp/mockpp/mockpp/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3635/mockpp/util Modified Files: AutoPointer.h Log Message: more fixes for msvc6 Index: AutoPointer.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/util/AutoPointer.h,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- AutoPointer.h 23 Mar 2005 21:13:10 -0000 1.13 +++ AutoPointer.h 2 Apr 2005 20:45:33 -0000 1.14 @@ -62,7 +62,7 @@ { } -#if defined(_MSC_VER) && (_MSC_VER < 1300) // at least not MSCV6 +#if defined(_MSC_VER) && (_MSC_VER <= 1300) // at least not MSCV6 // MAT : hmm dont know how it can actually work properly without this operator ?! #else |
From: Ewald A. <ewa...@us...> - 2005-04-02 20:45:41
|
Update of /cvsroot/mockpp/mockpp/mockpp/stub In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3635/mockpp/stub Modified Files: StubHolder.h ThrowStub.h TypelessStub.h Log Message: more fixes for msvc6 Index: StubHolder.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/stub/StubHolder.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- StubHolder.h 30 Jan 2005 12:09:18 -0000 1.9 +++ StubHolder.h 2 Apr 2005 20:45:31 -0000 1.10 @@ -76,7 +76,7 @@ /** Creates the object. * @param in_stub pointer to the stub */ - StubHolder(const typename Stub<R, I>::AP &in_stub) + StubHolder(const AutoPointer<Stub<R, I> > &in_stub) : stub(in_stub) {} @@ -84,11 +84,7 @@ * @attention After this method is called this object becomes invalid. * @return the stub object */ -#if defined(__BORLANDC__) && (__BORLANDC__ >= 560) - operator typename AutoPointer<Stub<R, I> > () const // we we actually lie a bit -#else - operator typename Stub<R, I>::AP () const -#endif + operator AutoPointer<Stub<R, I> > () const // we we actually lie a bit { return stub; } Index: TypelessStub.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/stub/TypelessStub.h,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- TypelessStub.h 25 Mar 2005 16:30:30 -0000 1.14 +++ TypelessStub.h 2 Apr 2005 20:45:32 -0000 1.15 @@ -183,7 +183,7 @@ */ #define MOCKPP_TYPELESSSTUBADAPTER_PTI_DECL(I) \ template<> \ -void mockpp::TypelessStubAdapter<void, I>::invoke( const I &); +void mockpp::TypelessStubAdapter<void, I >::invoke( const I &); /** Implement specialized methods for mockpp::InvocationMocker. @@ -191,7 +191,7 @@ */ #define MOCKPP_TYPELESSSTUBADAPTER_PTI_IMPL(I) \ template<> \ -void mockpp::TypelessStubAdapter<void, I>::invoke( const I &invocation) \ +void mockpp::TypelessStubAdapter<void, I >::invoke( const I &invocation) \ { \ this->stubber->typelessInvoke(); \ } Index: ThrowStub.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/stub/ThrowStub.h,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- ThrowStub.h 2 Apr 2005 13:46:32 -0000 1.29 +++ ThrowStub.h 2 Apr 2005 20:45:32 -0000 1.30 @@ -160,7 +160,7 @@ */ #define MOCKPP_THROWSTUB_PTI_DECL \ template<> \ -void ::mockpp::ThrowStub<void>::typelessInvoke(); \ +void mockpp::ThrowStub<void>::typelessInvoke(); \ /** Implement specialized methods for mockpp::InvocationMocker. @@ -168,10 +168,10 @@ */ #define MOCKPP_THROWSTUB_PTI_IMPL \ template<> \ -void ::mockpp::ThrowStub<void>::typelessInvoke() \ +void mockpp::ThrowStub<void>::typelessInvoke() \ { \ this->throwable.get()->throw_me(); \ -} +} #endif // MOCKPP_PTI_WEAKNESS |
From: Ewald A. <ewa...@us...> - 2005-04-02 14:15:32
|
Update of /cvsroot/mockpp/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14770 Modified Files: configure.in Log Message: update version Index: configure.in =================================================================== RCS file: /cvsroot/mockpp/mockpp/configure.in,v retrieving revision 1.70 retrieving revision 1.71 diff -u -d -r1.70 -r1.71 --- configure.in 2 Apr 2005 14:09:58 -0000 1.70 +++ configure.in 2 Apr 2005 14:15:24 -0000 1.71 @@ -45,7 +45,7 @@ AC_CONFIG_AUX_DIR(config) AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(mockpp, $MOCKPP_VERSION-rc2) +AM_INIT_AUTOMAKE(mockpp, $MOCKPP_VERSION-rc3) AC_SUBST(all_includes) AC_SUBST(all_libraries) |
From: Ewald A. <ewa...@us...> - 2005-04-02 14:10:32
|
Update of /cvsroot/mockpp/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12304 Modified Files: AUTHORS Log Message: update Index: AUTHORS =================================================================== RCS file: /cvsroot/mockpp/mockpp/AUTHORS,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- AUTHORS 24 Mar 2005 18:56:59 -0000 1.5 +++ AUTHORS 2 Apr 2005 14:10:16 -0000 1.6 @@ -1,8 +1,8 @@ Original author and maintainer - Ewald Arnold <mo...@ew...> + Ewald Arnold, mockpp at ewald-arnold.de FUKUDA, Fumiki (AKA episteme -- 'cuppa' project : http://www.unittest.org/) Help to port to MSVC6, MSVC7 (up to 1.1.16) - Mathieu Champlon <mat...@ma...> + Mathieu Champlon, mathieu.champlon at masagroup.net Help to port to MSVC 7.1 (version 1.7 and later) |
From: Ewald A. <ewa...@us...> - 2005-04-02 14:10:14
|
Update of /cvsroot/mockpp/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12120 Modified Files: bug-report ChangeLog configure.in Log Message: fixes for cygwin (unicode+ascii) Index: bug-report =================================================================== RCS file: /cvsroot/mockpp/mockpp/bug-report,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- bug-report 30 Aug 2003 09:31:24 -0000 1.4 +++ bug-report 2 Apr 2005 14:09:58 -0000 1.5 @@ -1,6 +1,6 @@ rm mockpp-bug-report.tar.gz ./configure >x1 2>x2 -make -i >x3 2>x4 +make check -k -i >x3 2>x4 set >x5 gcc -v >x6 uname -a >x7 Index: ChangeLog =================================================================== RCS file: /cvsroot/mockpp/mockpp/ChangeLog,v retrieving revision 1.39 retrieving revision 1.40 diff -u -d -r1.39 -r1.40 --- ChangeLog 2 Apr 2005 13:46:26 -0000 1.39 +++ ChangeLog 2 Apr 2005 14:09:58 -0000 1.40 @@ -3,7 +3,7 @@ mockpp history -------------- -2005-03-22 1.7.0: - ReturnObjectList::addObjectToReturn has a counter value +2005-03-31 1.7.0: - ReturnObjectList::addObjectToReturn now has a counter value and returns a reference to itself for chaining - project files for msvc 7.1 - fix for cygwin (compiles at least without unicode and static libs) Index: configure.in =================================================================== RCS file: /cvsroot/mockpp/mockpp/configure.in,v retrieving revision 1.69 retrieving revision 1.70 diff -u -d -r1.69 -r1.70 --- configure.in 2 Apr 2005 13:46:26 -0000 1.69 +++ configure.in 2 Apr 2005 14:09:58 -0000 1.70 @@ -45,7 +45,7 @@ AC_CONFIG_AUX_DIR(config) AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(mockpp, $MOCKPP_VERSION) +AM_INIT_AUTOMAKE(mockpp, $MOCKPP_VERSION-rc2) AC_SUBST(all_includes) AC_SUBST(all_libraries) |
From: Ewald A. <ewa...@us...> - 2005-04-02 14:08:58
|
Update of /cvsroot/mockpp/mockpp/mockpp/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11376/mockpp/tests Modified Files: Makefile.am Log Message: update Index: Makefile.am =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/Makefile.am,v retrieving revision 1.70 retrieving revision 1.71 diff -u -d -r1.70 -r1.71 --- Makefile.am 30 Mar 2005 18:28:45 -0000 1.70 +++ Makefile.am 2 Apr 2005 14:08:47 -0000 1.71 @@ -108,3 +108,4 @@ mock_test_LDFLAGS = -L/opt/intel_cc_80/lib noinst_HEADERS = classes_ABCDE.h MyBuilderNamespace.h MyMatchBuilder.h + |
From: Ewald A. <ewa...@us...> - 2005-04-02 13:47:27
|
Update of /cvsroot/mockpp/mockpp/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31668/mockpp Modified Files: Makefile.am mockpp.h Log Message: fixes for cygwin (unicode+ascii) Index: mockpp.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/mockpp.h,v retrieving revision 1.48 retrieving revision 1.49 diff -u -d -r1.48 -r1.49 --- mockpp.h 25 Mar 2005 18:46:56 -0000 1.48 +++ mockpp.h 2 Apr 2005 13:46:28 -0000 1.49 @@ -84,36 +84,41 @@ #include <typeinfo> # ifdef _MSC_VER -// Compilation Warning remover +// Compilation Warning remover // needed to prevent MSVC6 complain about itself :-/ # pragma warning (disable:4786) // this warning occurs when VC6 truncate a debug symbol which is longer than 255 chars. # pragma warning (disable:4251) // this warning occurs when a class member doesn't have a dll-interface. # pragma warning (disable:4180) # pragma warning (disable:4355) -# pragma warning (disable:4512) -# pragma warning (disable:4511) -# pragma warning (disable:4018) -# pragma warning (disable:4100) -# pragma warning (disable:4663) -# pragma warning (disable:4146) -# pragma warning (disable:4244) +# pragma warning (disable:4512) +# pragma warning (disable:4511) +# pragma warning (disable:4018) +# pragma warning (disable:4100) +# pragma warning (disable:4663) +# pragma warning (disable:4146) +# pragma warning (disable:4244) # endif // _MSC_VER - - + + #if defined(_MSC_VER) -# if _MSC_VER <= 1200 -# define _MSC_VER_60_70 1 +# if _MSC_VER <= 1200 +# define _MSC_VER_60_70 1 # include <mockpp/mockpp_config-msvc_60_70.h> -# else defined(_MSC_VER) -# include <mockpp/mockpp_config-msvc_71.h> +# else defined(_MSC_VER) +# include <mockpp/mockpp_config-msvc_71.h> # endif - + #elif defined(__BORLANDC__) # include <mockpp/mockpp_config-bcb5.h> - + #elif defined(__CYGWIN__) -# include <mockpp/mockpp_config-cygwin.h> - +# ifdef HAVE_CONFIG_H +# include <config.h> +# else +# include <mockpp/mockpp_config.h> +//# include <mockpp/mockpp_config-cygwin.h> +# endif + #else # ifdef HAVE_CONFIG_H # include <config.h> @@ -122,9 +127,24 @@ # endif #endif +#if defined(MOCKPP_UNICODE) +# ifndef _UNICODE +# define _UNICODE +# endif +# ifndef UNICODE +# define UNICODE +# endif +#endif + +#if defined(MOCKPP_UNICODE) && defined(__CYGWIN__) // probably ugly hack +# define _GLIBCPP_USE_WSTRING 1 +//# define _GLIBCPP_USE_WCHAR_T 1 +//# define _GLIBCPP_HAVE_WCHAR_H +#endif + #include <string> -#ifdef HAVE_LIMITS +#ifdef HAVE_LIMITS # include <limits> // current #else # ifdef HAVE_VALUES_H @@ -134,20 +154,20 @@ # endif #endif -/** @def MOCKPP_UNLIMITED - * Value representing an @p unlimited number. - */ - +/** @def MOCKPP_UNLIMITED + * Value representing an @p unlimited number. + */ + #ifdef HAVE_LIMITS # define MOCKPP_UNLIMITED (std::numeric_limits<unsigned>::max()) #else # define MOCKPP_UNLIMITED (UINT_MAX) #endif - + #ifdef __BORLANDC__ # define MOCKPP_FUNC_MACRO __FUNC__ #elif defined(_MSC_VER) -# if _MSC_VER <= 1200 +# if _MSC_VER <= 1200 # define MOCKPP_FUNC_MACRO (std::string(__FILE__) + "_" + mockpp::getLatin1(mockpp::number((long unsigned)__LINE__))) // needs #include <mockpp/compat/Formatter.h> # else # define MOCKPP_FUNC_MACRO __FUNCSIG__ Index: Makefile.am =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/Makefile.am,v retrieving revision 1.74 retrieving revision 1.75 diff -u -d -r1.74 -r1.75 --- Makefile.am 24 Mar 2005 21:43:06 -0000 1.74 +++ Makefile.am 2 Apr 2005 13:46:27 -0000 1.75 @@ -142,9 +142,12 @@ echo "/* Define if you have the std::wstring type. */" >>$@ echo "#define HAVE_WSTRING" >>$@ echo "" >>$@ - echo "/* Define if you have the std::wcscmp type. */" >>$@ + echo "/* Define if you have the wcscmp function. */" >>$@ echo "#define HAVE_WCSCMP" >>$@ echo "" >>$@ + echo "/* Define if you have the std::wcscmp function. */" >>$@ + echo "#define HAVE_STD_WCSCMP" >>$@ + echo "" >>$@ echo "/* Define to supress compiler warnings about unused variables. */" >>$@ echo "#define MOCKPP_UNUSED(x) x" >>$@ echo "" >>$@ @@ -182,8 +185,11 @@ echo "/* Define if you have the std::wstring type. */" >>$@ echo "#define HAVE_WSTRING" >>$@ echo "" >>$@ - echo "/* Define if you have the std::wcscmp type. */" >>$@ - echo "#undef HAVE_WCSCMP" >>$@ + echo "/* Define if you have the wcscmp function. */" >>$@ + echo "#define HAVE_WCSCMP" >>$@ + echo "" >>$@ + echo "/* Define if you have the std::wcscmp function. */" >>$@ + echo "#undef HAVE_STD_WCSCMP" >>$@ echo "" >>$@ -test $@ -ef $(srcdir) || cp $@ $(srcdir) @@ -219,9 +225,12 @@ echo "/* Define if you have the std::wstring type. */" >>$@ echo "#define HAVE_WSTRING" >>$@ echo "" >>$@ - echo "/* Define if you have the std::wcscmp type. */" >>$@ + echo "/* Define if you have the wcscmp function. */" >>$@ echo "#define HAVE_WCSCMP" >>$@ echo "" >>$@ + echo "/* Define if you have the std::wcscmp function. */" >>$@ + echo "#define HAVE_STD_WCSCMP" >>$@ + echo "" >>$@ echo "/* Define to supress compiler warnings about unused variables. */" >>$@ echo "#define MOCKPP_UNUSED(x) x" >>$@ echo "" >>$@ @@ -262,9 +271,12 @@ echo "/* Define if you have the std::wstring type. */" >>$@ echo "#define HAVE_WSTRING" >>$@ echo "" >>$@ - echo "/* Define if you have the std::wcscmp type. */" >>$@ + echo "/* Define if you have the wcscmp function. */" >>$@ echo "#define HAVE_WCSCMP" >>$@ echo "" >>$@ + echo "/* Define if you have the std::wcscmp function. */" >>$@ + echo "#undef HAVE_STD_WCSCMP" >>$@ + echo "" >>$@ echo "/* Define to supress compiler warnings about unused variables. */" >>$@ echo "#define MOCKPP_UNUSED(x) x" >>$@ echo "" >>$@ |
From: Ewald A. <ewa...@us...> - 2005-04-02 13:47:21
|
Update of /cvsroot/mockpp/mockpp/mockpp/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31668/mockpp/tests Modified Files: InvocationMocker_test.cpp Log Message: fixes for cygwin (unicode+ascii) Index: InvocationMocker_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/InvocationMocker_test.cpp,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- InvocationMocker_test.cpp 25 Mar 2005 17:20:35 -0000 1.29 +++ InvocationMocker_test.cpp 2 Apr 2005 13:46:34 -0000 1.30 @@ -39,6 +39,7 @@ #include <mockpp/chaining/mockpp_pti.h> #include <mockpp/stub/ReturnStub.h> +#include <mockpp/stub/ThrowStub.h> #include <mockpp/constraint/IsEqual.h> #include <mockpp/constraint/IsGreaterThan.h> @@ -48,6 +49,11 @@ #include "classes_ABCDE.h" +typedef mockpp::Invocation5<CA, CB, CC, CD, CE> SetterInvocation; +typedef mockpp::Invocation5<CA, CB, CC, CD, CE> GetterInvocation; + +MOCKPP_PTI_DECLARE(SetterInvocation) + namespace { @@ -163,8 +169,6 @@ }; -typedef mockpp::Invocation5<CA, CB, CC, CD, CE> SetterInvocation; -typedef mockpp::Invocation5<CA, CB, CC, CD, CE> GetterInvocation; void InvocationMocker_test::test_instance() @@ -175,9 +179,6 @@ } -MOCKPP_PTI_DECLARE(SetterInvocation) - - void InvocationMocker_test::test_instance_void() { mockpp::InvocationMocker<void, SetterInvocation> im; @@ -356,7 +357,7 @@ } -MOCKPP_PTI_IMPLEMENT(SetterInvocation) +//MOCKPP_PTI_IMPLEMENT(SetterInvocation) } // namespace |
From: Ewald A. <ewa...@us...> - 2005-04-02 13:47:21
|
Update of /cvsroot/mockpp/mockpp/mockpp/stub In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31668/mockpp/stub Modified Files: ThrowStub.h Log Message: fixes for cygwin (unicode+ascii) Index: ThrowStub.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/stub/ThrowStub.h,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- ThrowStub.h 25 Mar 2005 16:30:29 -0000 1.28 +++ ThrowStub.h 2 Apr 2005 13:46:32 -0000 1.29 @@ -160,7 +160,7 @@ */ #define MOCKPP_THROWSTUB_PTI_DECL \ template<> \ -void mockpp::ThrowStub<void>::typelessInvoke(); +void ::mockpp::ThrowStub<void>::typelessInvoke(); \ /** Implement specialized methods for mockpp::InvocationMocker. @@ -168,10 +168,10 @@ */ #define MOCKPP_THROWSTUB_PTI_IMPL \ template<> \ -void mockpp::ThrowStub<void>::typelessInvoke() \ +void ::mockpp::ThrowStub<void>::typelessInvoke() \ { \ this->throwable.get()->throw_me(); \ -} +} #endif // MOCKPP_PTI_WEAKNESS |
From: Ewald A. <ewa...@us...> - 2005-04-02 13:47:21
|
Update of /cvsroot/mockpp/mockpp/mockpp/compat In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31668/mockpp/compat Modified Files: Assert.cpp Log Message: fixes for cygwin (unicode+ascii) Index: Assert.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/compat/Assert.cpp,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- Assert.cpp 30 Dec 2004 20:54:04 -0000 1.22 +++ Assert.cpp 2 Apr 2005 13:46:30 -0000 1.23 @@ -43,7 +43,7 @@ /* Compare S1 and S2, returning less than, equal to or greater than zero if S1 is lexicographically less than, equal to or greater than S2. */ -int +static int wcscmp (const wchar_t *s1, const wchar_t *s2) { wchar_t c1, c2; @@ -146,7 +146,7 @@ const wchar_t *expected, const wchar_t *actual) { -#if defined(_MSC_VER) || !defined(HAVE_WCSCMP) +#if !defined(HAVE_STD_WCSCMP) if (wcscmp(expected, actual) != 0) #else if (std::wcscmp(expected, actual) != 0) |
From: Ewald A. <ewa...@us...> - 2005-04-02 13:47:10
|
Update of /cvsroot/mockpp/mockpp/mockpp/chaining In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31668/mockpp/chaining Modified Files: InvocationMocker.h Log Message: fixes for cygwin (unicode+ascii) Index: InvocationMocker.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/InvocationMocker.h,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- InvocationMocker.h 25 Mar 2005 16:30:29 -0000 1.28 +++ InvocationMocker.h 2 Apr 2005 13:46:29 -0000 1.29 @@ -441,14 +441,14 @@ */ #define MOCKPP_INVOCATIONMOCKER_PTI_DECL(I) \ template<> \ -mockpp::InvocationMocker<void, I>::InvocationMocker<void, I>(); \ +::mockpp::InvocationMocker<void, I>::InvocationMocker<void, I>(); \ \ template<> \ -mockpp::InvocationMocker<void, I>::InvocationMocker<void, I>(\ - mockpp::AutoPointer<mockpp::InvocationMockerBase<void, I>::DescriberBase> in_describer ); \ +::mockpp::InvocationMocker<void, I>::InvocationMocker<void, I>(\ + ::mockpp::AutoPointer<mockpp::InvocationMockerBase<void, I>::DescriberBase> in_describer ); \ \ template<> \ -void mockpp::InvocationMocker<void, I>::invoke( const I &invocation ); +void ::mockpp::InvocationMocker<void, I>::invoke( const I &invocation ); /** Implement specialized methods for mockpp::InvocationMocker. @@ -456,22 +456,22 @@ */ #define MOCKPP_INVOCATIONMOCKER_PTI_IMPL(I) \ template<> \ -mockpp::InvocationMocker<void, I>::InvocationMocker<void, I>() \ - : InvocationMockerBase<void, I>( new mockpp::InvocationMockerBase<void, I>::DefaultDescriber(), \ - new mockpp::TypelessStubAdapter<void, I>(new mockpp::VoidStub)) \ +::mockpp::InvocationMocker<void, I>::InvocationMocker<void, I>() \ + : InvocationMockerBase<void, I>( new ::mockpp::InvocationMockerBase<void, I>::DefaultDescriber(), \ + new ::mockpp::TypelessStubAdapter<void, I>(new ::mockpp::VoidStub)) \ { \ } \ \ template<> \ mockpp::InvocationMocker<void, I>::InvocationMocker<void, I>(\ - mockpp::AutoPointer<mockpp::InvocationMockerBase<void, I>::DescriberBase> in_describer ) \ + ::mockpp::AutoPointer<mockpp::InvocationMockerBase<void, I>::DescriberBase> in_describer ) \ : InvocationMockerBase<void, I>( in_describer, \ - new mockpp::TypelessStubAdapter<void, I>(new mockpp::VoidStub)) \ + new ::mockpp::TypelessStubAdapter<void, I>(new ::mockpp::VoidStub)) \ { \ } \ \ template<> \ -void mockpp::InvocationMocker<void, I>::invoke( const I &invocation ) \ +void ::mockpp::InvocationMocker<void, I>::invoke( const I &invocation ) \ { \ for ( Iterator it = this->matchers.begin(); it != this->matchers.end(); ++it ) \ ( *it ) ->incInvoked( invocation ); \ |
From: Ewald A. <ewa...@us...> - 2005-04-02 13:47:06
|
Update of /cvsroot/mockpp/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31668 Modified Files: ChangeLog Makefile.am configure.in Log Message: fixes for cygwin (unicode+ascii) Index: ChangeLog =================================================================== RCS file: /cvsroot/mockpp/mockpp/ChangeLog,v retrieving revision 1.38 retrieving revision 1.39 diff -u -d -r1.38 -r1.39 --- ChangeLog 28 Mar 2005 09:39:24 -0000 1.38 +++ ChangeLog 2 Apr 2005 13:46:26 -0000 1.39 @@ -6,6 +6,7 @@ 2005-03-22 1.7.0: - ReturnObjectList::addObjectToReturn has a counter value and returns a reference to itself for chaining - project files for msvc 7.1 + - fix for cygwin (compiles at least without unicode and static libs) - minor internal cleanups 2005-03-13 1.6.1: - added missing file to the distribution Index: Makefile.am =================================================================== RCS file: /cvsroot/mockpp/mockpp/Makefile.am,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- Makefile.am 22 Mar 2005 20:49:06 -0000 1.23 +++ Makefile.am 2 Apr 2005 13:46:26 -0000 1.24 @@ -1,4 +1,4 @@ -SUBDIRS = tool mockpp bcb5 bcbX msvc6 msvc7 msvc71 +SUBDIRS = tool mockpp bcb5 bcbX msvc6 msvc7 msvc71 LIBTOOL_DEPS = @LIBTOOL_DEPS@ @@ -17,6 +17,7 @@ INSTALL \ README \ TODO \ + Makefile.cvs \ mockpp.lsm CLEANFILES = *.~* *.~~* *~ cachegrind.out.* Index: configure.in =================================================================== RCS file: /cvsroot/mockpp/mockpp/configure.in,v retrieving revision 1.68 retrieving revision 1.69 diff -u -d -r1.68 -r1.69 --- configure.in 25 Mar 2005 16:30:26 -0000 1.68 +++ configure.in 2 Apr 2005 13:46:26 -0000 1.69 @@ -304,6 +304,35 @@ # ---------------------------------------------------------------------------- +AC_DEFUN([EA_CHECK_STD_WCSCMP], +[ + +AC_MSG_CHECKING([for std::wcscmp]) +AC_LANG_SAVE +AC_LANG_CPLUSPLUS + +cat > conftest.$ac_ext <<EOF +#include <string> +int main() +{ + std::wcscmp(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) + AC_DEFINE(HAVE_STD_WCSCMP, 1, [Define if you have the std::wcscmp function.]) +else + AC_MSG_RESULT(no) +fi + +AC_SUBST(HAVE_STD_WCSCMP) +AC_LANG_RESTORE +]) + +# ---------------------------------------------------------------------------- + EA_CHECK_LIBDL EA_ENABLE_DOXYGEN EA_CHECK_LIBCPPUNIT @@ -311,6 +340,7 @@ EA_CHECK_MSGFMT EA_CHECK_WSTRING EA_CHECK_WCSCMP +EA_CHECK_STD_WCSCMP # ---------------------------------------------------------------------------- |
From: Ewald A. <ewa...@us...> - 2005-04-02 13:46:48
|
Update of /cvsroot/mockpp/mockpp/mockpp/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31668/mockpp/util Modified Files: AssertMo.cpp AssertMo.h NotImplementedException.cpp Log Message: fixes for cygwin (unicode+ascii) Index: AssertMo.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/util/AssertMo.h,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- AssertMo.h 28 Jan 2005 20:20:55 -0000 1.21 +++ AssertMo.h 2 Apr 2005 13:46:38 -0000 1.22 @@ -55,6 +55,8 @@ const std::string &excludeString, const std::string &targetString); +#ifdef MOCKPP_UNICODE + /** Asserts that a string does not contain a substring. If it does anyway it throws * an AssertionFailedError with the given infomation. * @ingroup grp_helper @@ -69,6 +71,8 @@ const std::basic_string<wchar_t> &excludeString, const std::basic_string<wchar_t> &targetString); +#endif + /** Asserts that a string does contain a substring. If it does not it throws * an AssertionFailedError with the given infomation. * @ingroup grp_helper @@ -83,6 +87,8 @@ const std::string &includeString, const std::string &targetString); +#ifdef MOCKPP_UNICODE + /** Asserts that a string does contain a substring. If it does not it throws * an AssertionFailedError with the given infomation. * @ingroup grp_helper @@ -97,6 +103,8 @@ const std::basic_string<wchar_t> &includeString, const std::basic_string<wchar_t> &targetString); +#endif + /** Asserts that a string starts with a substring. If it does not it throws * an AssertionFailedError with the given infomation. * @ingroup grp_helper @@ -111,6 +119,8 @@ const std::string &startString, const std::string &targetString); +#ifdef MOCKPP_UNICODE + /** Asserts that a string starts with a substring. If it does not it throws * an AssertionFailedError with the given infomation. * @ingroup grp_helper @@ -125,6 +135,8 @@ const std::basic_string<wchar_t> &startString, const std::basic_string<wchar_t> &targetString); +#endif + /** Asserts that a verify() of an object fails. If it does not it throws * an AssertionFailedError. * @ingroup grp_helper Index: NotImplementedException.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/util/NotImplementedException.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- NotImplementedException.cpp 24 Mar 2005 20:51:31 -0000 1.16 +++ NotImplementedException.cpp 2 Apr 2005 13:46:38 -0000 1.17 @@ -34,7 +34,7 @@ namespace mockpp { - + MOCKPP_EXPORT NotImplementedException::NotImplementedException(unsigned srcline, const char* srcfile, Index: AssertMo.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/util/AssertMo.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- AssertMo.cpp 30 Dec 2004 20:54:06 -0000 1.17 +++ AssertMo.cpp 2 Apr 2005 13:46:34 -0000 1.18 @@ -49,6 +49,7 @@ assertTrue(srcline, srcfile, description, targetString.find(excludeString) == String::npos); } +#ifdef MOCKPP_UNICODE void MOCKPP_EXPORT assertExcludes(unsigned srcline, const char* srcfile, const String &description, @@ -58,6 +59,7 @@ assertTrue(srcline, srcfile, description, targetString.find(excludeString) == String::npos); } +#endif void MOCKPP_EXPORT assertIncludes(unsigned srcline, const char* srcfile, const String &description, @@ -67,6 +69,7 @@ assertTrue(srcline, srcfile, description, targetString.find(includeString) != String::npos); } +#ifdef MOCKPP_UNICODE void MOCKPP_EXPORT assertIncludes(unsigned srcline, const char* srcfile, const String &description, @@ -76,6 +79,7 @@ assertTrue(srcline, srcfile, description, targetString.find(includeString) != String::npos); } +#endif void MOCKPP_EXPORT assertStartsWith(unsigned srcline, const char* srcfile, const String &description, @@ -86,6 +90,7 @@ } +#ifdef MOCKPP_UNICODE void MOCKPP_EXPORT assertStartsWith(unsigned srcline, const char* srcfile, const String &description, @@ -95,6 +100,7 @@ assertTrue(srcline, srcfile, description, targetString.find(startString) == 0); } +#endif void MOCKPP_EXPORT assertVerifyFails(unsigned srcline, const char* srcfile, Verifiable *aVerifiable) |
From: Ewald A. <ewa...@us...> - 2005-03-30 18:34:34
|
Update of /cvsroot/mockpp/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24798 Modified Files: mockpp.kdevelop Log Message: update Index: mockpp.kdevelop =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp.kdevelop,v retrieving revision 1.68 retrieving revision 1.69 diff -u -d -r1.68 -r1.69 --- mockpp.kdevelop 25 Mar 2005 10:13:53 -0000 1.68 +++ mockpp.kdevelop 30 Mar 2005 18:33:59 -0000 1.69 @@ -9,7 +9,7 @@ <ignoreparts/> <projectdirectory>.</projectdirectory> <absoluteprojectpath>false</absoluteprojectpath> - <description></description> + <description/> <secondaryLanguages> <language>Perl</language> <language>Bash</language> @@ -87,18 +87,18 @@ <envvars/> <configargs>--enable-unicode --enable-debug=full prefix=/tmp/install</configargs> <builddir>/home/compile/mockpp/u</builddir> - <topsourcedir></topsourcedir> - <cppflags></cppflags> - <ldflags></ldflags> + <topsourcedir/> + <cppflags/> + <ldflags/> <ccompiler>kdevgccoptions</ccompiler> <cxxcompiler>kdevgppoptions</cxxcompiler> <f77compiler>kdevg77options</f77compiler> - <ccompilerbinary></ccompilerbinary> - <cxxcompilerbinary></cxxcompilerbinary> - <f77compilerbinary></f77compilerbinary> - <cflags></cflags> + <ccompilerbinary/> + <cxxcompilerbinary/> + <f77compilerbinary/> + <cflags/> <cxxflags>-O0 -g -Wall -Wunused -pedantic</cxxflags> - <f77flags></f77flags> + <f77flags/> </unicode_debug> <intel_unicode_debug> <envvars/> @@ -139,14 +139,14 @@ <kdevdebugger> <general> <dbgshell>libtool</dbgshell> - <programargs></programargs> - <gdbpath></gdbpath> + <programargs/> + <gdbpath/> <breakonloadinglibs>true</breakonloadinglibs> <separatetty>false</separatetty> <floatingtoolbar>true</floatingtoolbar> - <configGdbScript></configGdbScript> - <runShellScript></runShellScript> - <runGdbScript></runGdbScript> + <configGdbScript/> + <runShellScript/> + <runGdbScript/> </general> <display> <staticmembers>true</staticmembers> @@ -240,7 +240,7 @@ <headerCompletionDelay>250</headerCompletionDelay> </codecompletion> <creategettersetter> - <prefixGet></prefixGet> + <prefixGet/> <prefixSet>set</prefixSet> <prefixVariable>m_,_</prefixVariable> <parameterName>theValue</parameterName> |
From: Ewald A. <ewa...@us...> - 2005-03-30 18:29:15
|
Update of /cvsroot/mockpp/mockpp/mockpp/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22449 Modified Files: Makefile.am Log Message: fix for potential problem on cywin Index: Makefile.am =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/Makefile.am,v retrieving revision 1.69 retrieving revision 1.70 diff -u -d -r1.69 -r1.70 --- Makefile.am 25 Mar 2005 16:30:31 -0000 1.69 +++ Makefile.am 30 Mar 2005 18:28:45 -0000 1.70 @@ -101,7 +101,7 @@ echo "Store all the suppression block to $(srcdir)/$(VG_SUPPRESS)" #compilecheck_LDADD = $(top_builddir)/mockpp/libmockpp.la $(EA_EXTRA_LIB) \ -# $(LIBCPPUNIT) +# $(LIBCPPUNIT) -lstdc++ jmock_test_LDFLAGS = -L/opt/intel_cc_80/lib |
From: Ewald A. <ewa...@us...> - 2005-03-30 18:18:01
|
Update of /cvsroot/mockpp/mockpp/mockpp/examples/tutorial In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17391 Modified Files: Makefile.am Log Message: fix for potential problem on cywin Index: Makefile.am =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/examples/tutorial/Makefile.am,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- Makefile.am 12 Mar 2005 17:50:55 -0000 1.20 +++ Makefile.am 30 Mar 2005 18:17:30 -0000 1.21 @@ -1,6 +1,6 @@ INCLUDES = $(all_includes) -I$(top_srcdir) $(EA_EXTRA_INC) -LDADD = ../../libmockpp.la $(EA_EXTRA_LIB) $(LIBCPPUNIT) $(LIBDL) +LDADD = ../../libmockpp.la $(EA_EXTRA_LIB) $(LIBCPPUNIT) $(LIBDL) -lstdc++ AM_LDFLAGS = $(all_libraries) |
From: Ewald A. <ewa...@us...> - 2005-03-28 09:39:33
|
Update of /cvsroot/mockpp/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1807 Modified Files: ChangeLog Log Message: make methods chainable Index: ChangeLog =================================================================== RCS file: /cvsroot/mockpp/mockpp/ChangeLog,v retrieving revision 1.37 retrieving revision 1.38 diff -u -d -r1.37 -r1.38 --- ChangeLog 22 Mar 2005 20:49:05 -0000 1.37 +++ ChangeLog 28 Mar 2005 09:39:24 -0000 1.38 @@ -4,6 +4,9 @@ -------------- 2005-03-22 1.7.0: - ReturnObjectList::addObjectToReturn has a counter value + and returns a reference to itself for chaining + - project files for msvc 7.1 + - minor internal cleanups 2005-03-13 1.6.1: - added missing file to the distribution |
From: Ewald A. <ewa...@us...> - 2005-03-28 09:39:14
|
Update of /cvsroot/mockpp/mockpp/mockpp/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1731/mockpp/tests Modified Files: ReturnObjectList_test.cpp Log Message: make methods chainable Index: ReturnObjectList_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/ReturnObjectList_test.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- ReturnObjectList_test.cpp 22 Mar 2005 18:43:29 -0000 1.11 +++ ReturnObjectList_test.cpp 28 Mar 2005 09:39:05 -0000 1.12 @@ -74,10 +74,10 @@ rol.addObjectToReturn('1'); rol.addObjectToReturn('2'); - rol.addObjectToReturn(buff, buff+sizeof(buff)-1); // take care of trailing '\0'! - rol.addObjectToReturn('3'); - rol.addObjectToReturn('4'); - rol.addObjectToReturn('5', 3); + rol.addObjectToReturn(buff, buff+sizeof(buff)-1) // take care of trailing '\0'! + .addObjectToReturn('3') + .addObjectToReturn('4') + .addObjectToReturn('5', 3); CPPUNIT_ASSERT(rol.hasMoreObjects()); |
From: Ewald A. <ewa...@us...> - 2005-03-28 09:39:13
|
Update of /cvsroot/mockpp/mockpp/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1731/mockpp Modified Files: ReturnObjectList.h Log Message: make methods chainable Index: ReturnObjectList.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/ReturnObjectList.h,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- ReturnObjectList.h 22 Mar 2005 18:43:34 -0000 1.24 +++ ReturnObjectList.h 28 Mar 2005 09:39:05 -0000 1.25 @@ -84,33 +84,39 @@ /** Add a next object to the end of the list. * @param anObjectToReturn object to be added to the list + * @return reference to itself for chaining */ - void addObjectToReturn(const T &anObjectToReturn) + ReturnObjectList& addObjectToReturn(const T &anObjectToReturn) { myObjects.push_back(anObjectToReturn); + return *this; } /** Adds a series of equal next objects to the end of the list. * @param anObjectToReturn object to be added to the list * @param count the count the object is added + * @return reference to itself for chaining */ - void addObjectToReturn(const T &anObjectToReturn, unsigned count) + ReturnObjectList& addObjectToReturn(const T &anObjectToReturn, unsigned count) { for (unsigned i = 0; i < count; ++i) addObjectToReturn(anObjectToReturn); + return *this; } /** Add a sequence of next objects to the end of the list. * @param items start iterator * @param end terminating iterator (note: one element "behind" as always with STL) + * @return reference to itself for chaining */ template <class I> - void addObjectToReturn(I items, I end) + ReturnObjectList& addObjectToReturn(I items, I end) { for ( /* -- */; items != end; ++items) addObjectToReturn(*items); + return *this; } |
From: Ewald A. <ewa...@us...> - 2005-03-26 20:11:42
|
Update of /cvsroot/mockpp/mockpp/mockpp/chaining In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3726 Modified Files: mockpp_pti.h Log Message: documentation Index: mockpp_pti.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/mockpp_pti.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- mockpp_pti.h 25 Mar 2005 17:20:33 -0000 1.4 +++ mockpp_pti.h 26 Mar 2005 20:11:33 -0000 1.5 @@ -1,5 +1,5 @@ /** @file - @brief Support for compiler with weak template capabilities + @brief Support for compilers with weak template capabilities $Id$ @@ -71,6 +71,11 @@ #endif +/** @def MOCKPP_PTI_IMPLEMENT_BASICS + * Instantiate basic methods for compilers with + * weak template support. + */ + /** @def MOCKPP_PTI_IMPLEMENT * Instantiate specialized methods for compilers with * weak template support. |
From: Ewald A. <ewa...@us...> - 2005-03-25 18:47:46
|
Update of /cvsroot/mockpp/mockpp/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14654/mockpp Modified Files: mockpp.cpp Log Message: msvc6 fixes Index: mockpp.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/mockpp.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- mockpp.cpp 29 Jan 2005 11:12:36 -0000 1.18 +++ mockpp.cpp 25 Mar 2005 18:47:36 -0000 1.19 @@ -48,7 +48,11 @@ num = s.substr(0, pos); if (num.length() == 0) good = false; - major = std::atoi(num.c_str()); +#ifdef _MSC_VER_60_70 + major = atoi(num.c_str()); +#else + major = std::atoi(num.c_str()); +#endif s.erase(0, pos+1); unsigned pos = s.find('.'); @@ -57,12 +61,20 @@ num = s.substr(0, pos); if (num.length() == 0) good = false; - minor = std::atoi(num.c_str()); +#ifdef _MSC_VER_60_70 + minor = atoi(num.c_str()); +#else + minor = std::atoi(num.c_str()); +#endif s.erase(0, pos+1); if (s.length() == 0) good = false; - patch = std::atoi(s.c_str()); +#ifdef _MSC_VER_60_70 + patch = atoi(s.c_str()); +#else + patch = std::atoi(s.c_str()); +#endif } else good = false; |
From: Ewald A. <ewa...@us...> - 2005-03-25 18:47:12
|
Update of /cvsroot/mockpp/mockpp/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14378/mockpp Modified Files: mockpp.h Log Message: msvc6 fixes Index: mockpp.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/mockpp.h,v retrieving revision 1.47 retrieving revision 1.48 diff -u -d -r1.47 -r1.48 --- mockpp.h 24 Mar 2005 21:43:06 -0000 1.47 +++ mockpp.h 25 Mar 2005 18:46:56 -0000 1.48 @@ -84,23 +84,36 @@ #include <typeinfo> # ifdef _MSC_VER -// Compilation Warning remover, used to skip some STL compilation warnings +// Compilation Warning remover +// needed to prevent MSVC6 complain about itself :-/ # pragma warning (disable:4786) // this warning occurs when VC6 truncate a debug symbol which is longer than 255 chars. # pragma warning (disable:4251) // this warning occurs when a class member doesn't have a dll-interface. # pragma warning (disable:4180) # pragma warning (disable:4355) -# pragma warning (disable:4512) -# pragma warning (disable:4100) +# pragma warning (disable:4512) +# pragma warning (disable:4511) +# pragma warning (disable:4018) +# pragma warning (disable:4100) +# pragma warning (disable:4663) +# pragma warning (disable:4146) +# pragma warning (disable:4244) # endif // _MSC_VER - -#if defined(_MSC_VER) && (_MSC_VER < 1300) -# include <mockpp/mockpp_config-msvc_60_70.h> -#elif defined(_MSC_VER) -# include <mockpp/mockpp_config-msvc_71.h> + + +#if defined(_MSC_VER) +# if _MSC_VER <= 1200 +# define _MSC_VER_60_70 1 +# include <mockpp/mockpp_config-msvc_60_70.h> +# else defined(_MSC_VER) +# include <mockpp/mockpp_config-msvc_71.h> +# endif + #elif defined(__BORLANDC__) # include <mockpp/mockpp_config-bcb5.h> + #elif defined(__CYGWIN__) # include <mockpp/mockpp_config-cygwin.h> + #else # ifdef HAVE_CONFIG_H # include <config.h> @@ -111,7 +124,7 @@ #include <string> -#ifdef HAVE_LIMITS +#ifdef HAVE_LIMITS # include <limits> // current #else # ifdef HAVE_VALUES_H @@ -121,19 +134,20 @@ # endif #endif +/** @def MOCKPP_UNLIMITED + * Value representing an @p unlimited number. + */ + #ifdef HAVE_LIMITS # define MOCKPP_UNLIMITED (std::numeric_limits<unsigned>::max()) #else # define MOCKPP_UNLIMITED (UINT_MAX) #endif -/** @def MOCKPP_UNLIMITED - * Value representing an @p unlimited number. - */ - + #ifdef __BORLANDC__ # define MOCKPP_FUNC_MACRO __FUNC__ #elif defined(_MSC_VER) -# if _MSC_VER <= 1200 +# if _MSC_VER <= 1200 # define MOCKPP_FUNC_MACRO (std::string(__FILE__) + "_" + mockpp::getLatin1(mockpp::number((long unsigned)__LINE__))) // needs #include <mockpp/compat/Formatter.h> # else # define MOCKPP_FUNC_MACRO __FUNCSIG__ @@ -183,7 +197,7 @@ # endif -# if defined (_MSC_VER) +# ifdef _MSC_VER // DLL // EXPORT # if defined(MOCKPP_MAKING_DLL) || defined(MOCKPP_EXPORTS) |