mockpp-commits Mailing List for Mock Objects for C++ (Page 42)
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-03 21:50:06
|
Update of /cvsroot/mockpp/mockpp/mockpp/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29266/mockpp/tests Modified Files: AbstractDynamicChainingMock_test.cpp mockpp_pti_test.cpp Log Message: more efforts for msvc6 Index: AbstractDynamicChainingMock_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/AbstractDynamicChainingMock_test.cpp,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- AbstractDynamicChainingMock_test.cpp 3 Apr 2005 18:32:53 -0000 1.28 +++ AbstractDynamicChainingMock_test.cpp 3 Apr 2005 21:49:58 -0000 1.29 @@ -41,44 +41,22 @@ #include <mockpp/chaining/FIFOInvocationDispatcher.h> #include <mockpp/chaining/mockpp_pti.h> -#include <mockpp/stub/ReturnStub.h> -#include <mockpp/stub/TypelessStub.h> +#include <mockpp/stub/ReturnStub.h> +#include <mockpp/stub/TypelessStub.h> #include <mockpp/chaining/ChainingMockObjectSupport.h> #include <cppunit/extensions/HelperMacros.h> - -typedef mockpp::Invocation0 GetterInvocation; -typedef mockpp::Invocation0 VoidInvocation; -typedef mockpp::ConstraintSet1<int> CSet1; - - - -MOCKPP_INVOCATIONMOCKER_PTI_IMPL(VoidInvocation) - - -#define I VoidInvocation - - -namespace mockpp { -template<> -class TypelessStubAdapter<void, VoidInvocation > : public TypelessStubAdapterBase<void, VoidInvocation > -{ - - TypelessStubAdapter<void, I >(TypelessStub<void>::AP tm, bool in_delete) - : TypelessStubAdapterBase<void, I >(tm, in_delete) - {} - - void invoke( const I &invocation) - { - this->stubber->typelessInvoke(); - } - -}; -} - - + +typedef mockpp::Invocation0 GetterInvocation; +typedef mockpp::Invocation0 VoidInvocation; +typedef mockpp::ConstraintSet1<int> CSet1; + + +MOCKPP_INVOCATIONMOCKER_PTI_IMPL(VoidInvocation) + + namespace { @@ -231,7 +209,7 @@ }; - + void AbstractDynamicChainingMock_test::test_describer() { #if !defined(__BORLANDC__) && ((__GNUC__ >= 3) /* || defined(_MSC_VER) */) // @todo make compiling @@ -263,7 +241,7 @@ void AbstractDynamicChainingMock_test::test_void_describe() -{ +{ mockpp::AbstractDynamicChainingMock<void, VoidInvocation> adc_default ( MOCKPP_PCHAR( "adc-name" ), 0 ); @@ -271,7 +249,7 @@ adc ( new mockpp::LIFOInvocationDispatcher<void, VoidInvocation>, MOCKPP_PCHAR( "adc-name" ), 0 ); CPPUNIT_ASSERT( adc.toString() == MOCKPP_PCHAR( "adc-name" ) ); - CPPUNIT_ASSERT( adc.getMockName() == MOCKPP_PCHAR( "adc-name" ) ); + CPPUNIT_ASSERT( adc.getMockName() == MOCKPP_PCHAR( "adc-name" ) ); } @@ -379,7 +357,7 @@ void AbstractDynamicChainingMock_test::test_void_invocation() -{ +{ ChainingMockDummy<void, VoidInvocation> cmd ( new mockpp::LIFOInvocationDispatcher<void, VoidInvocation>, MOCKPP_PCHAR( "adc-name" ), 0 ); @@ -429,7 +407,7 @@ } cmd.reset(); - cmd.void_invoke(inv); + cmd.void_invoke(inv); } Index: mockpp_pti_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/mockpp_pti_test.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- mockpp_pti_test.cpp 3 Apr 2005 19:11:26 -0000 1.1 +++ mockpp_pti_test.cpp 3 Apr 2005 21:49:58 -0000 1.2 @@ -27,6 +27,10 @@ * ***************************************************************************/ +#ifndef MOCKPP_PTI_WEAKNESS // Partial Template Instantiation Weakness +#define MOCKPP_PTI_WEAKNESS +#endif + #include <mockpp/mockpp.h> // always first #ifndef HAVE_CPPUNIT @@ -36,32 +40,245 @@ #else #include <mockpp/chaining/mockpp_pti.h> +#include <mockpp/chaining/Invocation.h> + +#include <mockpp/matcher/InvokeOnceMatcher.h> #include <cppunit/extensions/HelperMacros.h> +typedef mockpp::Invocation1<int> Setter1Invocation; + +//MOCKPP_LIFOINVOCATIONDISPATCHER_PTI_IMPL(Setter1Invocation) +MOCKPP_COREMOCK_PTI_IMPL(Setter1Invocation) +//MOCKPP_FIFOINVOCATIONDISPATCHER_PTI_IMPL(Setter1Invocation) +MOCKPP_TYPELESSSTUBADAPTER_PTI_IMPL(Setter1Invocation) + +namespace mockpp { +template<> +class LIFOInvocationDispatcher<void, Setter1Invocation> : public AbstractInvocationDispatcher<void, Setter1Invocation> +{ + public: + typedef AbstractInvocationDispatcher<void, Setter1Invocation>::ReverseIterator Iterator; + + void dispatch( const Setter1Invocation &invocation ) + { + Iterator it = this->invokables.rbegin(); + Iterator end = this->invokables.rend(); + for ( /**/; it != end; ++it ) + { + if ( ( *it ) ->matches( invocation ) ) + { + ( *it ) ->invoke( invocation ); + return; + } + } + + this->defaultStub->invoke( invocation ); + } +}; +} + +namespace { + class mockpp_pti_test : public CppUnit::TestFixture { public: -CPPUNIT_TEST_SUITE( mockpp_pti_test ); + CPPUNIT_TEST_SUITE( mockpp_pti_test ); - CPPUNIT_TEST(test_coremock); + CPPUNIT_TEST(test_coremock); + CPPUNIT_TEST(test_typeless); + CPPUNIT_TEST(test_lifo); + CPPUNIT_TEST(test_fifo); + CPPUNIT_TEST(test_invocation); + CPPUNIT_TEST(test_abstract); -CPPUNIT_TEST_SUITE_END(); + CPPUNIT_TEST_SUITE_END(); public: void test_coremock(); + void test_typeless(); + void test_lifo(); + void test_fifo(); + void test_invocation(); + void test_abstract(); }; CPPUNIT_TEST_SUITE_REGISTRATION(mockpp_pti_test); +class MyVoidStub : public mockpp::TypelessStub<void> +{ + public: + + bool invoked; + + MyVoidStub() + { + invoked = false; + } + + virtual void typelessInvoke( ) + { + invoked = true; + } + + virtual mockpp::String describeTo( mockpp::String &buffer ) const + { + return buffer; + } +}; + + void mockpp_pti_test::test_coremock() { + Setter1Invocation si(MOCKPP_PCHAR("Setter1Invocation"), 1); + { + MyVoidStub *mvs = new MyVoidStub; + mockpp::CoreMock<void, Setter1Invocation> cmd(MOCKPP_PCHAR("name"), 0); + cmd.setDefaultStub( mvs ); + cmd.invoke(si); + CPPUNIT_ASSERT(true == mvs->invoked); + } + + { + mockpp::CoreMock<void, Setter1Invocation> cmd(new mockpp::LIFOInvocationDispatcher<void, Setter1Invocation>, + MOCKPP_PCHAR("name"), 0); + MyVoidStub *mvs = new MyVoidStub; + cmd.setDefaultStub(mvs); + cmd.invoke(si); + CPPUNIT_ASSERT(true == mvs->invoked); + } +} + + +void mockpp_pti_test::test_typeless() +{ + Setter1Invocation si(MOCKPP_PCHAR("Setter1Invocation"), 1); + MyVoidStub *mvs = new MyVoidStub; + mockpp::TypelessStubAdapter<void, Setter1Invocation > tsa (mvs); + tsa.invoke(si); + CPPUNIT_ASSERT(true == mvs->invoked); } +class TestInvokable : public mockpp::Invokable<void, Setter1Invocation> +{ + public: + + bool invoked; + + TestInvokable() + { + invoked = false; + } + + virtual bool matches( const Setter1Invocation &/*invocation*/ ) + { + return !invoked; + } + + virtual void invoke( const Setter1Invocation &/*invocation*/ ) + { + invoked = true; + } + + virtual bool hasDescription() + { + return true; + } + + virtual mockpp::String describeTo( mockpp::String &buffer ) const + { + return buffer; + } + + virtual void reset() + { + } + + virtual void verify() + { + } +}; + + +class Lifo : public mockpp::LIFOInvocationDispatcher<void, Setter1Invocation> +{ + public: + + void myDispatch( const Setter1Invocation &invocation ) + { + dispatch(invocation); + } +}; + + +void mockpp_pti_test::test_lifo() +{ + Setter1Invocation si(MOCKPP_PCHAR("Setter1Invocation"), 1); + MyVoidStub *mvs = new MyVoidStub; + TestInvokable *ti1 = new TestInvokable; + TestInvokable *ti2 = new TestInvokable; + Lifo lifo; + lifo.setDefaultStub( mvs ); + lifo.add(ti1); + lifo.add(ti2); + lifo.myDispatch(si); + CPPUNIT_ASSERT(true == ti2->invoked); + lifo.myDispatch(si); + CPPUNIT_ASSERT(true == ti1->invoked); + lifo.myDispatch(si); + CPPUNIT_ASSERT(true == mvs->invoked); +} + + +class Fifo : public mockpp::FIFOInvocationDispatcher<void, Setter1Invocation> +{ + public: + + void myDispatch( const Setter1Invocation &invocation ) + { + dispatch(invocation); + } +}; + + +void mockpp_pti_test::test_fifo() +{ + Setter1Invocation si(MOCKPP_PCHAR("Setter1Invocation"), 1); + MyVoidStub *mvs = new MyVoidStub; + TestInvokable *ti1 = new TestInvokable; + TestInvokable *ti2 = new TestInvokable; + Fifo fifo; + fifo.setDefaultStub( mvs ); + fifo.add(ti1); + fifo.add(ti2); + fifo.myDispatch(si); + CPPUNIT_ASSERT(true == ti1->invoked); + fifo.myDispatch(si); + CPPUNIT_ASSERT(true == ti2->invoked); + fifo.myDispatch(si); + CPPUNIT_ASSERT(true == mvs->invoked); +} + + +void mockpp_pti_test::test_invocation() +{ +// MOCKPP_INVOCATIONMOCKER_PTI_IMPL(Setter1Invocation) +} + + +void mockpp_pti_test::test_abstract() +{ +// MOCKPP_ABSTRACTDYNAMICCHAININGMOCK_PTI_IMPL(Setter1Invocation) +} + + +} // ns + + #endif // HAVE_CPPUNIT |
From: Ewald A. <ewa...@us...> - 2005-04-03 21:50:06
|
Update of /cvsroot/mockpp/mockpp/mockpp/chaining In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29266/mockpp/chaining Modified Files: CoreMock.h FIFOInvocationDispatcher.h LIFOInvocationDispatcher.h mockpp_pti.h Log Message: more efforts for msvc6 Index: mockpp_pti.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/mockpp_pti.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- mockpp_pti.h 3 Apr 2005 18:32:53 -0000 1.6 +++ mockpp_pti.h 3 Apr 2005 21:49:57 -0000 1.7 @@ -30,7 +30,6 @@ #ifndef MOCKPP_PTI_H #define MOCKPP_PTI_H - #ifdef MOCKPP_PTI_WEAKNESS // Partial Template Instantiation Weakness #include <mockpp/mockpp.h> @@ -62,15 +61,9 @@ #define MOCKPP_PTI_IMPLEMENT(I) /* empty by default */ #define MOCKPP_PTI_DECLARE(I) /* empty by default */ -#define MOCKPP_PTI_IMPLEMENT_BASICS /* empty by default */ #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. Index: CoreMock.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/CoreMock.h,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- CoreMock.h 3 Apr 2005 18:32:53 -0000 1.14 +++ CoreMock.h 3 Apr 2005 21:49:57 -0000 1.15 @@ -126,44 +126,45 @@ }; -#define MOCKPP_COREMOCK_PTI_IMPL(I) -#define MOCKPP_COREMOCK_PTI_DECL(I) +#define MOCKPP_COREMOCK_PTI_IMPL(I) +#define MOCKPP_COREMOCK_PTI_DECL(I) #else // MOCKPP_PTI_WEAKNESS Partial Template Instantiation Weakness -/** Declare specialized methods for mockpp::CoreMock. - * Neccessary for compiler with weak template capabilities. + +/** Declare a specialized class for mockpp::CoreMock. + * Neccessary for compilers with weak template capabilities. */ #define MOCKPP_COREMOCK_PTI_DECL(I) \ template<> \ void mockpp::CoreMock<void, I >; - -/** Implement specialized methods for mockpp::CoreMock. - * Neccessary for compiler with weak template capabilities. + +/** Implement a specialized class for mockpp::CoreMock. + * Neccessary for compilers with weak template capabilities. */ #define MOCKPP_COREMOCK_PTI_IMPL(I) \ -namespace mockpp { \ +namespace mockpp { \ template<> \ -class CoreMock<void, I> : public AbstractDynamicChainingMock<void, I> \ -{ \ - public: \ - CoreMock<void, I>( InvocationDispatcher<void, I>::AP invocationDispatcher, \ - const String &name, \ - VerifiableList *parent) \ - : AbstractDynamicChainingMock<void, I>( invocationDispatcher, name, parent ) \ - {} \ - \ - CoreMock<void, I>( const String &name, VerifiableList *parent) \ - : AbstractDynamicChainingMock<void, I>( name, parent) \ - {} \ - \ - void mockpp::CoreMock<void, I >::invoke( const I &invocation ) \ +class CoreMock<void, I> : public AbstractDynamicChainingMock<void, I> \ +{ \ + public: \ + CoreMock<void, I>( InvocationDispatcher<void, I>::AP invocationDispatcher, \ + const String &name, \ + VerifiableList *parent) \ + : AbstractDynamicChainingMock<void, I>( invocationDispatcher, name, parent ) \ + {} \ + \ + CoreMock<void, I>( const String &name, VerifiableList *parent) \ + : AbstractDynamicChainingMock<void, I>( name, parent) \ + {} \ + \ + void invoke( const I &invocation ) \ { \ mockInvocation( invocation ); \ } \ -}; \ +}; \ } #endif Index: LIFOInvocationDispatcher.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/LIFOInvocationDispatcher.h,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- LIFOInvocationDispatcher.h 3 Apr 2005 18:32:53 -0000 1.13 +++ LIFOInvocationDispatcher.h 3 Apr 2005 21:49:57 -0000 1.14 @@ -107,40 +107,50 @@ }; -#else // MOCKPP_PTI_WEAKNESS Partial Template Instantiation Weakness +#define MOCKPP_LIFOINVOCATIONDISPATCHER_PTI_IMPL(I) +#define MOCKPP_LIFOINVOCATIONDISPATCHER_PTI_DECL(I) -#define MOCKPP_LIFOINVOCATIONDISPATCHER_PTI_IMPL(I) -#define MOCKPP_LIFOINVOCATIONDISPATCHER_PTI_DECL(I) +#else // MOCKPP_PTI_WEAKNESS Partial Template Instantiation Weakness -/** Declare specialized methods for mockpp::LIFOInvocationDispatcher. - * Neccessary for compiler with weak template capabilities. +/** Declare a specialized class for mockpp::LIFOInvocationDispatcher. + * Neccessary for compilers with weak template capabilities. */ #define MOCKPP_LIFOINVOCATIONDISPATCHER_PTI_DECL(I) \ template<> \ void mockpp::LIFOInvocationDispatcher<void, I >::dispatch( const I &invocation ); -/** Implement specialized methods for mockpp::LIFOInvocationDispatcher. - * Neccessary for compiler with weak template capabilities. + +/** Implement a specialized class for mockpp::LIFOInvocationDispatcher. + * Neccessary for compilers with weak template capabilities. */ #define MOCKPP_LIFOINVOCATIONDISPATCHER_PTI_IMPL(I) \ +namespace mockpp { \ template<> \ -void mockpp::LIFOInvocationDispatcher<void, I >::dispatch( const I &invocation ) \ +class LIFOInvocationDispatcher<void, I> : public AbstractInvocationDispatcher<void, I> \ { \ - Iterator it = this->invokables.rbegin(); \ - Iterator end = this->invokables.rend(); \ - for ( /**/; it != end; ++it ) \ + protected: \ + typedef AbstractInvocationDispatcher<void, I>::ReverseIterator Iterator; \ + \ + void dispatch( const I &invocation ) \ { \ - if ( ( *it ) ->matches( invocation ) ) \ + Iterator it = this->invokables.rbegin(); \ + Iterator end = this->invokables.rend(); \ + for ( /**/; it != end; ++it ) \ { \ - ( *it ) ->invoke( invocation ); \ - return; \ + if ( ( *it ) ->matches( invocation ) ) \ + { \ + ( *it ) ->invoke( invocation ); \ + return; \ + } \ } \ + \ + this->defaultStub->invoke( invocation ); \ } \ - \ - this->defaultStub->invoke( invocation ); \ -} \ +}; \ +} + #endif Index: FIFOInvocationDispatcher.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/FIFOInvocationDispatcher.h,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- FIFOInvocationDispatcher.h 3 Apr 2005 18:32:53 -0000 1.13 +++ FIFOInvocationDispatcher.h 3 Apr 2005 21:49:57 -0000 1.14 @@ -107,42 +107,50 @@ }; -#define MOCKPP_FIFOINVOCATIONDISPATCHER_PTI_IMPL(I) -#define MOCKPP_FIFOINVOCATIONDISPATCHER_PTI_DECL(I) +#define MOCKPP_FIFOINVOCATIONDISPATCHER_PTI_IMPL(I) +#define MOCKPP_FIFOINVOCATIONDISPATCHER_PTI_DECL(I) #else // MOCKPP_PTI_WEAKNESS Partial Template Instantiation Weakness -/** Declare specialized methods for mockpp::FIFOInvocationDispatcher. - * Neccessary for compiler with weak template capabilities. +/** Declare a specialized class for mockpp::FIFOInvocationDispatcher. + * Neccessary for compilers with weak template capabilities. */ #define MOCKPP_FIFOINVOCATIONDISPATCHER_PTI_DECL(I) \ template<> \ void mockpp::FIFOInvocationDispatcher<void, I >::dispatch( const I &invocation ); -/** Implement specialized methods for mockpp::FIFOInvocationDispatcher. - * Neccessary for compiler with weak template capabilities. + +/** Implement a specialized class for mockpp::FIFOInvocationDispatcher. + * Neccessary for compilers with weak template capabilities. */ #define MOCKPP_FIFOINVOCATIONDISPATCHER_PTI_IMPL(I) \ +namespace mockpp { \ template<> \ -void mockpp::FIFOInvocationDispatcher<void, I >::dispatch( const I &invocation ) \ +class FIFOInvocationDispatcher<void, I> : public AbstractInvocationDispatcher<void, I> \ { \ - Iterator it = this->invokables.begin(); \ - Iterator end = this->invokables.end(); \ - for ( /**/; it != end; ++it ) \ + protected: \ + typedef AbstractInvocationDispatcher<void, I>::Iterator Iterator; \ + \ + void dispatch( const I &invocation ) \ { \ - if ( ( *it ) ->matches( invocation ) ) \ + Iterator it = this->invokables.begin(); \ + Iterator end = this->invokables.end(); \ + for ( /**/; it != end; ++it ) \ { \ - ( *it ) ->invoke( invocation ); \ - return; \ + if ( ( *it ) ->matches( invocation ) ) \ + { \ + ( *it ) ->invoke( invocation ); \ + return; \ + } \ } \ + \ + this->defaultStub->invoke( invocation ); \ } \ -\ - this->defaultStub->invoke( invocation ); \ +}; \ } - #endif |
From: Ewald A. <ewa...@us...> - 2005-04-03 19:11:59
|
Update of /cvsroot/mockpp/mockpp/msvc6/mockpp/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20705/msvc6/mockpp/tests Modified Files: mock_test.dsp Log Message: new project file Index: mock_test.dsp =================================================================== RCS file: /cvsroot/mockpp/mockpp/msvc6/mockpp/tests/mock_test.dsp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- mock_test.dsp 25 Mar 2005 10:22:12 -0000 1.3 +++ mock_test.dsp 3 Apr 2005 19:11:27 -0000 1.4 @@ -7,19 +7,19 @@ CFG=mock_test - Win32 Release !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run -!MESSAGE +!MESSAGE !MESSAGE NMAKE /f "mock_test.mak". -!MESSAGE +!MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE +!MESSAGE !MESSAGE NMAKE /f "mock_test.mak" CFG="mock_test - Win32 Release" -!MESSAGE +!MESSAGE !MESSAGE Possible choices for configuration are: -!MESSAGE +!MESSAGE !MESSAGE "mock_test - Win32 Release" (based on "Win32 (x86) Console Application") !MESSAGE "mock_test - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE +!MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 @@ -41,18 +41,18 @@ # PROP Output_Dir "C:\tmp\compile\mockpp\tests\Release" # PROP Intermediate_Dir "C:\tmp\compile\mockpp\tests\Release" # PROP Target_Dir "" -# ADD BASE CPP /nologo /MD /I "../.." /I "../../.." /I "$(CPPUNIT_ROOT)/include" /W4 /O2 /Ob1 /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "CPPUNIT_DLL" /D "_MBCS" /GF /Gy /GR /Fp"C:\tmp\compile\mockpp\tests\Release/mock_test.pch" /Fo"C:\tmp\compile\mockpp\tests\Release/" /Fd"C:\tmp\compile\mockpp\tests\Release/" /c /GX -# ADD CPP /nologo /MD /I "../.." /I "../../.." /I "$(CPPUNIT_ROOT)/include" /W4 /O2 /Ob1 /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "CPPUNIT_DLL" /D "_MBCS" /GF /Gy /GR /Fp"C:\tmp\compile\mockpp\tests\Release/mock_test.pch" /Fo"C:\tmp\compile\mockpp\tests\Release/" /Fd"C:\tmp\compile\mockpp\tests\Release/" /c /GX -# ADD BASE MTL /nologo /tlb"C:\tmp\compile\mockpp\tests\Release\mock_test.tlb" /win32 -# ADD MTL /nologo /tlb"C:\tmp\compile\mockpp\tests\Release\mock_test.tlb" /win32 -# ADD BASE RSC /l 1041 /d "NDEBUG" -# ADD RSC /l 1041 /d "NDEBUG" +# ADD BASE CPP /nologo /MD /I "../.." /I "../../.." /I "$(CPPUNIT_ROOT)/include" /W4 /O2 /Ob1 /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "CPPUNIT_DLL" /D "_MBCS" /GF /Gy /GR /Fp"C:\tmp\compile\mockpp\tests\Release/mock_test.pch" /Fo"C:\tmp\compile\mockpp\tests\Release/" /Fd"C:\tmp\compile\mockpp\tests\Release/" /c /GX +# ADD CPP /nologo /MD /I "../.." /I "../../.." /I "$(CPPUNIT_ROOT)/include" /W4 /O2 /Ob1 /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "CPPUNIT_DLL" /D "_MBCS" /GF /Gy /GR /Fp"C:\tmp\compile\mockpp\tests\Release/mock_test.pch" /Fo"C:\tmp\compile\mockpp\tests\Release/" /Fd"C:\tmp\compile\mockpp\tests\Release/" /c /GX +# ADD BASE MTL /nologo /tlb"C:\tmp\compile\mockpp\tests\Release\mock_test.tlb" /win32 +# ADD MTL /nologo /tlb"C:\tmp\compile\mockpp\tests\Release\mock_test.tlb" /win32 +# ADD BASE RSC /l 1041 /d "NDEBUG" +# ADD RSC /l 1041 /d "NDEBUG" BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib mockpp.lib cppunit_dll.lib /nologo /out:"C:\tmp\compile\mockpp\tests\Release\mock_test.exe" /incremental:no /libpath:"../../lib" /libpath:"$(CPPUNIT_ROOT)/lib" /pdb:"C:\tmp\compile\mockpp\tests\Release\mock_test.pdb" /pdbtype:sept /subsystem:console /machine:ix86 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib mockpp.lib cppunit_dll.lib /nologo /out:"C:\tmp\compile\mockpp\tests\Release\mock_test.exe" /incremental:no /libpath:"../../lib" /libpath:"$(CPPUNIT_ROOT)/lib" /pdb:"C:\tmp\compile\mockpp\tests\Release\mock_test.pdb" /pdbtype:sept /subsystem:console /machine:ix86 +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib mockpp.lib cppunit_dll.lib /nologo /out:"C:\tmp\compile\mockpp\tests\Release\mock_test.exe" /incremental:no /libpath:"../../lib" /libpath:"$(CPPUNIT_ROOT)/lib" /pdb:"C:\tmp\compile\mockpp\tests\Release\mock_test.pdb" /pdbtype:sept /subsystem:console /machine:ix86 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib mockpp.lib cppunit_dll.lib /nologo /out:"C:\tmp\compile\mockpp\tests\Release\mock_test.exe" /incremental:no /libpath:"../../lib" /libpath:"$(CPPUNIT_ROOT)/lib" /pdb:"C:\tmp\compile\mockpp\tests\Release\mock_test.pdb" /pdbtype:sept /subsystem:console /machine:ix86 !ELSEIF "$(CFG)" == "mock_test - Win32 Debug" @@ -66,18 +66,18 @@ # PROP Output_Dir "C:\tmp\compile\mockpp\tests\Debug" # PROP Intermediate_Dir "C:\tmp\compile\mockpp\tests\Debug" # PROP Target_Dir "" -# ADD BASE CPP /nologo /MDd /I "../../.." /I "$(CPPUNIT_ROOT)/include" /ZI /W4 /Od /D "WIN32" /D "_CONSOLE" /D "CPPUNIT_DLL" /D "_MBCS" /GR /Fp"C:\tmp\compile\mockpp\tests\Debug/mock_test.pch" /Fo"C:\tmp\compile\mockpp\tests\Debug/" /Fd"C:\tmp\compile\mockpp\tests\Debug/" /GZ /c /GX -# ADD CPP /nologo /MDd /I "../../.." /I "$(CPPUNIT_ROOT)/include" /ZI /W4 /Od /D "WIN32" /D "_CONSOLE" /D "CPPUNIT_DLL" /D "_MBCS" /GR /Fp"C:\tmp\compile\mockpp\tests\Debug/mock_test.pch" /Fo"C:\tmp\compile\mockpp\tests\Debug/" /Fd"C:\tmp\compile\mockpp\tests\Debug/" /GZ /c /GX -# ADD BASE MTL /nologo /tlb"c:\tmp\compile\mockpp\tests\Debug\mock_test.tlb" /win32 -# ADD MTL /nologo /tlb"c:\tmp\compile\mockpp\tests\Debug\mock_test.tlb" /win32 -# ADD BASE RSC /l 1041 /d "_DEBUG" -# ADD RSC /l 1041 /d "_DEBUG" +# ADD BASE CPP /nologo /MDd /I "../../.." /I "$(CPPUNIT_ROOT)/include" /ZI /W4 /Od /D "WIN32" /D "_CONSOLE" /D "CPPUNIT_DLL" /D "_MBCS" /GR /Fp"C:\tmp\compile\mockpp\tests\Debug/mock_test.pch" /Fo"C:\tmp\compile\mockpp\tests\Debug/" /Fd"C:\tmp\compile\mockpp\tests\Debug/" /GZ /c /GX +# ADD CPP /nologo /MDd /I "../../.." /I "$(CPPUNIT_ROOT)/include" /ZI /W4 /Od /D "WIN32" /D "_CONSOLE" /D "CPPUNIT_DLL" /D "_MBCS" /GR /Fp"C:\tmp\compile\mockpp\tests\Debug/mock_test.pch" /Fo"C:\tmp\compile\mockpp\tests\Debug/" /Fd"C:\tmp\compile\mockpp\tests\Debug/" /GZ /c /GX +# ADD BASE MTL /nologo /tlb"c:\tmp\compile\mockpp\tests\Debug\mock_test.tlb" /win32 +# ADD MTL /nologo /tlb"c:\tmp\compile\mockpp\tests\Debug\mock_test.tlb" /win32 +# ADD BASE RSC /l 1041 /d "_DEBUG" +# ADD RSC /l 1041 /d "_DEBUG" BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib mockppd.lib cppunitd_dll.lib /nologo /out:"C:\tmp\compile\mockpp\tests\Debug\mock_test.exe" /incremental:yes /libpath:"../../lib" /libpath:"$(CPPUNIT_ROOT)/lib" /debug /pdb:"C:\tmp\compile\mockpp\tests\Debug\mock_test.pdb" /pdbtype:sept /subsystem:console /machine:ix86 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib mockppd.lib cppunitd_dll.lib /nologo /out:"C:\tmp\compile\mockpp\tests\Debug\mock_test.exe" /incremental:yes /libpath:"../../lib" /libpath:"$(CPPUNIT_ROOT)/lib" /debug /pdb:"C:\tmp\compile\mockpp\tests\Debug\mock_test.pdb" /pdbtype:sept /subsystem:console /machine:ix86 +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib mockppd.lib cppunitd_dll.lib /nologo /out:"C:\tmp\compile\mockpp\tests\Debug\mock_test.exe" /incremental:yes /libpath:"../../lib" /libpath:"$(CPPUNIT_ROOT)/lib" /debug /pdb:"C:\tmp\compile\mockpp\tests\Debug\mock_test.pdb" /pdbtype:sept /subsystem:console /machine:ix86 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib mockppd.lib cppunitd_dll.lib /nologo /out:"C:\tmp\compile\mockpp\tests\Debug\mock_test.exe" /incremental:yes /libpath:"../../lib" /libpath:"$(CPPUNIT_ROOT)/lib" /debug /pdb:"C:\tmp\compile\mockpp\tests\Debug\mock_test.pdb" /pdbtype:sept /subsystem:console /machine:ix86 !ENDIF @@ -366,6 +366,10 @@ # End Source File # Begin Source File +SOURCE=..\..\..\mockpp\tests\mockpp_pti_test.cpp +# End Source File +# Begin Source File + SOURCE=..\..\..\mockpp\tests\NoArgumentsMatcher_test.cpp # End Source File # Begin Source File |
From: Ewald A. <ewa...@us...> - 2005-04-03 19:11:53
|
Update of /cvsroot/mockpp/mockpp/msvc71/mockpp/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20705/msvc71/mockpp/tests Modified Files: mock_test.vcproj Log Message: new project file Index: mock_test.vcproj =================================================================== RCS file: /cvsroot/mockpp/mockpp/msvc71/mockpp/tests/mock_test.vcproj,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- mock_test.vcproj 25 Mar 2005 10:22:56 -0000 1.3 +++ mock_test.vcproj 3 Apr 2005 19:11:27 -0000 1.4 @@ -345,9 +345,12 @@ <File RelativePath="..\..\..\mockpp\tests\MockObject_test.cpp"> </File> - <File - RelativePath="..\..\..\mockpp\tests\mockpp_test.cpp"> - </File> + <File + RelativePath="..\..\..\mockpp\tests\mockpp_test.cpp"> + </File> + <File + RelativePath="..\..\..\mockpp\tests\mockpp_pti_test.cpp"> + </File> <File RelativePath="..\..\..\mockpp\tests\NoArgumentsMatcher_test.cpp"> </File> |
From: Ewald A. <ewa...@us...> - 2005-04-03 19:11:50
|
Update of /cvsroot/mockpp/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20705 Modified Files: Makefile.am Log Message: new project file Index: Makefile.am =================================================================== RCS file: /cvsroot/mockpp/mockpp/Makefile.am,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- Makefile.am 2 Apr 2005 13:46:26 -0000 1.24 +++ Makefile.am 3 Apr 2005 19:11:25 -0000 1.25 @@ -41,9 +41,10 @@ mv $(distdir)-src.tar.$(ZIPPER_EXT).tmp $(top_builddir)/$(distdir)-src.tar.$(ZIPPER_EXT) -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir) -rm $(distdir)-src.zip.asc - gpg -ba --no-use-agent $(distdir)-src.zip + gpg -ba $(distdir)-src.zip -rm $(distdir)-src.tar.$(ZIPPER_EXT).asc - gpg -ba --no-use-agent $(distdir)-src.tar.$(ZIPPER_EXT) + gpg -ba $(distdir)-src.tar.$(ZIPPER_EXT) +# --no-use-agent full-dist: doc-dist src-dist |
From: Ewald A. <ewa...@us...> - 2005-04-03 19:11:35
|
Update of /cvsroot/mockpp/mockpp/mockpp/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20705/mockpp/tests Modified Files: Makefile.am Added Files: mockpp_pti_test.cpp Log Message: new project file Index: Makefile.am =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/Makefile.am,v retrieving revision 1.71 retrieving revision 1.72 diff -u -d -r1.71 -r1.72 --- Makefile.am 2 Apr 2005 14:08:47 -0000 1.71 +++ Makefile.am 3 Apr 2005 19:11:26 -0000 1.72 @@ -48,25 +48,25 @@ cat $$list.tmp | sort >$$list jmock_test_SOURCES = And_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 \ - Or_test.cpp ReturnStub_test.cpp StringContains_test.cpp StubSequence_test.cpp \ - TestFailureStub_test.cpp ThrowStub_test.cpp VoidStub_test.cpp ChainingMockObjectSupport_test.cpp \ - CustomStub_test.cpp DefaultResultStub_test.cpp mock_test.cpp Invocation_test.cpp \ - AnyArgumentsMatcher_test.cpp InvokedRecorder_test.cpp InvokeAtLeastOnceMatcher_test.cpp \ - InvokeOnceMatcher_test.cpp InvokeCountMatcher_test.cpp InvokedAfterMatcher_test.cpp \ - TestFailureMatcher_test.cpp NoArgumentsMatcher_test.cpp ArgumentsMatcher_test.cpp \ - ConstraintSet_test.cpp ArgumentsMatchBuilder_test.cpp InvocationMockerBuilder_test.cpp \ - AbstractDynamicChainingMock_test.cpp AbstractInvocationDispatcher_test.cpp ChainingMockBuilder_test.cpp \ - CoreMock_test.cpp DynamicChainingMockError_test.cpp FIFOInvocationDispatcher_test.cpp \ - InvocationMocker_test.cpp LIFOInvocationDispatcher_test.cpp InvokeAtMostMatcher_test.cpp \ - InvokedBeforeMatcher_test.cpp StubBuilder_test.cpp MatchBuilder_test.cpp \ - InvokeAtLeastMatcher_test.cpp classes_ABCDE.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 TypelessStubSequence_test.cpp \ - StringEndsWith_test.cpp StringStartsWith_test.cpp UnlimitedMatcher_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 \ + Or_test.cpp ReturnStub_test.cpp StringContains_test.cpp StubSequence_test.cpp \ + TestFailureStub_test.cpp ThrowStub_test.cpp VoidStub_test.cpp ChainingMockObjectSupport_test.cpp \ + CustomStub_test.cpp DefaultResultStub_test.cpp mock_test.cpp Invocation_test.cpp \ + AnyArgumentsMatcher_test.cpp InvokedRecorder_test.cpp InvokeAtLeastOnceMatcher_test.cpp \ + InvokeOnceMatcher_test.cpp InvokeCountMatcher_test.cpp InvokedAfterMatcher_test.cpp \ + TestFailureMatcher_test.cpp NoArgumentsMatcher_test.cpp ArgumentsMatcher_test.cpp \ + ConstraintSet_test.cpp ArgumentsMatchBuilder_test.cpp InvocationMockerBuilder_test.cpp \ + AbstractDynamicChainingMock_test.cpp AbstractInvocationDispatcher_test.cpp ChainingMockBuilder_test.cpp \ + CoreMock_test.cpp DynamicChainingMockError_test.cpp FIFOInvocationDispatcher_test.cpp \ + InvocationMocker_test.cpp LIFOInvocationDispatcher_test.cpp InvokeAtMostMatcher_test.cpp \ + InvokedBeforeMatcher_test.cpp StubBuilder_test.cpp MatchBuilder_test.cpp \ + InvokeAtLeastMatcher_test.cpp classes_ABCDE.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 TypelessStubSequence_test.cpp \ + StringEndsWith_test.cpp StringStartsWith_test.cpp UnlimitedMatcher_test.cpp mockpp_pti_test.cpp jmock_test_count: list=jmock_test.files; \ --- NEW FILE: mockpp_pti_test.cpp --- /*************************************************************************** mockpp_pti_test.cpp - unit tests for pti weakness functions ------------------- begin : Sun 04 03 2005 copyright : (C) 2002-2005 by Ewald Arnold email : mockpp at ewald-arnold dot de $Id: mockpp_pti_test.cpp,v 1.1 2005/04/03 19:11:26 ewald-arnold Exp $ ***************************************************************************/ /************************************************************************** * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * ***************************************************************************/ #include <mockpp/mockpp.h> // always first #ifndef HAVE_CPPUNIT # warning CppUnit not available at compile time #else #include <mockpp/chaining/mockpp_pti.h> #include <cppunit/extensions/HelperMacros.h> class mockpp_pti_test : public CppUnit::TestFixture { public: CPPUNIT_TEST_SUITE( mockpp_pti_test ); CPPUNIT_TEST(test_coremock); CPPUNIT_TEST_SUITE_END(); public: void test_coremock(); }; CPPUNIT_TEST_SUITE_REGISTRATION(mockpp_pti_test); void mockpp_pti_test::test_coremock() { } #endif // HAVE_CPPUNIT |
From: Ewald A. <ewa...@us...> - 2005-04-03 19:11:35
|
Update of /cvsroot/mockpp/mockpp/bcbX In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20705/bcbX Modified Files: jmock_test.cbx Log Message: new project file Index: jmock_test.cbx =================================================================== RCS file: /cvsroot/mockpp/mockpp/bcbX/jmock_test.cbx,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- jmock_test.cbx 22 Mar 2005 22:03:01 -0000 1.12 +++ jmock_test.cbx 3 Apr 2005 19:11:26 -0000 1.13 @@ -29,7 +29,7 @@ <property category="build.platform" name="win32.Release_Build.toolset" value="win32b"/> <property category="build.platform" name="win32.default" value="MinGW"/> <property category="build.platform" name="win32.win32b.enabled" value="1"/> - <property category="cbproject" name="lastnodeid" value="16"/> + <property category="cbproject" name="lastnodeid" value="18"/> <property category="cbproject" name="version" value="X.1.0"/> <property category="linux.Debug_Build.gnuc++.g++compile" name="option.D_MACRO_VALUE.arg.1" value="HAVE_CPPUNIT"/> <property category="linux.Debug_Build.gnuc++.g++compile" name="option.D_MACRO_VALUE.arg.merge" value="0"/> @@ -59,7 +59,7 @@ <property category="runtime.0" name="BuildTargetOnRun" value="com.borland.cbuilder.build.CBProjectBuilder$ProjectBuildAction;make"/> <property category="runtime.0" name="ConfigurationName" value="jmock_test"/> <property category="runtime.0" name="RunnableType" value="com.borland.cbuilder.runtime.ExecutableRunner"/> - <property category="unique" name="id" value="16"/> + <property category="unique" name="id" value="18"/> <property category="win32.Debug_Build.win32b.bcc32" name="option.D.arg.1" value="_DEBUG"/> <property category="win32.Debug_Build.win32b.bcc32" name="option.D.enabled" value="1"/> <property category="win32.Debug_Build.win32b.bcc32" name="option.I.arg.1" value="$(BCBX)\include"/> @@ -343,6 +343,9 @@ <file path="C%|/tmp/compilex/mockpp_25.lib"> <property category="unique" name="id" value="71"/> </file> + <file path="../mockpp/tests/mockpp_pti_test.cpp"> + <property category="unique" name="id" value="17"/> + </file> <file path="../mockpp/tests/NoArgumentsMatcher_test.cpp"> <property category="unique" name="id" value="54"/> </file> |
From: Ewald A. <ewa...@us...> - 2005-04-03 19:11:34
|
Update of /cvsroot/mockpp/mockpp/bcb5 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20705/bcb5 Modified Files: jmock_test.bpf Log Message: new project file Index: jmock_test.bpf =================================================================== RCS file: /cvsroot/mockpp/mockpp/bcb5/jmock_test.bpf,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- jmock_test.bpf 22 Mar 2005 22:02:57 -0000 1.18 +++ jmock_test.bpf 3 Apr 2005 19:11:26 -0000 1.19 @@ -67,6 +67,7 @@ USEUNIT("..\mockpp\tests\StubBuilder_test.cpp"); USEUNIT("..\mockpp\tests\TypelessStubSequence_test.cpp"); USEUNIT("..\mockpp\tests\ChainingMockObjectSupport_test.cpp"); +USEUNIT("..\mockpp\tests\mockpp_pti_test.cpp"); //--------------------------------------------------------------------------- This file is used by the project manager only and should be treated like the project file main |
From: Ewald A. <ewa...@us...> - 2005-04-03 18:33:44
|
Update of /cvsroot/mockpp/mockpp/bcb5 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9425/bcb5 Modified Files: mockpp.bpr Log Message: more efforts to make msvc6 compile Index: mockpp.bpr =================================================================== RCS file: /cvsroot/mockpp/mockpp/bcb5/mockpp.bpr,v retrieving revision 1.35 retrieving revision 1.36 diff -u -d -r1.35 -r1.36 --- mockpp.bpr 24 Mar 2005 20:51:27 -0000 1.35 +++ mockpp.bpr 3 Apr 2005 18:32:42 -0000 1.36 @@ -51,7 +51,7 @@ ibsmp50.bpi VCLDBX50.bpi TEEUI50.bpi TEEDB50.bpi TEE50.bpi TEEQR50.bpi VCLIB50.bpi bcbie50.bpi VCLIE50.bpi INETDB50.bpi INET50.bpi NMFAST50.bpi dclocx50.bpi bcb2kaxserver50.bpi"/> - <PATHCPP value=".;..\mockpp\util;..\mockpp\compat;..\mockpp\chaining;..\mockpp;..\mockpp\builder;..\mockpp\stub;..\mockpp\constraint;..\mockpp\matcher"/> + <PATHCPP value=".;"/> <PATHPAS value=".;"/> <PATHRC value=".;"/> <PATHASM value=".;"/> @@ -110,8 +110,8 @@ [HistoryLists\hlIncludePath] Count=29 -Item0=..mockpp\builder;\\SONNE\HOMES\Documents\src\mockpp\mockpp\mockpp\constraint;\\SONNE\HOMES\Documents\src\mockpp\mockpp\mockpp\builder;..\mockpp\stub;..\mockpp\matcher;..\mockpp\constraint;..\mockpp\builder;..\mockpp;..\mockpp\chaining;..\mockpp\compat;..\mockpp\util;..\..\mockpp;$(BCB)\include;..\..\..\cppunit-1.10.2\include;..\..\cppunit-1.10\include -Item1=..mockpp\builder;\\SONNE\HOMES\Documents\src\mockpp\mockpp\mockpp\constraint;\\SONNE\HOMES\Documents\src\mockpp\mockpp\mockpp\builder;..\mockpp\stub;..\mockpp\matcher;..\mockpp\constraint;..\mockpp\builder;..\mockpp;..\mockpp\chaining;..\mockpp\compat;..\mockpp\util;..;$(BCB)\include;..\..\..\cppunit-1.10.2\include;..\..\cppunit-1.10\include +Item0=..mockpp\builder;\\SONNE\HOMES\Documents\src\mockpp\mockpp\mockpp\constraint;\\SONNE\HOMES\Documents\src\mockpp\mockpp\mockpp\builder;..\mockpp\stub;..\mockpp\matcher;..\mockpp\constraint;..\mockpp\builder;..\mockpp;..\mockpp\chaining;..\mockpp\compat;..\mockpp\util;..;$(BCB)\include;..\..\..\cppunit-1.10.2\include;..\..\cppunit-1.10\include +Item1=..mockpp\builder;\\SONNE\HOMES\Documents\src\mockpp\mockpp\mockpp\constraint;\\SONNE\HOMES\Documents\src\mockpp\mockpp\mockpp\builder;..\mockpp\stub;..\mockpp\matcher;..\mockpp\constraint;..\mockpp\builder;..\mockpp;..\mockpp\chaining;..\mockpp\compat;..\mockpp\util;..\..\mockpp;$(BCB)\include;..\..\..\cppunit-1.10.2\include;..\..\cppunit-1.10\include Item2=..\mockpp\matcher;..\mockpp\constraint;..\mockpp\builder;..\mockpp;..\mockpp\chaining;..\mockpp\compat;..\mockpp\util;..;$(BCB)\include;..\..\..\cppunit-1.10.2\include;..\..\cppunit-1.10\include Item3=..\mockpp\matcher;..\mockpp\constraint;..\mockpp\builder;..\mockpp;..\mockpp\chaining;..\mockpp\compat;..\mockpp\util;..;$(BCB)\include;..\..\..\cppunit-1.10.2\include Item4=..;$(BCB)\include;..\..\..\cppunit-1.10.2\include @@ -142,8 +142,8 @@ [HistoryLists\hlLibraryPath] Count=16 -Item0=..mockpp\builder;\\SONNE\HOMES\Documents\src\mockpp\mockpp\mockpp\constraint;\\SONNE\HOMES\Documents\src\mockpp\mockpp\mockpp\builder;..\mockpp\stub;..\mockpp\matcher;..\mockpp\constraint;..\mockpp\builder;..\mockpp\chaining;..\mockpp\compat;..\mockpp\util;..\mockpp_25\matcher;..\mockpp_25\constraint;..\mockpp_25\builder;..\mockpp;..\mockpp_25\chaining;..\mockpp_25\compat;..\mockpp_25\util;..\..\mockpp;$(BCB)\lib\obj;$(BCB)\lib -Item1=..mockpp\builder;\\SONNE\HOMES\Documents\src\mockpp\mockpp\mockpp\constraint;\\SONNE\HOMES\Documents\src\mockpp\mockpp\mockpp\builder;..\mockpp\stub;..\mockpp\matcher;..\mockpp\constraint;..\mockpp\builder;..\mockpp\chaining;..\mockpp\compat;..\mockpp\util;..\mockpp_25\matcher;..\mockpp_25\constraint;..\mockpp_25\builder;..\mockpp;..\mockpp_25\chaining;..\mockpp_25\compat;..\mockpp_25\util;..;$(BCB)\lib\obj;$(BCB)\lib +Item0=..mockpp\builder;\\SONNE\HOMES\Documents\src\mockpp\mockpp\mockpp\constraint;\\SONNE\HOMES\Documents\src\mockpp\mockpp\mockpp\builder;..\mockpp\stub;..\mockpp\matcher;..\mockpp\constraint;..\mockpp\builder;..\mockpp\chaining;..\mockpp\compat;..\mockpp\util;..\mockpp_25\matcher;..\mockpp_25\constraint;..\mockpp_25\builder;..\mockpp;..\mockpp_25\chaining;..\mockpp_25\compat;..\mockpp_25\util;..;$(BCB)\lib\obj;$(BCB)\lib +Item1=..mockpp\builder;\\SONNE\HOMES\Documents\src\mockpp\mockpp\mockpp\constraint;\\SONNE\HOMES\Documents\src\mockpp\mockpp\mockpp\builder;..\mockpp\stub;..\mockpp\matcher;..\mockpp\constraint;..\mockpp\builder;..\mockpp\chaining;..\mockpp\compat;..\mockpp\util;..\mockpp_25\matcher;..\mockpp_25\constraint;..\mockpp_25\builder;..\mockpp;..\mockpp_25\chaining;..\mockpp_25\compat;..\mockpp_25\util;..\..\mockpp;$(BCB)\lib\obj;$(BCB)\lib Item2=..\mockpp\matcher;..\mockpp\constraint;..\mockpp\builder;..\mockpp\chaining;..\mockpp\compat;..\mockpp\util;..\mockpp_25\matcher;..\mockpp_25\constraint;..\mockpp_25\builder;..\mockpp;..\mockpp_25\chaining;..\mockpp_25\compat;..\mockpp_25\util;..;$(BCB)\lib\obj;$(BCB)\lib Item3=..\mockpp\matcher;..\mockpp\constraint;..\mockpp\builder;..\mockpp\chaining;..\mockpp\compat;..\mockpp\util;..\mockpp_25\matcher;..\mockpp_25\constraint;..\mockpp_25\builder;..\mockpp;..\mockpp_25\chaining;..\mockpp_25\compat;..\mockpp_25\util;..\..\mockpp;$(BCB)\lib\obj;$(BCB)\lib Item4=..;$(BCB)\lib\obj;$(BCB)\lib |
From: Ewald A. <ewa...@us...> - 2005-04-03 18:33:44
|
Update of /cvsroot/mockpp/mockpp/mockpp/builder In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9425/mockpp/builder Modified Files: InvocationMockerBuilder.h Log Message: more efforts to make msvc6 compile Index: InvocationMockerBuilder.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/builder/InvocationMockerBuilder.h,v retrieving revision 1.35 retrieving revision 1.36 diff -u -d -r1.35 -r1.36 --- InvocationMockerBuilder.h 2 Apr 2005 20:45:29 -0000 1.35 +++ InvocationMockerBuilder.h 3 Apr 2005 18:32:45 -0000 1.36 @@ -113,15 +113,25 @@ protected: - /** Indicate a matcher for a set of arguments. - * @param constraintset constraint set - * @return the builder object - */ - virtual MatchBuilder<R, I> &with_cs( const CS &constraintset ) - { - return addMatcher( new ArgumentsMatcher<I>( constraintset ) ); - } - + /** Indicate a matcher for a set of arguments. + * @param constraintset constraint set + * @return the builder object + */ + virtual MatchBuilder<R, I> &with_cs( const CS &constraintset ) + { + return internalWith_cs( constraintset); + } + + /** Indicate a matcher for a set of arguments. + * Needed for compilers that can't invoke \c InvocationMockerBuilder<>::with_cs() directly. + * @param constraintset constraint set + * @return the builder object + */ + virtual MatchBuilder<R, I> &internalWith_cs( const CS &constraintset ) + { + return addMatcher( new ArgumentsMatcher<I>( constraintset ) ); + } + /** Gets the builder namespace. * @return pointer to builder namspace */ |
From: Ewald A. <ewa...@us...> - 2005-04-03 18:33:44
|
Update of /cvsroot/mockpp/mockpp/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9425/mockpp Modified Files: Makefile.am VerifyingTestCaller.h mockpp.h Log Message: more efforts to make msvc6 compile Index: mockpp.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/mockpp.h,v retrieving revision 1.50 retrieving revision 1.51 diff -u -d -r1.50 -r1.51 --- mockpp.h 2 Apr 2005 20:45:29 -0000 1.50 +++ mockpp.h 3 Apr 2005 18:32:45 -0000 1.51 @@ -104,7 +104,7 @@ # endif // _MSC_VER -#if defined(_MSC_VER) +#ifdef _MSC_VER # if _MSC_VER <= 1300 # define _MSC_VER_60_70 # include <mockpp/mockpp_config-msvc_60_70.h> Index: VerifyingTestCaller.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/VerifyingTestCaller.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- VerifyingTestCaller.h 11 Mar 2005 00:24:54 -0000 1.8 +++ VerifyingTestCaller.h 3 Apr 2005 18:32:45 -0000 1.9 @@ -50,7 +50,7 @@ * @ingroup grp_advanced_mo */ template <typename VerifyingFixtureType, bool DoTheVerify> -class VerifyingTestCaller : public CppUnit::TestCaller<VerifyingFixtureType> +class VerifyingTestCaller : public ::CppUnit::TestCaller<VerifyingFixtureType> { typedef void (VerifyingFixtureType::*TestCaseMethod)(); @@ -67,7 +67,7 @@ VerifyingTestCaller(const std::string &name, TestCaseMethod test, VerifyingFixtureType& fixture) - : CppUnit::TestCaller<VerifyingFixtureType>(name, test, fixture) + : ::CppUnit::TestCaller<VerifyingFixtureType>(name, test, fixture) , testcase(&fixture) { } @@ -83,7 +83,7 @@ VerifyingTestCaller(const std::string &name, TestCaseMethod test, VerifyingFixtureType* fixture) - : CppUnit::TestCaller<VerifyingFixtureType>(name, test, fixture) + : ::CppUnit::TestCaller<VerifyingFixtureType>(name, test, fixture) , testcase(fixture) { } @@ -95,7 +95,7 @@ testcase->unregisterVerifiables(); try { - CppUnit::TestCaller<VerifyingFixtureType>::runTest(); + ::CppUnit::TestCaller<VerifyingFixtureType>::runTest(); bool doVerify = DoTheVerify; if (doVerify) testcase->verify(); @@ -170,7 +170,7 @@ */ #define MOCKPP_VERIFYING_TEST_EXCEPTION( testMethod, ExceptionType ) \ CPPUNIT_TEST_SUITE_ADD_TEST( \ - (new CppUnit::ExceptionTestCaseDecorator< ExceptionType >( \ + (new ::CppUnit::ExceptionTestCaseDecorator< ExceptionType >( \ new mockpp::VerifyingTestCaller< TestFixtureType, true >( \ context.getTestNameFor( #testMethod ), \ &TestFixtureType::testMethod, \ @@ -187,7 +187,7 @@ */ #define MOCKPP_TEST_EXCEPTION( testMethod, ExceptionType ) \ CPPUNIT_TEST_SUITE_ADD_TEST( \ - (new CppUnit::ExceptionTestCaseDecorator< ExceptionType >( \ + (new ::CppUnit::ExceptionTestCaseDecorator< ExceptionType >( \ new mockpp::VerifyingTestCaller< TestFixtureType, false >( \ context.getTestNameFor( #testMethod ), \ &TestFixtureType::testMethod, \ Index: Makefile.am =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/Makefile.am,v retrieving revision 1.77 retrieving revision 1.78 diff -u -d -r1.77 -r1.78 --- Makefile.am 2 Apr 2005 20:52:08 -0000 1.77 +++ Makefile.am 3 Apr 2005 18:32:43 -0000 1.78 @@ -148,7 +148,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) @@ -191,7 +191,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) @@ -237,7 +237,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) |
Update of /cvsroot/mockpp/mockpp/mockpp/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9425/mockpp/tests Modified Files: AbstractDynamicChainingMock_test.cpp ChainableMockObject_1_void_test.cpp ChainableMockObject_2_void_test.cpp ChainableMockObject_3_void_test.cpp ChainableMockObject_4_void_test.cpp ChainableMockObject_5_void_test.cpp ChainingMockObjectSupport_test.cpp CoreMock_test.cpp InvocationMockerBuilder_test.cpp InvocationMocker_test.cpp MixedMockObject_5_test.cpp StringContains_test.cpp StringEndsWith_test.cpp StringStartsWith_test.cpp StubBuilder_test.cpp Verifiable_test.cpp mock_test.cpp Log Message: more efforts to make msvc6 compile Index: ChainableMockObject_5_void_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/ChainableMockObject_5_void_test.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- ChainableMockObject_5_void_test.cpp 25 Mar 2005 17:20:35 -0000 1.9 +++ ChainableMockObject_5_void_test.cpp 3 Apr 2005 18:32:54 -0000 1.10 @@ -73,9 +73,10 @@ typedef mockpp::Invocation5<unsigned, unsigned, unsigned, unsigned, unsigned> mockpp_Invocation5_unsigned_unsigned_unsigned_unsigned_unsigned; -MOCKPP_PTI_DECLARE(mockpp_Invocation5_unsigned_unsigned_unsigned_unsigned_unsigned) - - + +MOCKPP_PTI_IMPLEMENT(mockpp_Invocation5_unsigned_unsigned_unsigned_unsigned_unsigned) + + class MyChainableMockObject_5_void_Interface { public: @@ -369,7 +370,4 @@ } -MOCKPP_PTI_IMPLEMENT(mockpp_Invocation5_unsigned_unsigned_unsigned_unsigned_unsigned) - - #endif // HAVE_CPPUNIT Index: StringStartsWith_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/StringStartsWith_test.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- StringStartsWith_test.cpp 5 Jan 2005 19:30:06 -0000 1.1 +++ StringStartsWith_test.cpp 3 Apr 2005 18:32:54 -0000 1.2 @@ -64,8 +64,8 @@ { mockpp::StringStartsWith<std::string> mystr ("the-string"); mockpp::String s = MOCKPP_PCHAR("mystr?"); - CPPUNIT_ASSERT(mystr.describeTo(s) == MOCKPP_PCHAR("mystr?a string starting with \"the-string\"")); - CPPUNIT_ASSERT(s == MOCKPP_PCHAR("mystr?a string starting with \"the-string\"")); + CPPUNIT_ASSERT(mystr.describeTo(s) == MOCKPP_GET_STRING("mystr?a string starting with \"the-string")+MOCKPP_CHAR('\"')); + CPPUNIT_ASSERT(s == MOCKPP_GET_STRING("mystr?a string starting with \"the-string")+MOCKPP_CHAR('\"')); } Index: mock_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/mock_test.cpp,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- mock_test.cpp 2 Apr 2005 20:45:33 -0000 1.22 +++ mock_test.cpp 3 Apr 2005 18:32:54 -0000 1.23 @@ -43,7 +43,7 @@ # include <cppunit/CompilerOutputter.h> -#ifndef MSC_VER +#ifndef _MSC_VER using std::time; using std::time_t; #endif Index: ChainableMockObject_4_void_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/ChainableMockObject_4_void_test.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- ChainableMockObject_4_void_test.cpp 25 Mar 2005 17:20:35 -0000 1.7 +++ ChainableMockObject_4_void_test.cpp 3 Apr 2005 18:32:54 -0000 1.8 @@ -67,9 +67,10 @@ typedef mockpp::Invocation4<unsigned, unsigned, unsigned, unsigned> mockpp_Invocation4_unsigned_unsigned_unsigned_unsigned; -MOCKPP_PTI_DECLARE(mockpp_Invocation4_unsigned_unsigned_unsigned_unsigned) - - + +MOCKPP_PTI_IMPLEMENT(mockpp_Invocation4_unsigned_unsigned_unsigned_unsigned) + + class MyChainableMockObject_4_void : public mockpp::ChainableMockObject { public: @@ -151,7 +152,4 @@ } -MOCKPP_PTI_IMPLEMENT(mockpp_Invocation4_unsigned_unsigned_unsigned_unsigned) - - #endif // HAVE_CPPUNIT Index: InvocationMockerBuilder_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/InvocationMockerBuilder_test.cpp,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- InvocationMockerBuilder_test.cpp 2 Apr 2005 20:45:32 -0000 1.26 +++ InvocationMockerBuilder_test.cpp 3 Apr 2005 18:32:54 -0000 1.27 @@ -40,6 +40,8 @@ #include <mockpp/matcher/InvokeCountMatcher.h> +#include <mockpp/chaining/mockpp_pti.h> + #include <mockpp/stub/ReturnStub.h> #include <mockpp/stub/StubHolder.h> @@ -51,6 +53,12 @@ #include "MyBuilderNamespace.h" +typedef mockpp::Invocation5<CA, CB, CC, CD, CE> Getter5Invocation; +typedef mockpp::Invocation5<CA, CB, CC, CD, CE> Setter5Invocation; +typedef mockpp::Invocation0 Getter0Invocation; +typedef mockpp::Invocation0 Setter0Invocation; + + namespace { @@ -79,12 +87,6 @@ CPPUNIT_TEST_SUITE_REGISTRATION( InvocationMockerBuilder_test ); -typedef mockpp::Invocation5<CA, CB, CC, CD, CE> Getter5Invocation; -typedef mockpp::Invocation5<CA, CB, CC, CD, CE> Setter5Invocation; -typedef mockpp::Invocation0 Getter0Invocation; -typedef mockpp::Invocation0 Setter0Invocation; - - template <typename AMB> // ArgumentsMatchBuilder class InvocationMockerBuilderDummy : public mockpp::InvocationMockerBuilder<AMB> { @@ -102,7 +104,7 @@ #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); + return internalWith_cs(constraintset); } #else using mockpp::InvocationMockerBuilder<AMB>::with_cs; Index: StringContains_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/StringContains_test.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- StringContains_test.cpp 30 Dec 2004 20:54:06 -0000 1.8 +++ StringContains_test.cpp 3 Apr 2005 18:32:54 -0000 1.9 @@ -64,8 +64,8 @@ { mockpp::StringContains<std::string> mystr ("the-string"); mockpp::String s = MOCKPP_PCHAR("mystr?"); - CPPUNIT_ASSERT(mystr.describeTo(s) == MOCKPP_PCHAR("mystr?a string containing \"the-string\"")); - CPPUNIT_ASSERT(s == MOCKPP_PCHAR("mystr?a string containing \"the-string\"")); + CPPUNIT_ASSERT(mystr.describeTo(s) == MOCKPP_GET_STRING("mystr?a string containing \"the-string")+MOCKPP_CHAR('\"')); + CPPUNIT_ASSERT(s == MOCKPP_GET_STRING("mystr?a string containing \"the-string")+MOCKPP_CHAR('\"')); } Index: AbstractDynamicChainingMock_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/AbstractDynamicChainingMock_test.cpp,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- AbstractDynamicChainingMock_test.cpp 2 Apr 2005 20:45:32 -0000 1.27 +++ AbstractDynamicChainingMock_test.cpp 3 Apr 2005 18:32:53 -0000 1.28 @@ -41,13 +41,44 @@ #include <mockpp/chaining/FIFOInvocationDispatcher.h> #include <mockpp/chaining/mockpp_pti.h> -#include <mockpp/stub/ReturnStub.h> +#include <mockpp/stub/ReturnStub.h> +#include <mockpp/stub/TypelessStub.h> #include <mockpp/chaining/ChainingMockObjectSupport.h> #include <cppunit/extensions/HelperMacros.h> - + +typedef mockpp::Invocation0 GetterInvocation; +typedef mockpp::Invocation0 VoidInvocation; +typedef mockpp::ConstraintSet1<int> CSet1; + + + +MOCKPP_INVOCATIONMOCKER_PTI_IMPL(VoidInvocation) + + +#define I VoidInvocation + + +namespace mockpp { +template<> +class TypelessStubAdapter<void, VoidInvocation > : public TypelessStubAdapterBase<void, VoidInvocation > +{ + + TypelessStubAdapter<void, I >(TypelessStub<void>::AP tm, bool in_delete) + : TypelessStubAdapterBase<void, I >(tm, in_delete) + {} + + void invoke( const I &invocation) + { + this->stubber->typelessInvoke(); + } + +}; +} + + namespace { @@ -80,7 +111,6 @@ CPPUNIT_TEST_SUITE_REGISTRATION( AbstractDynamicChainingMock_test ); - template <typename R, // Returntype typename I> // Invocation class ChainingMockDummy : public mockpp::AbstractDynamicChainingMock<R, I> @@ -201,22 +231,10 @@ }; -class InvocationDummy -{ - public: - - typedef void ( InvocationDummy::*SetterPMF ) (); - typedef int ( InvocationDummy::*GetterPMF ) (); -}; - -typedef mockpp::Invocation0 GetterInvocation; -typedef mockpp::Invocation0 VoidInvocation; -typedef mockpp::ConstraintSet1<int> CSet1; - - + void AbstractDynamicChainingMock_test::test_describer() { -#if !defined(__BORLANDC__) && ((__GNUC__ >= 3) || defined(_MSC_VER)) // @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); @@ -245,7 +263,7 @@ void AbstractDynamicChainingMock_test::test_void_describe() -{ +{ mockpp::AbstractDynamicChainingMock<void, VoidInvocation> adc_default ( MOCKPP_PCHAR( "adc-name" ), 0 ); @@ -253,7 +271,7 @@ adc ( new mockpp::LIFOInvocationDispatcher<void, VoidInvocation>, MOCKPP_PCHAR( "adc-name" ), 0 ); CPPUNIT_ASSERT( adc.toString() == MOCKPP_PCHAR( "adc-name" ) ); - CPPUNIT_ASSERT( adc.getMockName() == MOCKPP_PCHAR( "adc-name" ) ); + CPPUNIT_ASSERT( adc.getMockName() == MOCKPP_PCHAR( "adc-name" ) ); } @@ -290,7 +308,7 @@ ChainingMockDummy<int, GetterInvocation> cmd ( new mockpp::LIFOInvocationDispatcher<int, GetterInvocation>, MOCKPP_PCHAR( "adc-name" ), 0 ); - GetterInvocation inv(MOCKPP_PCHAR("InvocationDummy::getProp")); + GetterInvocation inv(MOCKPP_PCHAR("GetterInvocation")); MatcherDummy<GetterInvocation> *md1 = new MatcherDummy<GetterInvocation>; md1->invocation_result = 10; @@ -361,11 +379,11 @@ void AbstractDynamicChainingMock_test::test_void_invocation() -{ +{ ChainingMockDummy<void, VoidInvocation> cmd ( new mockpp::LIFOInvocationDispatcher<void, VoidInvocation>, MOCKPP_PCHAR( "adc-name" ), 0 ); - VoidInvocation inv(MOCKPP_PCHAR("InvocationDummy::setProp")); + VoidInvocation inv(MOCKPP_PCHAR("VoidInvocation")); VoidMatcherDummy<VoidInvocation> *md1 = new VoidMatcherDummy<VoidInvocation>; md1->enable_except = false; @@ -411,7 +429,7 @@ } cmd.reset(); - cmd.void_invoke(inv); + cmd.void_invoke(inv); } Index: Verifiable_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/Verifiable_test.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- Verifiable_test.cpp 27 Feb 2005 11:48:16 -0000 1.20 +++ Verifiable_test.cpp 3 Apr 2005 18:32:54 -0000 1.21 @@ -154,18 +154,18 @@ void addVerifiable(mockpp::Verifiable *vf) { #ifdef _MSC_VER - return VerifiableList::addVerifiable(vf); + VerifiableList::addVerifiable(vf); #else - return mockpp::VerifiableList::addVerifiable(vf); + mockpp::VerifiableList::addVerifiable(vf); #endif } void removeVerifiable(mockpp::Verifiable *vf) { #ifdef _MSC_VER - return VerifiableList::removeVerifiable(vf); + VerifiableList::removeVerifiable(vf); #else - return mockpp::VerifiableList::removeVerifiable(vf); + mockpp::VerifiableList::removeVerifiable(vf); #endif } }; Index: StringEndsWith_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/StringEndsWith_test.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- StringEndsWith_test.cpp 5 Jan 2005 19:30:06 -0000 1.1 +++ StringEndsWith_test.cpp 3 Apr 2005 18:32:54 -0000 1.2 @@ -64,8 +64,8 @@ { mockpp::StringEndsWith<std::string> mystr ("the-string"); mockpp::String s = MOCKPP_PCHAR("mystr?"); - CPPUNIT_ASSERT(mystr.describeTo(s) == MOCKPP_PCHAR("mystr?a string ending with \"the-string\"")); - CPPUNIT_ASSERT(s == MOCKPP_PCHAR("mystr?a string ending with \"the-string\"")); + CPPUNIT_ASSERT(mystr.describeTo(s) == MOCKPP_GET_STRING("mystr?a string ending with \"the-string")+MOCKPP_CHAR('\"')); + CPPUNIT_ASSERT(s == MOCKPP_GET_STRING("mystr?a string ending with \"the-string")+MOCKPP_CHAR('\"')); } Index: InvocationMocker_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/InvocationMocker_test.cpp,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- InvocationMocker_test.cpp 2 Apr 2005 20:45:33 -0000 1.31 +++ InvocationMocker_test.cpp 3 Apr 2005 18:32:54 -0000 1.32 @@ -48,6 +48,13 @@ #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 { @@ -164,10 +171,6 @@ }; -typedef mockpp::Invocation5<CA, CB, CC, CD, CE> SetterInvocation; -typedef mockpp::Invocation5<CA, CB, CC, CD, CE> GetterInvocation; - - void InvocationMocker_test::test_instance() { mockpp::InvocationMocker<int, GetterInvocation> im; @@ -176,14 +179,6 @@ } -} // namespace - - -MOCKPP_PTI_DECLARE(SetterInvocation) - - -namespace { - void InvocationMocker_test::test_instance_void() { Index: MixedMockObject_5_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/MixedMockObject_5_test.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- MixedMockObject_5_test.cpp 24 Mar 2005 21:43:07 -0000 1.3 +++ MixedMockObject_5_test.cpp 3 Apr 2005 18:32:54 -0000 1.4 @@ -49,6 +49,7 @@ #include "classes_ABCDE.h" #include <cppunit/extensions/HelperMacros.h> + class MixedMockObject_5_test : public CppUnit::TestFixture { Index: ChainableMockObject_1_void_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/ChainableMockObject_1_void_test.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- ChainableMockObject_1_void_test.cpp 25 Mar 2005 17:20:35 -0000 1.7 +++ ChainableMockObject_1_void_test.cpp 3 Apr 2005 18:32:53 -0000 1.8 @@ -61,13 +61,15 @@ void test_parameter_1(); }; + +MOCKPP_PTI_IMPLEMENT(mockpp::Invocation1<unsigned>) + + + CPPUNIT_TEST_SUITE_REGISTRATION(ChainableMockObject_1_void_test); -MOCKPP_PTI_DECLARE(mockpp::Invocation1<unsigned>) - - class MyChainableMockObject_1_void : public mockpp::ChainableMockObject { public: @@ -143,7 +145,4 @@ } -MOCKPP_PTI_IMPLEMENT(mockpp::Invocation1<unsigned>) - - #endif // HAVE_CPPUNIT Index: ChainableMockObject_3_void_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/ChainableMockObject_3_void_test.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- ChainableMockObject_3_void_test.cpp 25 Mar 2005 17:20:35 -0000 1.7 +++ ChainableMockObject_3_void_test.cpp 3 Apr 2005 18:32:54 -0000 1.8 @@ -66,8 +66,9 @@ typedef mockpp::Invocation3<unsigned, unsigned, unsigned> mockpp_Invocation3_unsigned_unsigned_unsigned; -MOCKPP_PTI_DECLARE(mockpp_Invocation3_unsigned_unsigned_unsigned) - + +MOCKPP_PTI_IMPLEMENT(mockpp_Invocation3_unsigned_unsigned_unsigned) + class MyChainableMockObject_3_void : public mockpp::ChainableMockObject { @@ -148,7 +149,4 @@ } -MOCKPP_PTI_IMPLEMENT(mockpp_Invocation3_unsigned_unsigned_unsigned) - - #endif // HAVE_CPPUNIT Index: ChainingMockObjectSupport_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/ChainingMockObjectSupport_test.cpp,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- ChainingMockObjectSupport_test.cpp 24 Mar 2005 21:43:07 -0000 1.27 +++ ChainingMockObjectSupport_test.cpp 3 Apr 2005 18:32:54 -0000 1.28 @@ -416,7 +416,7 @@ { mockpp::String fmt = MOCKPP_PCHAR("%1"); fmt << position; - mockpp::CustomStub<int, int>::describeTo(buffer); + internalDescribeTo(buffer); buffer += fmt; return buffer; } Index: StubBuilder_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/StubBuilder_test.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- StubBuilder_test.cpp 25 Mar 2005 17:20:35 -0000 1.12 +++ StubBuilder_test.cpp 3 Apr 2005 18:32:54 -0000 1.13 @@ -74,6 +74,8 @@ typedef mockpp::Invocation5<CA, CB, CC, CD, CE> GetterInvocation; typedef mockpp::Invocation5<CA, CB, CC, CD, CE> VoidInvocation; +MOCKPP_TYPELESSSTUBADAPTER_PTI_IMPL(VoidInvocation) + template <typename R, // Returntype typename I> // Invocation Index: CoreMock_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/CoreMock_test.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- CoreMock_test.cpp 25 Mar 2005 17:20:35 -0000 1.19 +++ CoreMock_test.cpp 3 Apr 2005 18:32:54 -0000 1.20 @@ -45,6 +45,15 @@ #include <cppunit/extensions/HelperMacros.h> + +typedef mockpp::Invocation0 GetterInvocation; +typedef mockpp::Invocation0 VoidInvocation; + + +MOCKPP_COREMOCK_PTI_IMPL(VoidInvocation) +MOCKPP_ABSTRACTDYNAMICCHAININGMOCK_PTI_IMPL(VoidInvocation) +MOCKPP_INVOCATIONMOCKER_PTI_DECL(VoidInvocation) + namespace { @@ -146,10 +155,6 @@ }; -typedef mockpp::Invocation0 GetterInvocation; -typedef mockpp::Invocation0 VoidInvocation; - - void CoreMock_test::test_invocation() { { Index: ChainableMockObject_2_void_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/ChainableMockObject_2_void_test.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- ChainableMockObject_2_void_test.cpp 25 Mar 2005 17:20:35 -0000 1.7 +++ ChainableMockObject_2_void_test.cpp 3 Apr 2005 18:32:53 -0000 1.8 @@ -67,7 +67,8 @@ typedef mockpp::Invocation2<unsigned, unsigned> mockpp_Invocation2_unsigned_unsigned; -MOCKPP_PTI_DECLARE(mockpp_Invocation2_unsigned_unsigned) + +MOCKPP_PTI_IMPLEMENT(mockpp_Invocation2_unsigned_unsigned) class MyChainableMockObject_2_void : public mockpp::ChainableMockObject @@ -146,7 +147,6 @@ mcm.verify(); } -MOCKPP_PTI_IMPLEMENT(mockpp_Invocation2_unsigned_unsigned) #endif // HAVE_CPPUNIT |
Update of /cvsroot/mockpp/mockpp/mockpp/chaining In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9425/mockpp/chaining Modified Files: AbstractDynamicChainingMock.h CoreMock.h FIFOInvocationDispatcher.h InvocationMocker.h LIFOInvocationDispatcher.h mockpp_pti.h Log Message: more efforts to make msvc6 compile Index: InvocationMocker.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/InvocationMocker.h,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- InvocationMocker.h 2 Apr 2005 20:45:31 -0000 1.30 +++ InvocationMocker.h 3 Apr 2005 18:32:53 -0000 1.31 @@ -433,6 +433,10 @@ }; +#define MOCKPP_INVOCATIONMOCKER_PTI_IMPL(I) +#define MOCKPP_INVOCATIONMOCKER_PTI_DECL(I) + + #else // MOCKPP_PTI_WEAKNESS Partial Template Instantiation Weakness @@ -440,44 +444,42 @@ * Neccessary for compiler with weak template capabilities. */ #define MOCKPP_INVOCATIONMOCKER_PTI_DECL(I) \ -template<> \ -::mockpp::InvocationMocker<void, I >::InvocationMocker<void, I >(); \ -\ -template<> \ -::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 ); +namespace mockpp { \ +template<> \ +class InvocationMocker<void, I> : public InvocationMockerBase<void, I>; \ +} /** Implement specialized methods for mockpp::InvocationMocker. * Neccessary for compiler with weak template capabilities. */ #define MOCKPP_INVOCATIONMOCKER_PTI_IMPL(I) \ +namespace mockpp { \ 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)) \ -{ \ -} \ -\ -template<> \ -mockpp::InvocationMocker<void, I >::InvocationMocker<void, I >(\ - ::mockpp::AutoPointer<mockpp::InvocationMockerBase<void, I >::DescriberBase> in_describer ) \ - : InvocationMockerBase<void, I >( in_describer, \ - new ::mockpp::TypelessStubAdapter<void, I >(new ::mockpp::VoidStub)) \ -{ \ -} \ +class InvocationMocker<void, I> : public InvocationMockerBase<void, I> \ +{ \ + InvocationMocker<void, I >::InvocationMocker<void, I >() \ + : InvocationMockerBase<void, I >( new InvocationMockerBase<void, I >::DefaultDescriber(), \ + new TypelessStubAdapter<void, I >(new VoidStub)) \ + { \ + } \ \ -template<> \ -void ::mockpp::InvocationMocker<void, I >::invoke( const I &invocation ) \ -{ \ - for ( Iterator it = this->matchers.begin(); it != this->matchers.end(); ++it ) \ - ( *it ) ->incInvoked( invocation ); \ - this->stub->invoke( invocation ); \ -} - + mockpp::InvocationMocker<void, I >::InvocationMocker<void, I >(\ + AutoPointer<mockpp::InvocationMockerBase<void, I >::DescriberBase> in_describer ) \ + : InvocationMockerBase<void, I >( in_describer, \ + new TypelessStubAdapter<void, I >(new VoidStub)) \ + { \ + } \ +\ + void InvocationMocker<void, I >::invoke( const I &invocation ) \ + { \ + for ( Iterator it = this->matchers.begin(); it != this->matchers.end(); ++it ) \ + ( *it ) ->incInvoked( invocation ); \ + this->stub->invoke( invocation ); \ + } \ +}; /* class */ \ +} // ns + #endif // MOCKPP_PTI_WEAKNESS Index: LIFOInvocationDispatcher.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/LIFOInvocationDispatcher.h,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- LIFOInvocationDispatcher.h 2 Apr 2005 20:45:31 -0000 1.12 +++ LIFOInvocationDispatcher.h 3 Apr 2005 18:32:53 -0000 1.13 @@ -110,6 +110,10 @@ #else // MOCKPP_PTI_WEAKNESS Partial Template Instantiation Weakness +#define MOCKPP_LIFOINVOCATIONDISPATCHER_PTI_IMPL(I) +#define MOCKPP_LIFOINVOCATIONDISPATCHER_PTI_DECL(I) + + /** Declare specialized methods for mockpp::LIFOInvocationDispatcher. * Neccessary for compiler with weak template capabilities. */ Index: CoreMock.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/CoreMock.h,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- CoreMock.h 2 Apr 2005 20:45:31 -0000 1.13 +++ CoreMock.h 3 Apr 2005 18:32:53 -0000 1.14 @@ -126,6 +126,10 @@ }; +#define MOCKPP_COREMOCK_PTI_IMPL(I) +#define MOCKPP_COREMOCK_PTI_DECL(I) + + #else // MOCKPP_PTI_WEAKNESS Partial Template Instantiation Weakness /** Declare specialized methods for mockpp::CoreMock. @@ -133,19 +137,35 @@ */ #define MOCKPP_COREMOCK_PTI_DECL(I) \ template<> \ -void mockpp::CoreMock<void, I >::invoke( const I &invocation ); +void mockpp::CoreMock<void, I >; + /** Implement specialized methods for mockpp::CoreMock. * Neccessary for compiler with weak template capabilities. */ #define MOCKPP_COREMOCK_PTI_IMPL(I) \ +namespace mockpp { \ template<> \ -void mockpp::CoreMock<void, I >::invoke( const I &invocation ) \ -{ \ - mockInvocation( invocation ); \ +class CoreMock<void, I> : public AbstractDynamicChainingMock<void, I> \ +{ \ + public: \ + CoreMock<void, I>( InvocationDispatcher<void, I>::AP invocationDispatcher, \ + const String &name, \ + VerifiableList *parent) \ + : AbstractDynamicChainingMock<void, I>( invocationDispatcher, name, parent ) \ + {} \ + \ + CoreMock<void, I>( const String &name, VerifiableList *parent) \ + : AbstractDynamicChainingMock<void, I>( name, parent) \ + {} \ + \ + void mockpp::CoreMock<void, I >::invoke( const I &invocation ) \ + { \ + mockInvocation( invocation ); \ + } \ +}; \ } - #endif Index: mockpp_pti.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/mockpp_pti.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- mockpp_pti.h 26 Mar 2005 20:11:33 -0000 1.5 +++ mockpp_pti.h 3 Apr 2005 18:32:53 -0000 1.6 @@ -40,11 +40,7 @@ #include <mockpp/chaining/CoreMock.h> #include <mockpp/chaining/InvocationMocker.h> #include <mockpp/chaining/AbstractDynamicChainingMock.h> -#include <mockpp/stub/ThrowStub.h> -#include <mockpp/stub/TypelessStub.h> -#define MOCKPP_PTI_IMPLEMENT_BASICS \ - MOCKPP_THROWSTUB_PTI_IMPL #define MOCKPP_PTI_IMPLEMENT(I) \ MOCKPP_TYPELESSSTUBADAPTER_PTI_IMPL(I) \ @@ -55,7 +51,6 @@ MOCKPP_COREMOCK_PTI_IMPL(I) #define MOCKPP_PTI_DECLARE(I) \ - MOCKPP_THROWSTUB_PTI_DECL \ MOCKPP_TYPELESSSTUBADAPTER_PTI_DECL(I) \ MOCKPP_FIFOINVOCATIONDISPATCHER_PTI_DECL(I) \ MOCKPP_LIFOINVOCATIONDISPATCHER_PTI_DECL(I) \ Index: FIFOInvocationDispatcher.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/FIFOInvocationDispatcher.h,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- FIFOInvocationDispatcher.h 2 Apr 2005 20:45:31 -0000 1.12 +++ FIFOInvocationDispatcher.h 3 Apr 2005 18:32:53 -0000 1.13 @@ -107,6 +107,10 @@ }; +#define MOCKPP_FIFOINVOCATIONDISPATCHER_PTI_IMPL(I) +#define MOCKPP_FIFOINVOCATIONDISPATCHER_PTI_DECL(I) + + #else // MOCKPP_PTI_WEAKNESS Partial Template Instantiation Weakness Index: AbstractDynamicChainingMock.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/AbstractDynamicChainingMock.h,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- AbstractDynamicChainingMock.h 3 Apr 2005 12:01:38 -0000 1.25 +++ AbstractDynamicChainingMock.h 3 Apr 2005 18:32:46 -0000 1.26 @@ -96,7 +96,8 @@ #define MOCKPP_NEED_USING #endif -#if defined(_MSC_VER) +#if defined(_MSC_VER_123) + /** Appends the description of this object to the buffer. * @param result The buffer that the description is appended to. * @param matchers list of matcher objects @@ -119,7 +120,7 @@ #endif #ifdef MOCKPP_NEED_USING - using InvocationMocker<R, I>::DescriberBase::describeTo; // use only once + using InvocationMocker<R, I>::DescriberBase::describeTo; // use only once #endif #undef MOCKPP_NEED_USING @@ -343,6 +344,10 @@ }; +#define MOCKPP_ABSTRACTDYNAMICCHAININGMOCK_PTI_IMPL(I) +#define MOCKPP_ABSTRACTDYNAMICCHAININGMOCK_PTI_DECL(I) + + #else // MOCKPP_PTI_WEAKNESS Partial Template Instantiation Weakness |
From: Ewald A. <ewa...@us...> - 2005-04-03 18:33:21
|
Update of /cvsroot/mockpp/mockpp/mockpp/stub In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9425/mockpp/stub Modified Files: CustomStub.h StubHolder.h ThrowStub.h TypelessStub.h Log Message: more efforts to make msvc6 compile Index: StubHolder.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/stub/StubHolder.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- StubHolder.h 2 Apr 2005 20:45:31 -0000 1.10 +++ StubHolder.h 3 Apr 2005 18:32:53 -0000 1.11 @@ -73,13 +73,17 @@ : stub(in_stub) {} - /** Creates the object. +#ifndef _MSC_VER + + /** Creates the object. * @param in_stub pointer to the stub */ StubHolder(const AutoPointer<Stub<R, I> > &in_stub) : stub(in_stub) {} +#endif + /** Returns the stub object. * @attention After this method is called this object becomes invalid. * @return the stub object Index: CustomStub.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/stub/CustomStub.h,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- CustomStub.h 6 Jan 2005 13:09:23 -0000 1.17 +++ CustomStub.h 3 Apr 2005 18:32:53 -0000 1.18 @@ -64,12 +64,24 @@ */ virtual String describeTo( String &buffer ) const { - buffer += description; - return buffer; + return internalDescribeTo(buffer); } - private: - + protected: + + /** Appends the description of this object to the buffer. + * Needed for compilers that can't invoke \c CustumStub<>::describeTo() directly. + * @param buffer The buffer that the description is appended to. + * @return The current content of the buffer data + */ + String internalDescribeTo( String &buffer ) const // msvc6 hack + { + buffer += description; + return buffer; + } + + private: + const String description; }; Index: TypelessStub.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/stub/TypelessStub.h,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- TypelessStub.h 2 Apr 2005 20:45:32 -0000 1.15 +++ TypelessStub.h 3 Apr 2005 18:32:53 -0000 1.16 @@ -176,31 +176,49 @@ }; +#define MOCKPP_TYPELESSSTUBADAPTER_PTI_IMPL(I) +#define MOCKPP_TYPELESSSTUBADAPTER_PTI_DECL(I) + + #else // MOCKPP_PTI_WEAKNESS Partial Template Instantiation Weakness + /** Declare specialized methods for mockpp::InvocationMocker. * Neccessary for compilers with weak template capabilities. */ #define MOCKPP_TYPELESSSTUBADAPTER_PTI_DECL(I) \ +namespace mockpp { \ template<> \ -void mockpp::TypelessStubAdapter<void, I >::invoke( const I &); +void mockpp::TypelessStubAdapter<void, I >; \ +} /** Implement specialized methods for mockpp::InvocationMocker. * Neccessary for compilers with weak template capabilities. */ #define MOCKPP_TYPELESSSTUBADAPTER_PTI_IMPL(I) \ +namespace mockpp { \ template<> \ -void mockpp::TypelessStubAdapter<void, I >::invoke( const I &invocation) \ -{ \ - this->stubber->typelessInvoke(); \ -} - +class TypelessStubAdapter<void, I > : public TypelessStubAdapterBase<void, I > \ +{ \ + public: \ + TypelessStubAdapter<void, I >(TypelessStub<void>::AP tm, bool in_delete) \ + : TypelessStubAdapterBase<void, I >(tm, in_delete) \ + {} \ + \ + void invoke( const I &invocation) \ + { \ + MOCKPP_UNUSED(invocation); \ + this->stubber->typelessInvoke(); \ + } \ +}; \ +} + #endif // MOCKPP_PTI_WEAKNESS - -} // namespace mockpp + +} // namespace mockpp #endif // MOCKPP_TypelessStub_H Index: ThrowStub.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/stub/ThrowStub.h,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- ThrowStub.h 2 Apr 2005 20:45:32 -0000 1.30 +++ ThrowStub.h 3 Apr 2005 18:32:53 -0000 1.31 @@ -117,9 +117,7 @@ }; -#ifndef MOCKPP_PTI_WEAKNESS // Partial Template Instantiation Weakness - - + /** A stub throwing exceptions. */ template<> @@ -152,30 +150,6 @@ }; -#else // MOCKPP_PTI_WEAKNESS Partial Template Instantiation Weakness - - -/** Declare specialized methods for mockpp::InvocationMocker. - * Neccessary for compiler with weak template capabilities. - */ -#define MOCKPP_THROWSTUB_PTI_DECL \ -template<> \ -void mockpp::ThrowStub<void>::typelessInvoke(); \ - - -/** Implement specialized methods for mockpp::InvocationMocker. - * Neccessary for compiler with weak template capabilities. - */ -#define MOCKPP_THROWSTUB_PTI_IMPL \ -template<> \ -void mockpp::ThrowStub<void>::typelessInvoke() \ -{ \ - this->throwable.get()->throw_me(); \ -} - - -#endif // MOCKPP_PTI_WEAKNESS - } // namespace mockpp |
From: Ewald A. <ewa...@us...> - 2005-04-03 18:33:03
|
Update of /cvsroot/mockpp/mockpp/mockpp/examples/tutorial In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9425/mockpp/examples/tutorial Modified Files: poormock.cpp visitmock.cpp Log Message: more efforts to make msvc6 compile Index: poormock.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/examples/tutorial/poormock.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- poormock.cpp 22 Mar 2005 22:03:25 -0000 1.7 +++ poormock.cpp 3 Apr 2005 18:32:53 -0000 1.8 @@ -14,6 +14,10 @@ #include "consumer.h" #include <iostream> + +#ifndef _MSC_VER +using std::exit; +#endif /** Quick-n-dirty asserter. * If the condition fails the condition is printed @@ -25,7 +29,7 @@ << "Error occured.\n" << #x << std::endl \ << std::endl \ << std::flush; \ - std::exit(1); \ + exit(1); \ } Index: visitmock.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/examples/tutorial/visitmock.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- visitmock.cpp 22 Mar 2005 22:03:25 -0000 1.10 +++ visitmock.cpp 3 Apr 2005 18:32:53 -0000 1.11 @@ -74,7 +74,7 @@ read_controller.addReturnValue("record-3"); // processing is not exactly defined - mock.calculate(eq<unsigned>(5, 5)); + mock.calculate(eq<unsigned>((unsigned)5, (unsigned)5)); mock.calculate(eq<unsigned>(5, 5)); mock.calculate(eq<unsigned>(5, 5)); calculate_controller.addResponseValue(10, eq<unsigned>(2, 2)); |
From: Ewald A. <ewa...@us...> - 2005-04-03 18:33:03
|
Update of /cvsroot/mockpp/mockpp/mockpp/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9425/mockpp/util Modified Files: NotImplementedException.cpp Log Message: more efforts to make msvc6 compile Index: NotImplementedException.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/util/NotImplementedException.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- NotImplementedException.cpp 2 Apr 2005 13:46:38 -0000 1.17 +++ NotImplementedException.cpp 3 Apr 2005 18:32:54 -0000 1.18 @@ -53,3 +53,4 @@ + |
From: Ewald A. <ewa...@us...> - 2005-04-03 12:58:51
|
Update of /cvsroot/mockpp/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19362 Modified Files: ChangeLog Log Message: update Index: ChangeLog =================================================================== RCS file: /cvsroot/mockpp/mockpp/ChangeLog,v retrieving revision 1.40 retrieving revision 1.41 diff -u -d -r1.40 -r1.41 --- ChangeLog 2 Apr 2005 14:09:58 -0000 1.40 +++ ChangeLog 3 Apr 2005 12:58:25 -0000 1.41 @@ -3,96 +3,140 @@ mockpp history -------------- -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) - - minor internal cleanups +2005-04-03 1.7.0: -2005-03-13 1.6.1: - added missing file to the distribution + - 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 with static libs) + - minor internal cleanups -2005-03-13 1.6.0: - MixedMockObject combines enhanced mock objects - - scope fixes for g++ 3.4.3 - - fixes for g++ 2.95.3 and OpenBsd3.1 - - fixed non-working class IsInstanceOf +2005-03-13 1.6.1: -2005-03-04 1.5.0: - added class ConstraintList - - VisitableMockObjects and the according controller also take - Constraints as objects instead of actual values. - - fixed some compiler warnings - - added #include for gcc 2.95 (which seems to compile fine :-) - - new matcher class UnlimitedMatcher - - better support for typeless constraints - - seperated some files into header and source file - - added #ifdef MOCKPP_IMPORT_ABBREVIATED to import parts - of mockpp namespace - - internal restructurings + added missing file to the distribution -2005-02-25 1.4.0: - changed "verify() const" to "verify()" - - mock objects reset all their sub objects - - all mock objects get their own reset() method - - ReturnObjectList has a default return value +2005-03-13 1.6.0: -2005-02-19 1.3.0: - new TrackingCounter classes + - MixedMockObject combines enhanced mock objects + - scope fixes for g++ 3.4.3 + - fixes for g++ 2.95.3 and OpenBsd3.1 + - fixed non-working class IsInstanceOf -2005-01-26 1.2.0: - closed 2 memory leaks - - fixed VerifyingTestCase - - added another example file - - changes in macros: - changing MOCKPP_STRING to MOCKPP_PCSTRING may become necessary - - prepared CBuilderX project files +2005-03-04 1.5.0: -2005-01-08 1.2.0-b4: - modified and fixed setExpected()/setExpectNothing() + - added class ConstraintList + - VisitableMockObjects and the according controller also take + Constraints as objects instead of actual values. + - fixed some compiler warnings + - added #include for gcc 2.95 (which seems to compile fine :-) + - new matcher class UnlimitedMatcher + - better support for typeless constraints + - seperated some files into header and source file + - added #ifdef MOCKPP_IMPORT_ABBREVIATED to import parts + of mockpp namespace + - internal restructurings +2005-02-25 1.4.0: -2005-01-07 1.2.0-b3: - compatibility break: addThrowable()/addReturnValue place exceptions - "in line" with return values, exceptions are no more thrown at the beginning. - To switch back to old behaviour call unsetThrowablesInline() - before calling activate(). See documentation for details. - - check for cppunit/Message.h - - manually disable verify() in VerifyingTextCase -2004-12-11 1.2.0-b1: - new expectation type ExpectationConglomeration - - added chaining invocation for certain classes - - disabled all wchar_t related code for non-unicode configurations - - port of jMock - - fixed a problem with non-unicode platforms - - renamed Verifiable::getName() to Verifiable::getVerifiableName() - - added missing documentation source files - - added set of macros for mocks with const method - - to avoid name collisons "Visitable" macros have been renamed - (mainly substituted METHOD with VISITABLE) + - changed "verify() const" to "verify()" + - mock objects reset all their sub objects + - all mock objects get their own reset() method + - ReturnObjectList has a default return value -2004-08-03 1.1.16: - fixes and workarounds for MS VC - - patches for g++ 3.4 +2005-02-19 1.3.0: -2004-07-26 1.1.15: - extended macros for better handling of mock method - parameter types + new TrackingCounter classes -2004-02-15 1.1.14: - better detection of cppunit files +2005-01-26 1.2.0: + - closed 2 memory leaks + - fixed VerifyingTestCase + - added another example file + - changes in macros: + changing MOCKPP_STRING to MOCKPP_PCSTRING may become necessary + - prepared CBuilderX project files -2003-12-11 1.1.13: - bug fixes: - string formatting - - ReturnObjectList message +2005-01-08 1.2.0-b4: -2003-10-11 1.1.11: - moved bcb5/msvc config files to sources - - patch for msvc unicode problem + modified and fixed setExpected()/setExpectNothing() -2003-04-28 1.1.10: - port to msvc 6+7, HP-UX 11 +2005-01-07 1.2.0-b3: -2003-04-06 1.1.9: fixed references to removed Mutex.h + - compatibility break: addThrowable()/addReturnValue place exceptions + "in line" with return values, exceptions are no more thrown at the beginning. + To switch back to old behaviour call unsetThrowablesInline() + before calling activate(). See documentation for details. + - check for cppunit/Message.h + - manually disable verify() in VerifyingTextCase -2003-04-06 1.1.8: - Port to OpenBsd 3.1 and g++ 2.95 - - fix for MSVC - - simplified MockObject verify() - - removed useless multithread stuff +2004-12-11 1.2.0-b1: -2003-03-10 1.1.7: Extended documentation via doxygen + - new expectation type ExpectationConglomeration + - added chaining invocation for certain classes + - disabled all wchar_t related code for non-unicode configurations + - port of jMock + - fixed a problem with non-unicode platforms + - renamed Verifiable::getName() to Verifiable::getVerifiableName() + - added missing documentation source files + - added set of macros for mocks with const method + - to avoid name collisons "Visitable" macros have been renamed + (mainly substituted METHOD with VISITABLE) -2003-03-12 1.1.6: - ExpectationBoundary.setExpectedDelta() added - - pass parameters by reference to Visitabable methods +2004-08-03 1.1.16: -2003-03-10 1.1.5: Closed memory leak + - fixes and workarounds for MS VC + - patches for g++ 3.4 -2003-03-09 1.1.4: Fixed installation issue +2004-07-26 1.1.15: -2003-03-08 1.1.3: Final release + - extended macros for better handling of mock method + parameter types + +2004-02-15 1.1.14: + + - better detection of cppunit files + +2003-12-11 1.1.13: + + - bug fixes: - string formatting + - ReturnObjectList message + +2003-10-11 1.1.11: + + - moved bcb5/msvc config files to sources + - patch for msvc unicode problem + +2003-04-28 1.1.10: + + port to msvc 6+7, HP-UX 11 + +2003-04-06 1.1.9: + + fixed references to removed Mutex.h + +2003-04-06 1.1.8: + + - Port to OpenBsd 3.1 and g++ 2.95 + - fix for MSVC + - simplified MockObject verify() + - removed useless multithread stuff + +2003-03-10 1.1.7: + + Extended documentation via doxygen + +2003-03-12 1.1.6: + + - ExpectationBoundary.setExpectedDelta() added + - pass parameters by reference to Visitabable methods +2003-03-10 1.1.5: + + Closed memory leak + +2003-03-09 1.1.4: + + Fixed installation issue + +2003-03-08 1.1.3: + + Final release |
From: Ewald A. <ewa...@us...> - 2005-04-03 12:58:51
|
Update of /cvsroot/mockpp/mockpp/mockpp/docs/en In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19362/mockpp/docs/en Modified Files: index.docbook Log Message: update Index: index.docbook =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/docs/en/index.docbook,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- index.docbook 27 Feb 2005 11:48:16 -0000 1.23 +++ index.docbook 3 Apr 2005 12:58:25 -0000 1.24 @@ -10,8 +10,8 @@ <!ENTITY cppunit '<application>cppunit</application>' > <!ENTITY copyyears '2002-2005' > <!ENTITY mockpp_email 'mockpp at ewald-arnold dot de' > - <!ENTITY release_date '<date>2005-02-27</date>' > - <!ENTITY release_info '<releaseinfo>1.05.00</releaseinfo>' > + <!ENTITY release_date '<date>2005-04-03</date>' > + <!ENTITY release_info '<releaseinfo>1.07.00</releaseinfo>' > <!ENTITY chap_bookinfo SYSTEM 'bookinfo.docbook' > <!ENTITY chap_intro SYSTEM 'intro.docbook' > |
From: Ewald A. <ewa...@us...> - 2005-04-03 12:01:47
|
Update of /cvsroot/mockpp/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5193 Modified Files: configure.in Log Message: create release Index: configure.in =================================================================== RCS file: /cvsroot/mockpp/mockpp/configure.in,v retrieving revision 1.72 retrieving revision 1.73 diff -u -d -r1.72 -r1.73 --- configure.in 2 Apr 2005 20:45:27 -0000 1.72 +++ configure.in 3 Apr 2005 12:01:36 -0000 1.73 @@ -45,7 +45,7 @@ AC_CONFIG_AUX_DIR(config) AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(mockpp, $MOCKPP_VERSION-rc4) +AM_INIT_AUTOMAKE(mockpp, $MOCKPP_VERSION) AC_SUBST(all_includes) AC_SUBST(all_libraries) @@ -385,8 +385,8 @@ [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); ]) +[Define to something that supresses compiler warnings about unused variables. +E.g.: MOCKPP_UNUSED(x) (x = x); ]) # ---------------------------------------------------------------------------- |
From: Ewald A. <ewa...@us...> - 2005-04-03 12:01:47
|
Update of /cvsroot/mockpp/mockpp/mockpp/chaining In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5193/mockpp/chaining Modified Files: AbstractDynamicChainingMock.h Log Message: create release Index: AbstractDynamicChainingMock.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/AbstractDynamicChainingMock.h,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- AbstractDynamicChainingMock.h 2 Apr 2005 20:45:30 -0000 1.24 +++ AbstractDynamicChainingMock.h 3 Apr 2005 12:01:38 -0000 1.25 @@ -83,6 +83,7 @@ } #if defined(__BORLANDC__) + /** Appends the description of this object to the buffer. * @param buffer The buffer that the description is appended to. * @return The current content of the buffer data |
From: Ewald A. <ewa...@us...> - 2005-04-02 21:55:23
|
Update of /cvsroot/mockpp/mockpp/msvc71/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8801/msvc71/mockpp Modified Files: mockpp.vcproj Log Message: updated project files Index: mockpp.vcproj =================================================================== RCS file: /cvsroot/mockpp/mockpp/msvc71/mockpp/mockpp.vcproj,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- mockpp.vcproj 25 Mar 2005 10:22:55 -0000 1.3 +++ mockpp.vcproj 2 Apr 2005 21:55:15 -0000 1.4 @@ -349,7 +349,13 @@ RelativePath="..\..\mockpp\mockpp.h"> </File> <File - RelativePath="..\..\mockpp\mockpp_config-msvc.h"> + RelativePath="..\..\mockpp\mockpp_config-bcb5.h"> + </File> + <File + RelativePath="..\..\mockpp\mockpp_config-msvc_60_70.h"> + </File> + <File + RelativePath="..\..\mockpp\mockpp_config-msvc_71.h"> </File> <File RelativePath="..\..\mockpp\mockpp_config.h"> |
From: Ewald A. <ewa...@us...> - 2005-04-02 21:55:05
|
Update of /cvsroot/mockpp/mockpp/msvc6/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8649/msvc6/mockpp Modified Files: mockpp.dsp mockpp.dsw Log Message: updated project files Index: mockpp.dsw =================================================================== RCS file: /cvsroot/mockpp/mockpp/msvc6/mockpp/mockpp.dsw,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- mockpp.dsw 25 Mar 2005 10:22:11 -0000 1.4 +++ mockpp.dsw 2 Apr 2005 21:54:48 -0000 1.5 @@ -3,7 +3,7 @@ ############################################################################### -Project: "basicmock"=examples\tutorial\basicmock.dsp - Package Owner=<4> +Project: "basicmock"=".\examples\tutorial\basicmock.dsp" - Package Owner=<4> Package=<5> {{{ @@ -11,11 +11,14 @@ Package=<4> {{{ + Begin Project Dependency + Project_Dep_Name mockpp + End Project Dependency }}} ############################################################################### -Project: "chainmock"=examples\tutorial\chainmock.dsp - Package Owner=<4> +Project: "chainmock"=".\examples\tutorial\chainmock.dsp" - Package Owner=<4> Package=<5> {{{ @@ -23,11 +26,14 @@ Package=<4> {{{ + Begin Project Dependency + Project_Dep_Name mockpp + End Project Dependency }}} ############################################################################### -Project: "cppunit"=examples\tutorial\cppunit.dsp - Package Owner=<4> +Project: "cppunit"=".\examples\tutorial\cppunit.dsp" - Package Owner=<4> Package=<5> {{{ @@ -35,11 +41,14 @@ Package=<4> {{{ + Begin Project Dependency + Project_Dep_Name mockpp + End Project Dependency }}} ############################################################################### -Project: "examples"=examples\examples.dsp - Package Owner=<4> +Project: "examples"=".\examples\examples.dsp" - Package Owner=<4> Package=<5> {{{ @@ -47,11 +56,14 @@ Package=<4> {{{ + Begin Project Dependency + Project_Dep_Name mockpp + End Project Dependency }}} ############################################################################### -Project: "mock_test"=tests\mock_test.dsp - Package Owner=<4> +Project: "mock_test"=".\tests\mock_test.dsp" - Package Owner=<4> Package=<5> {{{ @@ -59,11 +71,14 @@ Package=<4> {{{ + Begin Project Dependency + Project_Dep_Name mockpp + End Project Dependency }}} ############################################################################### -Project: "mockpp"=mockpp.dsp - Package Owner=<4> +Project: "mockpp"=".\mockpp.dsp" - Package Owner=<4> Package=<5> {{{ @@ -75,7 +90,7 @@ ############################################################################### -Project: "poormock"=examples\tutorial\poormock.dsp - Package Owner=<4> +Project: "poormock"=".\examples\tutorial\poormock.dsp" - Package Owner=<4> Package=<5> {{{ @@ -83,11 +98,14 @@ Package=<4> {{{ + Begin Project Dependency + Project_Dep_Name mockpp + End Project Dependency }}} ############################################################################### -Project: "visitmock"=examples\tutorial\visitmock.dsp - Package Owner=<4> +Project: "visitmock"=".\examples\tutorial\visitmock.dsp" - Package Owner=<4> Package=<5> {{{ @@ -95,6 +113,9 @@ Package=<4> {{{ + Begin Project Dependency + Project_Dep_Name mockpp + End Project Dependency }}} ############################################################################### Index: mockpp.dsp =================================================================== RCS file: /cvsroot/mockpp/mockpp/msvc6/mockpp/mockpp.dsp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- mockpp.dsp 25 Mar 2005 10:22:11 -0000 1.4 +++ mockpp.dsp 2 Apr 2005 21:54:48 -0000 1.5 @@ -26,7 +26,6 @@ # PROP Scc_ProjName "" # PROP Scc_LocalPath "" CPP=cl.exe -MTL=midl.exe RSC=rc.exe !IF "$(CFG)" == "mockpp - Win32 Debug" @@ -41,18 +40,19 @@ # PROP Output_Dir "C:\tmp\compile\mockpp\Debug" # PROP Intermediate_Dir "C:\tmp\compile\mockpp\Debug" # PROP Target_Dir "" -# ADD BASE CPP /nologo /MDd /I "../.." /ZI /W4 /Od /D "WIN32" /D "_LIB" /D "_MBCS" /GR /Fp"C:\tmp\compile\mockpp\Debug/mockpp.pch" /Fo"C:\tmp\compile\mockpp\Debug/" /Fd"C:\tmp\compile\mockpp\Debug/" /GZ /c /GX -# ADD CPP /nologo /MDd /I "../.." /ZI /W4 /Od /D "WIN32" /D "_LIB" /D "_MBCS" /GR /Fp"C:\tmp\compile\mockpp\Debug/mockpp.pch" /Fo"C:\tmp\compile\mockpp\Debug/" /Fd"C:\tmp\compile\mockpp\Debug/" /GZ /c /GX -# ADD BASE MTL /nologo /win32 -# ADD MTL /nologo /win32 -# ADD BASE RSC /l 1041 /d "_DEBUG" -# ADD RSC /l 1041 /d "_DEBUG" +MTL=midl.exe +# ADD BASE MTL /nologo /win32 +# ADD MTL /nologo /win32 +# ADD BASE CPP /nologo /MDd /W4 /GR /GX /ZI /Od /I "../.." /D "WIN32" /D "_LIB" /D "_MBCS" /GZ /c +# ADD CPP /nologo /MDd /W4 /GR /GX /ZI /Od /I "../.." /D "WIN32" /D "_LIB" /D "_MBCS" /GZ /c +# ADD BASE RSC /l 0x411 /d "_DEBUG" +# ADD RSC /l 0x411 /d "_DEBUG" BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\lib\mockppd.lib" -# ADD LIB32 /nologo /out:"..\lib\mockppd.lib" +# ADD BASE LIB32 /nologo /out:"..\lib\mockppd.lib" +# ADD LIB32 /nologo /out:"..\lib\mockppd.lib" !ELSEIF "$(CFG)" == "mockpp - Win32 Release" @@ -66,20 +66,21 @@ # PROP Output_Dir "C:\tmp\compile\mockpp\Release" # PROP Intermediate_Dir "C:\tmp\compile\mockpp\Release" # PROP Target_Dir "" -# ADD BASE CPP /nologo /MD /I "../.." /W4 /O2 /Ob1 /D "NDEBUG" /D "WIN32" /D "_LIB" /D "_MBCS" /GF /Gy /GR /Fp"C:\tmp\compile\mockpp\Release/mockpp.pch" /Fo"C:\tmp\compile\mockpp\Release/" /Fd"C:\tmp\compile\mockpp\Release/" /c /GX -# ADD CPP /nologo /MD /I "../.." /W4 /O2 /Ob1 /D "NDEBUG" /D "WIN32" /D "_LIB" /D "_MBCS" /GF /Gy /GR /Fp"C:\tmp\compile\mockpp\Release/mockpp.pch" /Fo"C:\tmp\compile\mockpp\Release/" /Fd"C:\tmp\compile\mockpp\Release/" /c /GX -# ADD BASE MTL /nologo /win32 -# ADD MTL /nologo /win32 -# ADD BASE RSC /l 1041 /d "NDEBUG" -# ADD RSC /l 1041 /d "NDEBUG" +MTL=midl.exe +# ADD BASE MTL /nologo /win32 +# ADD MTL /nologo /win32 +# ADD BASE CPP /nologo /MD /W4 /GR /GX /O2 /I "../.." /D "NDEBUG" /D "WIN32" /D "_LIB" /D "_MBCS" /GF /c +# ADD CPP /nologo /MD /W4 /GR /GX /O2 /I "../.." /D "NDEBUG" /D "WIN32" /D "_LIB" /D "_MBCS" /GF /c +# ADD BASE RSC /l 0x411 /d "NDEBUG" +# ADD RSC /l 0x411 /d "NDEBUG" BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo LIB32=link.exe -lib -# ADD BASE LIB32 /nologo /out:"..\lib\mockpp.lib" -# ADD LIB32 /nologo /out:"..\lib\mockpp.lib" +# ADD BASE LIB32 /nologo /out:"..\lib\mockpp.lib" +# ADD LIB32 /nologo /out:"..\lib\mockpp.lib" -!ENDIF +!ENDIF # Begin Target @@ -88,62 +89,6 @@ # Begin Group "Source Files" # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\mockpp\ChainableMockObject.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\mockpp\ExpectationCounter.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\mockpp\MixedMockObject.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\mockpp\MockObject.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\mockpp\mockpp.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\mockpp\SelfDescribing.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\mockpp\Throwable.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\mockpp\ThrowableList.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\mockpp\TrackingCounter.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\mockpp\Verifiable.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\mockpp\VerifiableList.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\mockpp\VerifyingTestCaller.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\mockpp\VerifyingTestCase.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\mockpp\VisitableMockObject.cpp -# End Source File # Begin Group "compat" # PROP Default_Filter "cpp" @@ -173,11 +118,13 @@ !IF "$(CFG)" == "mockpp - Win32 Debug" -# ADD CPP /nologo /Od /GZ /GX +# ADD CPP /nologo /GX /Od /GZ + !ELSEIF "$(CFG)" == "mockpp - Win32 Release" -# ADD CPP /nologo /O2 /GX -!ENDIF +# ADD CPP /nologo /GX /O2 + +!ENDIF # End Source File # Begin Source File @@ -186,11 +133,13 @@ !IF "$(CFG)" == "mockpp - Win32 Debug" -# ADD CPP /nologo /Od /GZ /GX +# ADD CPP /nologo /GX /Od /GZ + !ELSEIF "$(CFG)" == "mockpp - Win32 Release" -# ADD CPP /nologo /O2 /GX -!ENDIF +# ADD CPP /nologo /GX /O2 + +!ENDIF # End Source File # End Group @@ -286,135 +235,67 @@ SOURCE=..\..\mockpp\stub\VoidStub.cpp # End Source File # End Group -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\mockpp\AbstractExpectation.h -# End Source File -# Begin Source File - -SOURCE=..\..\mockpp\AbstractExpectationCollection.h -# End Source File -# Begin Source File - -SOURCE=..\..\mockpp\chainable-template.h -# End Source File -# Begin Source File - -SOURCE=..\..\mockpp\ChainableMockObject.h -# End Source File -# Begin Source File - -SOURCE=..\..\mockpp\Expectation.h -# End Source File -# Begin Source File - -SOURCE=..\..\mockpp\ExpectationBoundary.h -# End Source File -# Begin Source File - -SOURCE=..\..\mockpp\ExpectationConglomeration.h -# End Source File -# Begin Source File - -SOURCE=..\..\mockpp\ExpectationCounter.h -# End Source File -# Begin Source File - -SOURCE=..\..\mockpp\ExpectationList.h -# End Source File -# Begin Source File - -SOURCE=..\..\mockpp\ExpectationMap.h -# End Source File -# Begin Source File - -SOURCE=..\..\mockpp\ExpectationSegment.h -# End Source File -# Begin Source File - -SOURCE=..\..\mockpp\ExpectationSet.h -# End Source File -# Begin Source File - -SOURCE=..\..\mockpp\ExpectationValue.h -# End Source File -# Begin Source File - -SOURCE=..\..\mockpp\MixedMockObject.h -# End Source File -# Begin Source File - -SOURCE=..\..\mockpp\MockObject.h -# End Source File -# Begin Source File - -SOURCE=..\..\mockpp\mockpp.h -# End Source File # Begin Source File -SOURCE=..\..\mockpp\mockpp_config-msvc.h +SOURCE=..\..\mockpp\ChainableMockObject.cpp # End Source File # Begin Source File -SOURCE=..\..\mockpp\mockpp_config.h +SOURCE=..\..\mockpp\ExpectationCounter.cpp # End Source File # Begin Source File -SOURCE=..\..\mockpp\ReturnObjectList.h +SOURCE=..\..\mockpp\MixedMockObject.cpp # End Source File # Begin Source File -SOURCE=..\..\mockpp\SelfDescribing.h +SOURCE=..\..\mockpp\MockObject.cpp # End Source File # Begin Source File -SOURCE=..\..\mockpp\Throwable.h +SOURCE=..\..\mockpp\mockpp.cpp # End Source File # Begin Source File -SOURCE=..\..\mockpp\ThrowableList.h +SOURCE=..\..\mockpp\SelfDescribing.cpp # End Source File # Begin Source File -SOURCE=..\..\mockpp\TrackingCounter.h +SOURCE=..\..\mockpp\Throwable.cpp # End Source File # Begin Source File -SOURCE=..\..\mockpp\Verifiable.h +SOURCE=..\..\mockpp\ThrowableList.cpp # End Source File # Begin Source File -SOURCE=..\..\mockpp\VerifiableList.h +SOURCE=..\..\mockpp\TrackingCounter.cpp # End Source File # Begin Source File -SOURCE=..\..\mockpp\VerifyingTestCaller.h +SOURCE=..\..\mockpp\Verifiable.cpp # End Source File # Begin Source File -SOURCE=..\..\mockpp\VerifyingTestCase.h +SOURCE=..\..\mockpp\VerifiableList.cpp # End Source File # Begin Source File -SOURCE=..\..\mockpp\visitable-template.h +SOURCE=..\..\mockpp\VerifyingTestCaller.cpp # End Source File # Begin Source File -SOURCE=..\..\mockpp\VisitableMockObject.h +SOURCE=..\..\mockpp\VerifyingTestCase.cpp # End Source File # Begin Source File -SOURCE=..\..\mockpp\VisitableMockObject_macro.h +SOURCE=..\..\mockpp\VisitableMockObject.cpp # End Source File -# Begin Source File +# End Group +# Begin Group "Header Files" -SOURCE=..\..\mockpp\VisitableMockObject_template.h -# End Source File -# Begin Group "compat" +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Group "compat No. 1" # PROP Default_Filter "h" # Begin Source File @@ -434,7 +315,7 @@ SOURCE=..\..\mockpp\compat\Formatter.h # End Source File # End Group -# Begin Group "util" +# Begin Group "util No. 1" # PROP Default_Filter "h" # Begin Source File @@ -450,7 +331,7 @@ SOURCE=..\..\mockpp\util\NotImplementedException.h # End Source File # End Group -# Begin Group "chaining" +# Begin Group "chaining No. 1" # PROP Default_Filter "h" # Begin Source File @@ -518,7 +399,7 @@ SOURCE=..\..\mockpp\chaining\StubMatchersCollection.h # End Source File # End Group -# Begin Group "builder" +# Begin Group "builder No. 1" # PROP Default_Filter "h" # Begin Source File @@ -546,7 +427,7 @@ SOURCE=..\..\mockpp\builder\StubBuilder.h # End Source File # End Group -# Begin Group "stub" +# Begin Group "stub No. 1" # PROP Default_Filter "h" # Begin Source File @@ -594,7 +475,7 @@ SOURCE=..\..\mockpp\stub\VoidStub.h # End Source File # End Group -# Begin Group "matcher" +# Begin Group "matcher No. 1" # PROP Default_Filter "h" # Begin Source File @@ -666,7 +547,7 @@ SOURCE=..\..\mockpp\matcher\UnlimitedMatcher.h # End Source File # End Group -# Begin Group "constraint" +# Begin Group "constraint No. 1" # PROP Default_Filter "h" # Begin Source File @@ -754,7 +635,138 @@ SOURCE=..\..\mockpp\constraint\TypelessConstraint.h # End Source File # End Group +# Begin Source File + +SOURCE=..\..\mockpp\AbstractExpectation.h +# End Source File +# Begin Source File + +SOURCE=..\..\mockpp\AbstractExpectationCollection.h +# End Source File +# Begin Source File + +SOURCE="..\..\mockpp\chainable-template.h" +# End Source File +# Begin Source File + +SOURCE=..\..\mockpp\ChainableMockObject.h +# End Source File +# Begin Source File + +SOURCE=..\..\mockpp\Expectation.h +# End Source File +# Begin Source File + +SOURCE=..\..\mockpp\ExpectationBoundary.h +# End Source File +# Begin Source File + +SOURCE=..\..\mockpp\ExpectationConglomeration.h +# End Source File +# Begin Source File + +SOURCE=..\..\mockpp\ExpectationCounter.h +# End Source File +# Begin Source File + +SOURCE=..\..\mockpp\ExpectationList.h +# End Source File +# Begin Source File + +SOURCE=..\..\mockpp\ExpectationMap.h +# End Source File +# Begin Source File + +SOURCE=..\..\mockpp\ExpectationSegment.h +# End Source File +# Begin Source File + +SOURCE=..\..\mockpp\ExpectationSet.h +# End Source File +# Begin Source File + +SOURCE=..\..\mockpp\ExpectationValue.h +# End Source File +# Begin Source File + +SOURCE=..\..\mockpp\MixedMockObject.h +# End Source File +# Begin Source File + +SOURCE=..\..\mockpp\MockObject.h +# End Source File +# Begin Source File + +SOURCE=..\..\mockpp\mockpp.h +# End Source File +# Begin Source File + +SOURCE="..\..\mockpp\mockpp_config-bcb5.h" +# End Source File +# Begin Source File + +SOURCE="..\..\mockpp\mockpp_config-msvc_60_70.h" +# End Source File +# Begin Source File + +SOURCE="..\..\mockpp\mockpp_config-msvc_71.h" +# End Source File +# Begin Source File + +SOURCE=..\..\mockpp\mockpp_config.h +# End Source File +# Begin Source File + +SOURCE=..\..\mockpp\ReturnObjectList.h +# End Source File +# Begin Source File + +SOURCE=..\..\mockpp\SelfDescribing.h +# End Source File +# Begin Source File + +SOURCE=..\..\mockpp\Throwable.h +# End Source File +# Begin Source File + +SOURCE=..\..\mockpp\ThrowableList.h +# End Source File +# Begin Source File + +SOURCE=..\..\mockpp\TrackingCounter.h +# End Source File +# Begin Source File + +SOURCE=..\..\mockpp\Verifiable.h +# End Source File +# Begin Source File + +SOURCE=..\..\mockpp\VerifiableList.h +# End Source File +# Begin Source File + +SOURCE=..\..\mockpp\VerifyingTestCaller.h +# End Source File +# Begin Source File + +SOURCE=..\..\mockpp\VerifyingTestCase.h +# End Source File +# Begin Source File + +SOURCE="..\..\mockpp\visitable-template.h" +# End Source File +# Begin Source File + +SOURCE=..\..\mockpp\VisitableMockObject.h +# End Source File +# Begin Source File + +SOURCE=..\..\mockpp\VisitableMockObject_macro.h +# End Source File +# Begin Source File + +SOURCE=..\..\mockpp\VisitableMockObject_template.h +# End Source File # End Group # End Target # End Project - |
From: Ewald A. <ewa...@us...> - 2005-04-02 20:52:17
|
Update of /cvsroot/mockpp/mockpp/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8234/mockpp Modified Files: Makefile.am Log Message: update config files in use Index: Makefile.am =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/Makefile.am,v retrieving revision 1.76 retrieving revision 1.77 diff -u -d -r1.76 -r1.77 --- Makefile.am 2 Apr 2005 20:45:28 -0000 1.76 +++ Makefile.am 2 Apr 2005 20:52:08 -0000 1.77 @@ -31,7 +31,6 @@ mockpp_config-bcb5.h \ mockpp_config-msvc_60_70.h \ mockpp_config-msvc_71.h \ - mockpp_config-cygwin.h \ visitable-template.h \ visitable-template.raw \ chainable-template.h \ @@ -39,7 +38,7 @@ CLEANFILES = *.~* *.~~* *~ mockpp_config.h *.old -.PHONY: chainer mockpp_config-bcb5.h mockpp_config-cygwin.h mockpp_config-msvc.h mockpp_config.h metrics templates +.PHONY: chainer mockpp_config-bcb5.h mockpp_config-msvc_60_70.h mockpp_config-msvc_71.h mockpp_config.h metrics templates metrics: TODAY=`date +%y%m%d`; \ |
From: Ewald A. <ewa...@us...> - 2005-04-02 20:46:14
|
Update of /cvsroot/mockpp/mockpp/mockpp/builder In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3635/mockpp/builder Modified Files: InvocationMockerBuilder.h Log Message: more fixes for msvc6 Index: InvocationMockerBuilder.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/builder/InvocationMockerBuilder.h,v retrieving revision 1.34 retrieving revision 1.35 diff -u -d -r1.34 -r1.35 --- InvocationMockerBuilder.h 30 Jan 2005 12:09:17 -0000 1.34 +++ InvocationMockerBuilder.h 2 Apr 2005 20:45:29 -0000 1.35 @@ -144,7 +144,7 @@ * @param matcher the matcher object * @return the builder object */ - virtual InvocationMockerBuilder &addMatcher( const MatcherHolder<I> &matcher ) + virtual MatchBuilder<R, I> &addMatcher( const MatcherHolder<I> &matcher ) // virtual InvocationMockerBuilder &addMatcher( const MatcherHolder<I> &matcher ) { mocker->addMatcher( matcher ); return *this; |
From: Ewald A. <ewa...@us...> - 2005-04-02 20:46:14
|
Update of /cvsroot/mockpp/mockpp/mockpp/chaining In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3635/mockpp/chaining Modified Files: AbstractDynamicChainingMock.h CoreMock.h FIFOInvocationDispatcher.h InvocationMocker.h LIFOInvocationDispatcher.h Log Message: more fixes for msvc6 Index: InvocationMocker.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/InvocationMocker.h,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- InvocationMocker.h 2 Apr 2005 13:46:29 -0000 1.29 +++ InvocationMocker.h 2 Apr 2005 20:45:31 -0000 1.30 @@ -200,7 +200,7 @@ * @return The current content of the buffer data */ virtual String describeTo( String &result, - const InvocationMockerBase<R,I>::List &matchers, + const typename std::vector<InvocationMatcher<I>*> &matchers, // const InvocationMockerBase<R,I>::List &matchers Stub<R, I> *stub, const String &name ) const = 0; @@ -212,7 +212,7 @@ * @return The current content of the buffer data */ String describeTo( String &result, - const InvocationMockerBase<R,I>::List &matchers, + const typename std::vector<InvocationMatcher<I>*> &matchers, TypelessStub<R>* stub, const String &name ) const { @@ -248,7 +248,7 @@ * @return The current content of the buffer data */ virtual String describeTo( String &result, - const List &matchers, + const typename std::vector<InvocationMatcher<I>*> &matchers, Stub<R, I> *stub, const String &name ) const { @@ -303,7 +303,7 @@ * @return The current content of the buffer data */ String describeTo( String &result, - const List &matchers, + const typename std::vector<InvocationMatcher<I>*> &matchers, Stub<R, I> *stub, const String &name ) const { @@ -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 ) \ - : InvocationMockerBase<void, I>( in_describer, \ - new ::mockpp::TypelessStubAdapter<void, I>(new ::mockpp::VoidStub)) \ +mockpp::InvocationMocker<void, I >::InvocationMocker<void, I >(\ + ::mockpp::AutoPointer<mockpp::InvocationMockerBase<void, I >::DescriberBase> in_describer ) \ + : InvocationMockerBase<void, I >( in_describer, \ + 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 ); \ Index: CoreMock.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/CoreMock.h,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- CoreMock.h 25 Mar 2005 16:30:29 -0000 1.12 +++ CoreMock.h 2 Apr 2005 20:45:31 -0000 1.13 @@ -133,14 +133,14 @@ */ #define MOCKPP_COREMOCK_PTI_DECL(I) \ template<> \ -void mockpp::CoreMock<void, I>::invoke( const I &invocation ); +void mockpp::CoreMock<void, I >::invoke( const I &invocation ); /** Implement specialized methods for mockpp::CoreMock. * Neccessary for compiler with weak template capabilities. */ #define MOCKPP_COREMOCK_PTI_IMPL(I) \ template<> \ -void mockpp::CoreMock<void, I>::invoke( const I &invocation ) \ +void mockpp::CoreMock<void, I >::invoke( const I &invocation ) \ { \ mockInvocation( invocation ); \ } Index: LIFOInvocationDispatcher.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/LIFOInvocationDispatcher.h,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- LIFOInvocationDispatcher.h 25 Mar 2005 16:30:29 -0000 1.11 +++ LIFOInvocationDispatcher.h 2 Apr 2005 20:45:31 -0000 1.12 @@ -115,14 +115,14 @@ */ #define MOCKPP_LIFOINVOCATIONDISPATCHER_PTI_DECL(I) \ template<> \ -void mockpp::LIFOInvocationDispatcher<void, I>::dispatch( const I &invocation ); +void mockpp::LIFOInvocationDispatcher<void, I >::dispatch( const I &invocation ); /** Implement specialized methods for mockpp::LIFOInvocationDispatcher. * Neccessary for compiler with weak template capabilities. */ #define MOCKPP_LIFOINVOCATIONDISPATCHER_PTI_IMPL(I) \ template<> \ -void mockpp::LIFOInvocationDispatcher<void, I>::dispatch( const I &invocation ) \ +void mockpp::LIFOInvocationDispatcher<void, I >::dispatch( const I &invocation ) \ { \ Iterator it = this->invokables.rbegin(); \ Iterator end = this->invokables.rend(); \ Index: AbstractDynamicChainingMock.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/AbstractDynamicChainingMock.h,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- AbstractDynamicChainingMock.h 25 Mar 2005 16:30:28 -0000 1.23 +++ AbstractDynamicChainingMock.h 2 Apr 2005 20:45:30 -0000 1.24 @@ -82,7 +82,7 @@ return false; } -#if defined(__BORLANDC__) || defined(_MSC_VER) +#if defined(__BORLANDC__) /** Appends the description of this object to the buffer. * @param buffer The buffer that the description is appended to. * @return The current content of the buffer data @@ -92,9 +92,36 @@ return InvocationMocker<R, I>::DescriberBase::describeTo(buffer); } #else - using InvocationMocker<R, I>::DescriberBase::describeTo; +#define MOCKPP_NEED_USING #endif +#if defined(_MSC_VER) + /** Appends the description of this object to the buffer. + * @param result The buffer that the description is appended to. + * @param matchers list of matcher objects + * @param stub pointer to the stub + * @param name name of the object + * @return The current content of the buffer data + */ + String describeTo( String &result, + const typename std::vector<InvocationMatcher<I>*> &matchers, + TypelessStub<R>* stub, + const String &name ) const + { + return InvocationMocker<R, I>::DescriberBase::describeTo( result, + matchers, + stub, + name ); + } +#else +#define MOCKPP_NEED_USING +#endif + +#ifdef MOCKPP_NEED_USING + using InvocationMocker<R, I>::DescriberBase::describeTo; // use only once +#endif +#undef MOCKPP_NEED_USING + /** Appends the description of this object to the buffer. * @param result The buffer that the description is appended to. * @param matchers list of matcher objects @@ -103,7 +130,7 @@ * @return The current content of the buffer data */ virtual String describeTo( String &result, - const typename InvocationMocker<R, I>::List &matchers, + const typename std::vector<InvocationMatcher<I>*> &matchers, Stub<R, I> *stub, const String &name ) const { @@ -323,14 +350,14 @@ */ #define MOCKPP_ABSTRACTDYNAMICCHAININGMOCK_PTI_DECL(I) \ template<> \ -void mockpp::AbstractDynamicChainingMock<void, I>::mockInvocation( const I &invocation ); +void mockpp::AbstractDynamicChainingMock<void, I >::mockInvocation( const I &invocation ); /** Implement specialized methods for mockpp::AbstractDynamicChainingMock. * Neccessary for compiler with weak template capabilities. */ #define MOCKPP_ABSTRACTDYNAMICCHAININGMOCK_PTI_IMPL(I) \ template<> \ -void mockpp::AbstractDynamicChainingMock<void, I>::mockInvocation( const I &invocation ) \ +void mockpp::AbstractDynamicChainingMock<void, I >::mockInvocation( const I &invocation ) \ { \ if ( this->failure.get() != 0 ) \ throw *this->failure.get(); \ @@ -342,10 +369,10 @@ \ catch ( const AssertionFailedError & assertion ) \ { \ - DynamicChainingMockError<void, I> dme( this, \ - invocation, \ - this->invocationDispatcher.get(), \ - assertion.getMessage() ); \ + DynamicChainingMockError<void, I > dme( this, \ + invocation, \ + this->invocationDispatcher.get(), \ + assertion.getMessage() ); \ this->failure.reset( new AssertionFailedError(__LINE__, __FILE__, dme.getMessage())); \ throw *this->failure.get(); \ } \ Index: FIFOInvocationDispatcher.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/FIFOInvocationDispatcher.h,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- FIFOInvocationDispatcher.h 25 Mar 2005 16:30:29 -0000 1.11 +++ FIFOInvocationDispatcher.h 2 Apr 2005 20:45:31 -0000 1.12 @@ -115,14 +115,14 @@ */ #define MOCKPP_FIFOINVOCATIONDISPATCHER_PTI_DECL(I) \ template<> \ -void mockpp::FIFOInvocationDispatcher<void, I>::dispatch( const I &invocation ); +void mockpp::FIFOInvocationDispatcher<void, I >::dispatch( const I &invocation ); /** Implement specialized methods for mockpp::FIFOInvocationDispatcher. * Neccessary for compiler with weak template capabilities. */ #define MOCKPP_FIFOINVOCATIONDISPATCHER_PTI_IMPL(I) \ template<> \ -void mockpp::FIFOInvocationDispatcher<void, I>::dispatch( const I &invocation ) \ +void mockpp::FIFOInvocationDispatcher<void, I >::dispatch( const I &invocation ) \ { \ Iterator it = this->invokables.begin(); \ Iterator end = this->invokables.end(); \ |