mockpp-commits Mailing List for Mock Objects for C++ (Page 41)
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-06 20:11:37
|
Update of /cvsroot/mockpp/mockpp/mockpp/constraint In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8978/mockpp/constraint Modified Files: ConstraintList.h Log Message: improved error message Index: ConstraintList.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/constraint/ConstraintList.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ConstraintList.h 24 Mar 2005 20:51:29 -0000 1.2 +++ ConstraintList.h 6 Apr 2005 20:11:28 -0000 1.3 @@ -279,8 +279,8 @@ MOCKPP_ASSERT_TRUE_MESSAGE(fmt, constraints.size() > pos); String s; - fmt = i18n(MOCKPP_PCHAR("%1 constraint[%2] does not match: %3.")); - fmt << this->getVerifiableName() << pos << constraints[pos]->describeTo(s); + fmt = i18n(MOCKPP_PCHAR("%1 added constraint[%2] does not match: <%3> != %4")); + fmt << this->getVerifiableName() << pos << constraints[pos]->describeTo(s) << actualItem; MOCKPP_ASSERT_TRUE_MESSAGE(fmt, constraints[pos]->eval(actualItem)); } |
From: Ewald A. <ewa...@us...> - 2005-04-06 20:11:37
|
Update of /cvsroot/mockpp/mockpp/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8978/mockpp Modified Files: ExpectationList.h Log Message: improved error message Index: ExpectationList.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/ExpectationList.h,v retrieving revision 1.36 retrieving revision 1.37 diff -u -d -r1.36 -r1.37 --- ExpectationList.h 27 Feb 2005 11:48:14 -0000 1.36 +++ ExpectationList.h 6 Apr 2005 20:11:28 -0000 1.37 @@ -240,8 +240,8 @@ MOCKPP_ASSERT_TRUE_MESSAGE(fmt, expectedItems.size() >= size); - fmt = i18n(MOCKPP_PCHAR("%1 added item does not match. %2 != %3.")); - fmt << this->getVerifiableName() << expectedItems[(size - 1)] << actualItem; + fmt = i18n(MOCKPP_PCHAR("%1 added item[%2] does not match. %3 != %4.")); + fmt << this->getVerifiableName() << size << expectedItems[(size - 1)] << actualItem; assertEquals(fmt, actualItem, expectedItems[(size - 1)]); } |
From: Ewald A. <ewa...@us...> - 2005-04-06 19:37:46
|
Update of /cvsroot/mockpp/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22510 Modified Files: TODO Log Message: update Index: TODO =================================================================== RCS file: /cvsroot/mockpp/mockpp/TODO,v retrieving revision 1.40 retrieving revision 1.41 diff -u -d -r1.40 -r1.41 --- TODO 24 Mar 2005 18:56:59 -0000 1.40 +++ TODO 6 Apr 2005 19:37:38 -0000 1.41 @@ -1,4 +1,6 @@ +Anzeigen: added item xx. does not match + DOC: ---- |
From: Ewald A. <ewa...@us...> - 2005-04-06 19:35:55
|
Update of /cvsroot/mockpp/mockpp/mockpp/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21800/mockpp/tests Modified Files: MixedMockObject_5_test.cpp Log Message: patch msvc6 Index: MixedMockObject_5_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/MixedMockObject_5_test.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- MixedMockObject_5_test.cpp 3 Apr 2005 18:32:54 -0000 1.4 +++ MixedMockObject_5_test.cpp 6 Apr 2005 19:35:44 -0000 1.5 @@ -41,7 +41,8 @@ #include <mockpp/MixedMockObject.h> #include <mockpp/util/AssertMo.h> -#include <mockpp/chaining/ChainingMockObjectSupport.h> +#include <mockpp/chaining/ChainingMockObjectSupport.h> +#include <mockpp/chaining/mockpp_pti.h> #include <mockpp/constraint/IsEqual.h> #include <mockpp/constraint/IsNot.h> @@ -50,6 +51,9 @@ #include <cppunit/extensions/HelperMacros.h> + +//MOCKPP_TYPELESSSTUBADAPTER_PTI_IMPL(xx) + class MixedMockObject_5_test : public CppUnit::TestFixture { |
From: Ewald A. <ewa...@us...> - 2005-04-06 19:35:32
|
Update of /cvsroot/mockpp/mockpp/mockpp/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21700/mockpp/tests Modified Files: InvocationMocker_test.cpp Log Message: patch msvc6 Index: InvocationMocker_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/InvocationMocker_test.cpp,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- InvocationMocker_test.cpp 4 Apr 2005 08:57:33 -0000 1.33 +++ InvocationMocker_test.cpp 6 Apr 2005 19:35:23 -0000 1.34 @@ -53,7 +53,7 @@ typedef mockpp::Invocation5<CA, CB, CC, CD, CE> GetterInvocation; -MOCKPP_PTI_DECLARE(SetterInvocation) +MOCKPP_PTI_IMPLEMENT(SetterInvocation) namespace { @@ -361,7 +361,4 @@ } // namespace -MOCKPP_PTI_IMPLEMENT(SetterInvocation) - - #endif // HAVE_CPPUNIT |
From: Ewald A. <ewa...@us...> - 2005-04-06 19:33:55
|
Update of /cvsroot/mockpp/mockpp/mockpp/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20545/mockpp/tests Modified Files: ChainableMockObject_1_void_test.cpp Log Message: patch msvc6 Index: ChainableMockObject_1_void_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/ChainableMockObject_1_void_test.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- ChainableMockObject_1_void_test.cpp 3 Apr 2005 18:32:53 -0000 1.8 +++ ChainableMockObject_1_void_test.cpp 6 Apr 2005 19:33:43 -0000 1.9 @@ -46,6 +46,11 @@ #include <mockpp/chaining/Invocation.h> +typedef mockpp::Invocation1<unsigned> TheInvocation; + +MOCKPP_PTI_IMPLEMENT(TheInvocation) + + class ChainableMockObject_1_void_test : public CppUnit::TestFixture { public: @@ -62,10 +67,6 @@ }; - -MOCKPP_PTI_IMPLEMENT(mockpp::Invocation1<unsigned>) - - CPPUNIT_TEST_SUITE_REGISTRATION(ChainableMockObject_1_void_test); |
From: Ewald A. <ewa...@us...> - 2005-04-06 19:31:29
|
Update of /cvsroot/mockpp/mockpp/mockpp/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18663/mockpp/tests Modified Files: mockpp_pti_test.cpp Log Message: changed macro Index: mockpp_pti_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/mockpp_pti_test.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- mockpp_pti_test.cpp 4 Apr 2005 08:57:34 -0000 1.3 +++ mockpp_pti_test.cpp 6 Apr 2005 19:31:20 -0000 1.4 @@ -48,13 +48,17 @@ typedef mockpp::Invocation1<int> Setter1Invocation; - + +#if 1 +MOCKPP_PTI_IMPLEMENT(Setter1Invocation) +#else MOCKPP_TYPELESSSTUBADAPTER_PTI_IMPL(Setter1Invocation) MOCKPP_FIFOINVOCATIONDISPATCHER_PTI_IMPL(Setter1Invocation) MOCKPP_LIFOINVOCATIONDISPATCHER_PTI_IMPL(Setter1Invocation) MOCKPP_INVOCATIONMOCKER_PTI_IMPL(Setter1Invocation) MOCKPP_ABSTRACTDYNAMICCHAININGMOCK_PTI_IMPL(Setter1Invocation) MOCKPP_COREMOCK_PTI_IMPL(Setter1Invocation) +#endif namespace { |
From: Ewald A. <ewa...@us...> - 2005-04-06 19:30:19
|
Update of /cvsroot/mockpp/mockpp/mockpp/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18292/mockpp/tests Modified Files: InvocationMockerBuilder_test.cpp Log Message: patch msvc6 Index: InvocationMockerBuilder_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/InvocationMockerBuilder_test.cpp,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- InvocationMockerBuilder_test.cpp 3 Apr 2005 18:32:54 -0000 1.27 +++ InvocationMockerBuilder_test.cpp 6 Apr 2005 19:30:10 -0000 1.28 @@ -58,6 +58,10 @@ typedef mockpp::Invocation0 Getter0Invocation; typedef mockpp::Invocation0 Setter0Invocation; + +MOCKPP_TYPELESSSTUBADAPTER_PTI_IMPL(Setter0Invocation) +MOCKPP_TYPELESSSTUBADAPTER_PTI_IMPL(Setter5Invocation) + namespace { |
From: Ewald A. <ewa...@us...> - 2005-04-06 19:29:51
|
Update of /cvsroot/mockpp/mockpp/mockpp/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18047/mockpp/tests Modified Files: CoreMock_test.cpp Log Message: patch msvc6 Index: CoreMock_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/CoreMock_test.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- CoreMock_test.cpp 3 Apr 2005 18:32:54 -0000 1.20 +++ CoreMock_test.cpp 6 Apr 2005 19:29:42 -0000 1.21 @@ -50,9 +50,9 @@ typedef mockpp::Invocation0 VoidInvocation; -MOCKPP_COREMOCK_PTI_IMPL(VoidInvocation) -MOCKPP_ABSTRACTDYNAMICCHAININGMOCK_PTI_IMPL(VoidInvocation) MOCKPP_INVOCATIONMOCKER_PTI_DECL(VoidInvocation) +MOCKPP_ABSTRACTDYNAMICCHAININGMOCK_PTI_IMPL(VoidInvocation) +MOCKPP_COREMOCK_PTI_IMPL(VoidInvocation) namespace { |
From: Ewald A. <ewa...@us...> - 2005-04-06 19:29:11
|
Update of /cvsroot/mockpp/mockpp/mockpp/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17212/mockpp/tests Modified Files: LIFOInvocationDispatcher_test.cpp FIFOInvocationDispatcher_test.cpp Log Message: patch msvc6 Index: LIFOInvocationDispatcher_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/LIFOInvocationDispatcher_test.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- LIFOInvocationDispatcher_test.cpp 25 Mar 2005 17:20:35 -0000 1.16 +++ LIFOInvocationDispatcher_test.cpp 6 Apr 2005 19:28:59 -0000 1.17 @@ -46,6 +46,14 @@ #include <cppunit/extensions/HelperMacros.h> +typedef mockpp::Invocation0 GetterInvocation; +typedef mockpp::Invocation0 VoidInvocation; + + +MOCKPP_TYPELESSSTUBADAPTER_PTI_IMPL(VoidInvocation) +MOCKPP_LIFOINVOCATIONDISPATCHER_PTI_IMPL(VoidInvocation) + + namespace { @@ -70,10 +78,6 @@ CPPUNIT_TEST_SUITE_REGISTRATION(LIFOInvocationDispatcher_test); -typedef mockpp::Invocation0 GetterInvocation; -typedef mockpp::Invocation0 VoidInvocation; - - template <typename R, typename I> class TestInvokable : public mockpp::Invokable<R,I> { @@ -148,23 +152,30 @@ }; -template <typename R, typename I> -class LIFO : public mockpp::LIFOInvocationDispatcher<R,I> -{ - public: - - virtual R doDispatch( const I &invocation ) - { - return dispatch(invocation); - } - - virtual void doVoidDispatch( const I &invocation ) - { - dispatch(invocation); - } -}; - - +template <typename R, typename I> +class LIFO : public mockpp::LIFOInvocationDispatcher<R,I> +{ + public: + + virtual R doDispatch( const I &invocation ) + { + return dispatch(invocation); + } +}; + + +template <typename I> +class VoidLIFO : public mockpp::LIFOInvocationDispatcher<void, I> +{ + public: + + virtual void doVoidDispatch( const I &invocation ) + { + dispatch(invocation); + } +}; + + void LIFOInvocationDispatcher_test::test_dispatch() { GetterInvocation ginv(MOCKPP_PCHAR("TestClass::getProp")); @@ -197,7 +208,7 @@ { VoidInvocation ginv(MOCKPP_PCHAR("TestClass::voidProp")); - LIFO<void,VoidInvocation> id; + VoidLIFO<VoidInvocation> id; typedef TestVoidInvokable<VoidInvocation> TInvok; TInvok *ti1 = new TInvok(); Index: FIFOInvocationDispatcher_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/FIFOInvocationDispatcher_test.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- FIFOInvocationDispatcher_test.cpp 25 Mar 2005 17:20:35 -0000 1.17 +++ FIFOInvocationDispatcher_test.cpp 6 Apr 2005 19:28:59 -0000 1.18 @@ -46,6 +46,14 @@ #include <cppunit/extensions/HelperMacros.h> +typedef mockpp::Invocation0 GetterInvocation; +typedef mockpp::Invocation0 VoidInvocation; + + +MOCKPP_TYPELESSSTUBADAPTER_PTI_IMPL(VoidInvocation) +MOCKPP_FIFOINVOCATIONDISPATCHER_PTI_IMPL(VoidInvocation) + + namespace { @@ -70,10 +78,6 @@ CPPUNIT_TEST_SUITE_REGISTRATION(FIFOInvocationDispatcher_test); -typedef mockpp::Invocation0 GetterInvocation; -typedef mockpp::Invocation0 VoidInvocation; - - template <typename R, typename I> class TestInvokable : public mockpp::Invokable<R,I> { @@ -148,23 +152,30 @@ }; -template <typename R, typename I> -class FIFO : public mockpp::FIFOInvocationDispatcher<R,I> -{ - public: - - virtual R doDispatch( const I &invocation ) - { - return dispatch(invocation); - } - - virtual void doVoidDispatch( const I &invocation ) - { - dispatch(invocation); - } -}; - - +template <typename R, typename I> +class FIFO : public mockpp::FIFOInvocationDispatcher<R,I> +{ + public: + + virtual R doDispatch( const I &invocation ) + { + return dispatch(invocation); + } +}; + + +template <typename I> +class VoidFIFO : public mockpp::FIFOInvocationDispatcher<void, I> +{ + public: + + virtual void doVoidDispatch( const I &invocation ) + { + dispatch(invocation); + } +}; + + void FIFOInvocationDispatcher_test::test_dispatch() { GetterInvocation ginv(MOCKPP_PCHAR("TestClass::getProp")); @@ -197,7 +208,7 @@ { VoidInvocation ginv(MOCKPP_PCHAR("TestClass::voidProp")); - FIFO<void,VoidInvocation> id; + VoidFIFO<VoidInvocation> id; typedef TestVoidInvokable<VoidInvocation> TInvok; TInvok *ti1 = new TInvok(); |
From: Ewald A. <ewa...@us...> - 2005-04-06 19:28:44
|
Update of /cvsroot/mockpp/mockpp/bcb5 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16725/bcb5 Modified Files: mockpp.bpr jmock_test.bpr Log Message: automatic changes Index: mockpp.bpr =================================================================== RCS file: /cvsroot/mockpp/mockpp/bcb5/mockpp.bpr,v retrieving revision 1.36 retrieving revision 1.37 diff -u -d -r1.36 -r1.37 --- mockpp.bpr 3 Apr 2005 18:32:42 -0000 1.36 +++ mockpp.bpr 6 Apr 2005 19:28:27 -0000 1.37 @@ -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=".;"/> + <PATHCPP value=".;..\mockpp\util;..\mockpp\compat;..\mockpp\chaining;..\mockpp;..\mockpp\builder;..\mockpp\stub;..\mockpp\constraint;..\mockpp\matcher"/> <PATHPAS value=".;"/> <PATHRC value=".;"/> <PATHASM value=".;"/> Index: jmock_test.bpr =================================================================== RCS file: /cvsroot/mockpp/mockpp/bcb5/jmock_test.bpr,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- jmock_test.bpr 24 Mar 2005 20:51:27 -0000 1.20 +++ jmock_test.bpr 6 Apr 2005 19:28:27 -0000 1.21 @@ -70,7 +70,8 @@ c:\tmp\compile\mockpp_25\\MockObject_test.obj c:\tmp\compile\mockpp_25\\StubBuilder_test.obj c:\tmp\compile\mockpp_25\\TypelessStubSequence_test.obj - c:\tmp\compile\mockpp_25\\ChainingMockObjectSupport_test.obj"/> + c:\tmp\compile\mockpp_25\\ChainingMockObjectSupport_test.obj + c:\tmp\compile\mockpp_25\\mockpp_pti_test.obj"/> <RESFILES value=""/> <DEFFILE value=""/> <RESDEPEN value="$(RESFILES)"/> |
From: Ewald A. <ewa...@us...> - 2005-04-06 19:27:22
|
Update of /cvsroot/mockpp/mockpp/mockpp/chaining In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15855/mockpp/chaining Modified Files: AbstractDynamicChainingMock.h Log Message: cleanup Index: AbstractDynamicChainingMock.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/AbstractDynamicChainingMock.h,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- AbstractDynamicChainingMock.h 4 Apr 2005 08:57:33 -0000 1.27 +++ AbstractDynamicChainingMock.h 6 Apr 2005 19:27:13 -0000 1.28 @@ -46,6 +46,7 @@ namespace mockpp { + /** Implementation of a chaining mock. * @internal @@ -82,47 +83,6 @@ return false; } -#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 - */ - virtual String describeTo( String &buffer ) const - { - return InvocationMocker<R, I>::DescriberBase::describeTo(buffer); - } -#else -#define MOCKPP_NEED_USING -#endif - -#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 - * @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. |
From: Ewald A. <ewa...@us...> - 2005-04-06 19:26:50
|
Update of /cvsroot/mockpp/mockpp/mockpp/builder In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15647/mockpp/builder Modified Files: MatchBuilder.h Log Message: patch msvc6 Index: MatchBuilder.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/builder/MatchBuilder.h,v retrieving revision 1.35 retrieving revision 1.36 diff -u -d -r1.35 -r1.36 --- MatchBuilder.h 11 Mar 2005 00:24:54 -0000 1.35 +++ MatchBuilder.h 6 Apr 2005 19:26:38 -0000 1.36 @@ -172,8 +172,12 @@ getMocker() ->addMatcher( new InvokedAfterMatcher<I>( priorCallRecorder.get(), priorCallDescription ) ); - if (priorCallBuilder != 0) - priorCallBuilder->match( priorCallRecorder ); + if (priorCallBuilder != 0) +#if defined(_MSC_VER) && (_MSC_VER <= 1300) + priorCallBuilder->match( (TypelessMatcher*)priorCallRecorder.release() ); +#else + priorCallBuilder->match(priorCallRecorder); +#endif else idTable.addPendingRecorder(priorCallID, priorCallRecorder); } |
From: Ewald A. <ewa...@us...> - 2005-04-06 19:26:08
|
Update of /cvsroot/mockpp/mockpp/mockpp/examples/tutorial In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15110/mockpp/examples/tutorial Modified Files: chainmock.cpp Log Message: patch msvc6 Index: chainmock.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/examples/tutorial/chainmock.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- chainmock.cpp 25 Mar 2005 17:20:34 -0000 1.9 +++ chainmock.cpp 6 Apr 2005 19:25:56 -0000 1.10 @@ -23,10 +23,14 @@ #include <iostream> using namespace mockpp; + + +typedef mockpp::Invocation1<std::string> InvocationString; +typedef mockpp::Invocation1<unsigned> InvocationUInt; -MOCKPP_PTI_DECLARE(mockpp::Invocation0); -MOCKPP_PTI_DECLARE(mockpp::Invocation1<std::string>); -MOCKPP_PTI_DECLARE(mockpp::Invocation1<unsigned>); +MOCKPP_PTI_IMPLEMENT(mockpp::Invocation0); +MOCKPP_PTI_IMPLEMENT(InvocationString); +MOCKPP_PTI_IMPLEMENT(InvocationUInt); class ChainMock : public Interface @@ -132,8 +136,5 @@ return 0; } -MOCKPP_PTI_IMPLEMENT(mockpp::Invocation0); -MOCKPP_PTI_IMPLEMENT(mockpp::Invocation1<std::string>); -MOCKPP_PTI_IMPLEMENT(mockpp::Invocation1<unsigned>); |
From: Ewald A. <ewa...@us...> - 2005-04-06 19:25:25
|
Update of /cvsroot/mockpp/mockpp/mockpp/examples/tutorial In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14521/mockpp/examples/tutorial Modified Files: visitmock.cpp Log Message: patch msvc6 Index: visitmock.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/examples/tutorial/visitmock.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- visitmock.cpp 5 Apr 2005 18:44:05 -0000 1.12 +++ visitmock.cpp 6 Apr 2005 19:25:16 -0000 1.13 @@ -73,13 +73,22 @@ read_controller.addReturnValue("record-2"); read_controller.addReturnValue("record-3"); - // processing is not exactly defined - mock.calculate(eq<unsigned>((unsigned)5, (unsigned)5)); - mock.calculate(eq<unsigned>(5, 5)); + // processing is not exactly defined +#if defined(_MSC_VER) && _MSC_VER <= 1300 + mock.calculate(new mockpp::IsCloseTo<unsigned>(5, 5)); + mock.calculate(new mockpp::IsCloseTo<unsigned>(5, 5)); + mock.calculate(new mockpp::IsCloseTo<unsigned>(5, 5)); + calculate_controller.addResponseValue(10, new mockpp::IsCloseTo<unsigned>(2, 2)); + calculate_controller.addResponseValue(20, new mockpp::IsCloseTo<unsigned>(4, 2)); + calculate_controller.addResponseValue(30, new mockpp::IsCloseTo<unsigned>(6, 2)); +#else + mock.calculate(eq<unsigned>(5, 5)); + mock.calculate(eq<unsigned>(5, 5)); mock.calculate(eq<unsigned>(5, 5)); - calculate_controller.addResponseValue(10, eq<unsigned>(2, 2)); - calculate_controller.addResponseValue(20, eq<unsigned>(4, 2)); - calculate_controller.addResponseValue(30, eq<unsigned>(6, 2)); + calculate_controller.addResponseValue(10, eq<unsigned>(2, 2)); + calculate_controller.addResponseValue(20, eq<unsigned>(4, 2)); + calculate_controller.addResponseValue(30, eq<unsigned>(6, 2)); +#endif // record program flow while writing data mock.open("file1.lst"); |
From: Ewald A. <ewa...@us...> - 2005-04-06 19:24:17
|
Update of /cvsroot/mockpp/mockpp/msvc6/mockpp/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13382/msvc6/mockpp/tests Modified Files: mock_test.dsp Log Message: Index: mock_test.dsp =================================================================== RCS file: /cvsroot/mockpp/mockpp/msvc6/mockpp/tests/mock_test.dsp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- mock_test.dsp 3 Apr 2005 19:11:27 -0000 1.4 +++ mock_test.dsp 6 Apr 2005 19:24:08 -0000 1.5 @@ -1,32 +1,31 @@ # Microsoft Developer Studio Project File - Name="mock_test" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** +# ** NICHT BEARBEITEN ** # TARGTYPE "Win32 (x86) Console Application" 0x0103 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 [...5558 lines suppressed...] + {$(INCLUDE)}"cppunit\portability\CppUnitSet.h"\ + {$(INCLUDE)}"cppunit\portability\CppUnitVector.h"\ + {$(INCLUDE)}"cppunit\SourceLine.h"\ + {$(INCLUDE)}"cppunit\Test.h"\ + {$(INCLUDE)}"cppunit\TestAssert.h"\ + {$(INCLUDE)}"cppunit\TestCaller.h"\ + {$(INCLUDE)}"cppunit\TestCase.h"\ + {$(INCLUDE)}"cppunit\TestComposite.h"\ + {$(INCLUDE)}"cppunit\TestFixture.h"\ + {$(INCLUDE)}"cppunit\TestLeaf.h"\ + {$(INCLUDE)}"cppunit\TestSuite.h"\ + # End Source File # End Group # Begin Group "Header Files" @@ -523,4 +5501,3 @@ # End Group # End Target # End Project - |
From: Ewald A. <ewa...@us...> - 2005-04-06 19:24:16
|
Update of /cvsroot/mockpp/mockpp/msvc6/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13382/msvc6/mockpp Modified Files: mockpp.dsw Log Message: Index: mockpp.dsw =================================================================== RCS file: /cvsroot/mockpp/mockpp/msvc6/mockpp/mockpp.dsw,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- mockpp.dsw 2 Apr 2005 21:54:48 -0000 1.5 +++ mockpp.dsw 6 Apr 2005 19:24:08 -0000 1.6 @@ -1,9 +1,9 @@ Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! +# WARNUNG: DIESE ARBEITSBEREICHSDATEI DARF NICHT BEARBEITET ODER GELÖSCHT WERDEN! ############################################################################### -Project: "basicmock"=".\examples\tutorial\basicmock.dsp" - Package Owner=<4> +Project: "basicmock"=.\examples\tutorial\basicmock.dsp - Package Owner=<4> Package=<5> {{{ @@ -18,7 +18,7 @@ ############################################################################### -Project: "chainmock"=".\examples\tutorial\chainmock.dsp" - Package Owner=<4> +Project: "chainmock"=.\examples\tutorial\chainmock.dsp - Package Owner=<4> Package=<5> {{{ @@ -33,7 +33,7 @@ ############################################################################### -Project: "cppunit"=".\examples\tutorial\cppunit.dsp" - Package Owner=<4> +Project: "cppunit"=.\examples\tutorial\cppunit.dsp - Package Owner=<4> Package=<5> {{{ @@ -48,7 +48,7 @@ ############################################################################### -Project: "examples"=".\examples\examples.dsp" - Package Owner=<4> +Project: "examples"=.\examples\examples.dsp - Package Owner=<4> Package=<5> {{{ @@ -63,7 +63,19 @@ ############################################################################### -Project: "mock_test"=".\tests\mock_test.dsp" - Package Owner=<4> +Project: "mock_failing_test"=.\tests\mock_failing_test.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "mock_test"=.\tests\mock_test.dsp - Package Owner=<4> Package=<5> {{{ @@ -78,7 +90,7 @@ ############################################################################### -Project: "mockpp"=".\mockpp.dsp" - Package Owner=<4> +Project: "mockpp"=.\mockpp.dsp - Package Owner=<4> Package=<5> {{{ @@ -90,7 +102,7 @@ ############################################################################### -Project: "poormock"=".\examples\tutorial\poormock.dsp" - Package Owner=<4> +Project: "poormock"=.\examples\tutorial\poormock.dsp - Package Owner=<4> Package=<5> {{{ @@ -105,7 +117,7 @@ ############################################################################### -Project: "visitmock"=".\examples\tutorial\visitmock.dsp" - Package Owner=<4> +Project: "visitmock"=.\examples\tutorial\visitmock.dsp - Package Owner=<4> Package=<5> {{{ |
From: Ewald A. <ewa...@us...> - 2005-04-06 19:23:36
|
Update of /cvsroot/mockpp/mockpp/msvc6/mockpp/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13296/msvc6/mockpp/tests Added Files: mock_failing_test.dsp Log Message: new file for failing tests --- NEW FILE: mock_failing_test.dsp --- # Microsoft Developer Studio Project File - Name="mock_failing_test" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** NICHT BEARBEITEN ** # TARGTYPE "Win32 (x86) Console Application" 0x0103 CFG=mock_failing_test - Win32 Release !MESSAGE Dies ist kein gültiges Makefile. Zum Erstellen dieses Projekts mit NMAKE !MESSAGE verwenden Sie den Befehl "Makefile exportieren" und führen Sie den Befehl !MESSAGE !MESSAGE NMAKE /f "mock_failing_test.mak". !MESSAGE !MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben !MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel: !MESSAGE !MESSAGE NMAKE /f "mock_failing_test.mak" CFG="mock_failing_test - Win32 Release" !MESSAGE !MESSAGE Für die Konfiguration stehen zur Auswahl: !MESSAGE !MESSAGE "mock_failing_test - Win32 Release" (basierend auf "Win32 (x86) Console Application") !MESSAGE "mock_failing_test - Win32 Debug" (basierend auf "Win32 (x86) Console Application") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" CPP=cl.exe RSC=rc.exe !IF "$(CFG)" == "mock_failing_test - Win32 Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "C:\tmp\compile\mockpp\tests\Release" # PROP BASE Intermediate_Dir "C:\tmp\compile\mockpp\tests\Release" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "C:\tmp\compile\mockpp\tests\Release" # PROP Intermediate_Dir "C:\tmp\compile\mockpp\tests\Release" # PROP Target_Dir "" MTL=midl.exe # ADD BASE MTL /nologo /tlb"C:\tmp\compile\mockpp\tests\Release\mock_failing_test.tlb" /win32 # ADD MTL /nologo /tlb"C:\tmp\compile\mockpp\tests\Release\mock_failing_test.tlb" /win32 # ADD BASE CPP /nologo /MD /W4 /GR /GX /O2 /I "../.." /I "../../.." /I "$(CPPUNIT_ROOT)/include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "CPPUNIT_DLL" /D "_MBCS" /GF /c # ADD CPP /nologo /MD /W4 /GR /GX /O2 /I "../.." /I "../../.." /I "$(CPPUNIT_ROOT)/include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "CPPUNIT_DLL" /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 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 /subsystem:console /machine:IX86 /pdbtype:sept /libpath:"../../lib" /libpath:"$(CPPUNIT_ROOT)/lib" # SUBTRACT BASE LINK32 /pdb:none # 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 /subsystem:console /machine:IX86 /pdbtype:sept /libpath:"../../lib" /libpath:"$(CPPUNIT_ROOT)/lib" # SUBTRACT LINK32 /pdb:none !ELSEIF "$(CFG)" == "mock_failing_test - Win32 Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "C:\tmp\compile\mockpp\tests\Debug" # PROP BASE Intermediate_Dir "C:\tmp\compile\mockpp\tests\Debug" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "C:\tmp\compile\mockpp\tests\Debug" # PROP Intermediate_Dir "C:\tmp\compile\mockpp\tests\Debug" # PROP Target_Dir "" MTL=midl.exe # ADD BASE MTL /nologo /tlb"c:\tmp\compile\mockpp\tests\Debug\mock_failing_test.tlb" /win32 # ADD MTL /nologo /tlb"c:\tmp\compile\mockpp\tests\Debug\mock_failing_test.tlb" /win32 # ADD BASE CPP /nologo /MDd /W4 /GR /GX /ZI /Od /I "../../.." /I "$(CPPUNIT_ROOT)/include" /D "WIN32" /D "_CONSOLE" /D "CPPUNIT_DLL" /D "_MBCS" /GZ /c # ADD CPP /nologo /MDd /W4 /GR /GX /ZI /Od /I "../../.." /I "$(CPPUNIT_ROOT)/include" /D "WIN32" /D "_CONSOLE" /D "CPPUNIT_DLL" /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 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 /subsystem:console /debug /machine:IX86 /pdbtype:sept /libpath:"../../lib" /libpath:"$(CPPUNIT_ROOT)/lib" # SUBTRACT BASE LINK32 /pdb:none # 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 /subsystem:console /debug /machine:IX86 /pdbtype:sept /libpath:"../../lib" /libpath:"$(CPPUNIT_ROOT)/lib" # SUBTRACT LINK32 /pdb:none !ENDIF # Begin Target # Name "mock_failing_test - Win32 Release" # Name "mock_failing_test - Win32 Debug" # Begin Group "Source Files" # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # Begin Source File SOURCE=..\..\..\mockpp\tests\AbstractDynamicChainingMock_test.cpp # End Source File # Begin Source File SOURCE=..\..\..\mockpp\tests\ChainableMockObject_1_test.cpp # End Source File # Begin Source File SOURCE=..\..\..\mockpp\tests\ChainableMockObject_1_void_test.cpp # End Source File # Begin Source File SOURCE=..\..\..\mockpp\tests\ChainableMockObject_2_test.cpp # End Source File # Begin Source File SOURCE=..\..\..\mockpp\tests\ChainableMockObject_2_void_test.cpp # End Source File # Begin Source File SOURCE=..\..\..\mockpp\tests\ChainableMockObject_3_test.cpp # End Source File # Begin Source File SOURCE=..\..\..\mockpp\tests\ChainableMockObject_3_void_test.cpp # End Source File # Begin Source File SOURCE=..\..\..\mockpp\tests\ChainableMockObject_4_test.cpp # End Source File # Begin Source File SOURCE=..\..\..\mockpp\tests\ChainableMockObject_4_void_test.cpp # End Source File # Begin Source File SOURCE=..\..\..\mockpp\tests\ChainableMockObject_5_test.cpp # End Source File # Begin Source File SOURCE=..\..\..\mockpp\tests\ChainableMockObject_5_void_test.cpp # End Source File # Begin Source File SOURCE=..\..\..\mockpp\tests\ChainableMockObject_test.cpp # End Source File # Begin Source File SOURCE=..\..\..\mockpp\tests\ChainableMockObject_void_test.cpp # End Source File # Begin Source File SOURCE=..\..\..\mockpp\tests\ChainingMockObjectSupport_test.cpp # End Source File # Begin Source File SOURCE=..\..\..\mockpp\tests\CoreMock_test.cpp # End Source File # Begin Source File SOURCE=..\..\..\mockpp\tests\MatchBuilder_test.cpp DEP_CPP_MATCH=\ "..\..\..\mockpp\builder\BuilderNamespace.h"\ "..\..\..\mockpp\builder\IdentityBuilder.h"\ "..\..\..\mockpp\builder\MatchBuilder.h"\ "..\..\..\mockpp\builder\StubBuilder.h"\ "..\..\..\mockpp\chaining\Invocation.h"\ "..\..\..\mockpp\chaining\StubMatchersCollection.h"\ "..\..\..\mockpp\compat\Assert.h"\ "..\..\..\mockpp\compat\AssertionFailedError.h"\ "..\..\..\mockpp\compat\Exception.h"\ "..\..\..\mockpp\compat\Formatter.h"\ "..\..\..\mockpp\constraint\Constraint.h"\ "..\..\..\mockpp\constraint\ConstraintHolder.h"\ "..\..\..\mockpp\constraint\ConstraintSet.h"\ "..\..\..\mockpp\constraint\TypelessConstraint.h"\ "..\..\..\mockpp\matcher\InvocationMatcher.h"\ "..\..\..\mockpp\matcher\InvokedAfterMatcher.h"\ "..\..\..\mockpp\matcher\InvokedBeforeMatcher.h"\ "..\..\..\mockpp\matcher\InvokedRecorder.h"\ "..\..\..\mockpp\matcher\MatcherHolder.h"\ "..\..\..\mockpp\matcher\TypelessMatcher.h"\ "..\..\..\mockpp\mockpp.h"\ "..\..\..\mockpp\mockpp_config-bcb5.h"\ "..\..\..\mockpp\mockpp_config-msvc_60_70.h"\ "..\..\..\mockpp\mockpp_config-msvc_71.h"\ "..\..\..\mockpp\SelfDescribing.h"\ "..\..\..\mockpp\stub\Stub.h"\ "..\..\..\mockpp\stub\StubHolder.h"\ "..\..\..\mockpp\stub\TypelessStub.h"\ "..\..\..\mockpp\stub\VoidStub.h"\ "..\..\..\mockpp\tests\classes_ABCDE.h"\ "..\..\..\mockpp\tests\MyBuilderNamespace.h"\ "..\..\..\mockpp\tests\MyMatchBuilder.h"\ "..\..\..\mockpp\util\AutoPointer.h"\ "..\..\..\mockpp\Verifiable.h"\ {$(INCLUDE)}"cppunit\AdditionalMessage.h"\ {$(INCLUDE)}"cppunit\Asserter.h"\ {$(INCLUDE)}"cppunit\config\config-bcb5.h"\ {$(INCLUDE)}"cppunit\config\config-msvc6.h"\ {$(INCLUDE)}"cppunit\config\CppUnitApi.h"\ {$(INCLUDE)}"cppunit\config\SelectDllLoader.h"\ {$(INCLUDE)}"cppunit\Exception.h"\ {$(INCLUDE)}"cppunit\extensions\AutoRegisterSuite.h"\ {$(INCLUDE)}"cppunit\extensions\ExceptionTestCaseDecorator.h"\ {$(INCLUDE)}"cppunit\extensions\HelperMacros.h"\ {$(INCLUDE)}"cppunit\extensions\TestCaseDecorator.h"\ {$(INCLUDE)}"cppunit\extensions\TestFactory.h"\ {$(INCLUDE)}"cppunit\extensions\TestFactoryRegistry.h"\ {$(INCLUDE)}"cppunit\extensions\TestFixtureFactory.h"\ {$(INCLUDE)}"cppunit\extensions\TestNamer.h"\ {$(INCLUDE)}"cppunit\extensions\TestSuiteBuilderContext.h"\ {$(INCLUDE)}"cppunit\extensions\TestSuiteFactory.h"\ {$(INCLUDE)}"cppunit\extensions\TypeInfoHelper.h"\ {$(INCLUDE)}"cppunit\Message.h"\ {$(INCLUDE)}"cppunit\Portability.h"\ {$(INCLUDE)}"cppunit\portability\CppUnitDeque.h"\ {$(INCLUDE)}"cppunit\portability\CppUnitMap.h"\ {$(INCLUDE)}"cppunit\portability\CppUnitSet.h"\ {$(INCLUDE)}"cppunit\portability\CppUnitVector.h"\ {$(INCLUDE)}"cppunit\SourceLine.h"\ {$(INCLUDE)}"cppunit\Test.h"\ {$(INCLUDE)}"cppunit\TestAssert.h"\ {$(INCLUDE)}"cppunit\TestCaller.h"\ {$(INCLUDE)}"cppunit\TestCase.h"\ {$(INCLUDE)}"cppunit\TestComposite.h"\ {$(INCLUDE)}"cppunit\TestFixture.h"\ {$(INCLUDE)}"cppunit\TestLeaf.h"\ {$(INCLUDE)}"cppunit\TestSuite.h"\ {$(INCLUDE)}"mockpp\matcher\StatelessInvocationMatcher.h"\ # End Source File # Begin Source File SOURCE=..\..\..\mockpp\tests\MixedMockObject_5_test.cpp # End Source File # Begin Source File SOURCE=..\..\..\mockpp\tests\mock_test.cpp DEP_CPP_MOCK_=\ "..\..\..\mockpp\mockpp.h"\ "..\..\..\mockpp\mockpp_config-bcb5.h"\ "..\..\..\mockpp\mockpp_config-msvc_60_70.h"\ "..\..\..\mockpp\mockpp_config-msvc_71.h"\ {$(INCLUDE)}"cppunit\AdditionalMessage.h"\ {$(INCLUDE)}"cppunit\Asserter.h"\ {$(INCLUDE)}"cppunit\CompilerOutputter.h"\ {$(INCLUDE)}"cppunit\config\config-bcb5.h"\ {$(INCLUDE)}"cppunit\config\config-msvc6.h"\ {$(INCLUDE)}"cppunit\config\CppUnitApi.h"\ {$(INCLUDE)}"cppunit\config\SelectDllLoader.h"\ {$(INCLUDE)}"cppunit\Exception.h"\ {$(INCLUDE)}"cppunit\extensions\AutoRegisterSuite.h"\ {$(INCLUDE)}"cppunit\extensions\ExceptionTestCaseDecorator.h"\ {$(INCLUDE)}"cppunit\extensions\HelperMacros.h"\ {$(INCLUDE)}"cppunit\extensions\TestCaseDecorator.h"\ {$(INCLUDE)}"cppunit\extensions\TestFactory.h"\ {$(INCLUDE)}"cppunit\extensions\TestFactoryRegistry.h"\ {$(INCLUDE)}"cppunit\extensions\TestFixtureFactory.h"\ {$(INCLUDE)}"cppunit\extensions\TestNamer.h"\ {$(INCLUDE)}"cppunit\extensions\TestSuiteBuilderContext.h"\ {$(INCLUDE)}"cppunit\extensions\TestSuiteFactory.h"\ {$(INCLUDE)}"cppunit\extensions\TypeInfoHelper.h"\ {$(INCLUDE)}"cppunit\Message.h"\ {$(INCLUDE)}"cppunit\Outputter.h"\ {$(INCLUDE)}"cppunit\Portability.h"\ {$(INCLUDE)}"cppunit\portability\CppUnitDeque.h"\ {$(INCLUDE)}"cppunit\portability\CppUnitMap.h"\ {$(INCLUDE)}"cppunit\portability\CppUnitSet.h"\ {$(INCLUDE)}"cppunit\portability\CppUnitVector.h"\ {$(INCLUDE)}"cppunit\SourceLine.h"\ {$(INCLUDE)}"cppunit\SynchronizedObject.h"\ {$(INCLUDE)}"cppunit\Test.h"\ {$(INCLUDE)}"cppunit\TestAssert.h"\ {$(INCLUDE)}"cppunit\TestCaller.h"\ {$(INCLUDE)}"cppunit\TestCase.h"\ {$(INCLUDE)}"cppunit\TestComposite.h"\ {$(INCLUDE)}"cppunit\TestFailure.h"\ {$(INCLUDE)}"cppunit\TestFixture.h"\ {$(INCLUDE)}"cppunit\TestLeaf.h"\ {$(INCLUDE)}"cppunit\TestListener.h"\ {$(INCLUDE)}"cppunit\TestResult.h"\ {$(INCLUDE)}"cppunit\TestRunner.h"\ {$(INCLUDE)}"cppunit\TestSuite.h"\ {$(INCLUDE)}"cppunit\TextTestProgressListener.h"\ {$(INCLUDE)}"cppunit\ui\text\TestRunner.h"\ {$(INCLUDE)}"cppunit\ui\text\TextTestRunner.h"\ # End Source File # Begin Source File SOURCE=..\..\..\mockpp\tests\StubSequence_test.cpp # End Source File # Begin Source File SOURCE=..\..\..\mockpp\tests\TypelessStubSequence_test.cpp # End Source File # Begin Source File SOURCE=..\..\..\mockpp\tests\VerifyingTestCaller_test.cpp # End Source File # Begin Source File SOURCE=..\..\..\mockpp\tests\VerifyingTestCase_test.cpp # End Source File # End Group # Begin Group "Header Files" # PROP Default_Filter "h;hpp;hxx;hm;inl" # Begin Source File SOURCE=..\..\..\mockpp\tests\classes_ABCDE.h # End Source File # Begin Source File SOURCE=..\..\..\mockpp\tests\MyBuilderNamespace.h # End Source File # Begin Source File SOURCE=..\..\..\mockpp\tests\MyMatchBuilder.h # End Source File # End Group # End Target # End Project |
From: Ewald A. <ewa...@us...> - 2005-04-05 19:34:34
|
Update of /cvsroot/mockpp/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11610 Modified Files: ChangeLog Log Message: update Index: ChangeLog =================================================================== RCS file: /cvsroot/mockpp/mockpp/ChangeLog,v retrieving revision 1.42 retrieving revision 1.43 diff -u -d -r1.42 -r1.43 --- ChangeLog 5 Apr 2005 18:45:20 -0000 1.42 +++ ChangeLog 5 Apr 2005 19:34:26 -0000 1.43 @@ -6,6 +6,7 @@ 2005-04-05 1.7.1: fix for unicode on some cygwin platforms + fix for broken config files for MSVC and BCB5 2005-04-03 1.7.0: |
From: Ewald A. <ewa...@us...> - 2005-04-05 18:45:29
|
Update of /cvsroot/mockpp/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27216 Modified Files: ChangeLog Log Message: fix for unicode on some cygwin platforms Index: ChangeLog =================================================================== RCS file: /cvsroot/mockpp/mockpp/ChangeLog,v retrieving revision 1.41 retrieving revision 1.42 diff -u -d -r1.41 -r1.42 --- ChangeLog 3 Apr 2005 12:58:25 -0000 1.41 +++ ChangeLog 5 Apr 2005 18:45:20 -0000 1.42 @@ -3,6 +3,10 @@ mockpp history -------------- +2005-04-05 1.7.1: + + fix for unicode on some cygwin platforms + 2005-04-03 1.7.0: - ReturnObjectList::addObjectToReturn now has a counter value |
From: Ewald A. <ewa...@us...> - 2005-04-05 18:44:16
|
Update of /cvsroot/mockpp/mockpp/mockpp/examples/tutorial In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26780/mockpp/examples/tutorial Modified Files: basicmock.cpp cppunit.cpp interface.h poormock-se.cpp verifying.cpp visitmock.cpp Log Message: fix for unicode on some cygwin platforms Index: interface.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/examples/tutorial/interface.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- interface.h 24 Mar 2005 20:59:51 -0000 1.5 +++ interface.h 5 Apr 2005 18:44:05 -0000 1.6 @@ -28,6 +28,8 @@ * ***************************************************************************/ +#include <mockpp/mockpp.h> + #include <string> /** Interface class for a configuration file. Index: cppunit.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/examples/tutorial/cppunit.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- cppunit.cpp 22 Mar 2005 22:03:24 -0000 1.9 +++ cppunit.cpp 5 Apr 2005 18:44:05 -0000 1.10 @@ -10,7 +10,8 @@ ***************************************************************************/ -#include <mockpp/mockpp.h> +#include <mockpp/mockpp.h> // always first + #include <mockpp/Throwable.h> #include <mockpp/VisitableMockObject.h> #include <mockpp/ChainableMockObject.h> Index: verifying.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/examples/tutorial/verifying.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- verifying.cpp 22 Mar 2005 22:03:25 -0000 1.9 +++ verifying.cpp 5 Apr 2005 18:44:05 -0000 1.10 @@ -10,7 +10,8 @@ ***************************************************************************/ -#include <mockpp/mockpp.h> +#include <mockpp/mockpp.h> // always first + #include <mockpp/VerifyingTestCase.h> #include <mockpp/ExpectationValue.h> Index: basicmock.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/examples/tutorial/basicmock.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- basicmock.cpp 22 Mar 2005 22:03:24 -0000 1.6 +++ basicmock.cpp 5 Apr 2005 18:44:04 -0000 1.7 @@ -10,7 +10,8 @@ ***************************************************************************/ -#include <mockpp/mockpp.h> +#include <mockpp/mockpp.h> // always first + #include <mockpp/MockObject.h> #include <mockpp/ExpectationList.h> #include <mockpp/ReturnObjectList.h> Index: poormock-se.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/examples/tutorial/poormock-se.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- poormock-se.cpp 22 Mar 2005 22:03:25 -0000 1.4 +++ poormock-se.cpp 5 Apr 2005 18:44:05 -0000 1.5 @@ -10,6 +10,8 @@ ***************************************************************************/ +#include <mockpp/mockpp.h> // always first + #include "interface.h" #include "consumer.h" Index: visitmock.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/examples/tutorial/visitmock.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- visitmock.cpp 3 Apr 2005 18:32:53 -0000 1.11 +++ visitmock.cpp 5 Apr 2005 18:44:05 -0000 1.12 @@ -11,7 +11,7 @@ ***************************************************************************/ #define MOCKPP_IMPORT_ABBREVIATED -#include <mockpp/mockpp.h> +#include <mockpp/mockpp.h> // always first #include <mockpp/VisitableMockObject.h> |
From: Ewald A. <ewa...@us...> - 2005-04-04 08:57:43
|
Update of /cvsroot/mockpp/mockpp/mockpp/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26323/mockpp/tests Modified Files: InvocationMocker_test.cpp mockpp_pti_test.cpp Log Message: more efforts for msvc6 Index: InvocationMocker_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/InvocationMocker_test.cpp,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- InvocationMocker_test.cpp 3 Apr 2005 18:32:54 -0000 1.32 +++ InvocationMocker_test.cpp 4 Apr 2005 08:57:33 -0000 1.33 @@ -48,13 +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) - + +typedef mockpp::Invocation5<CA, CB, CC, CD, CE> SetterInvocation; +typedef mockpp::Invocation5<CA, CB, CC, CD, CE> GetterInvocation; + + +MOCKPP_PTI_DECLARE(SetterInvocation) + namespace { Index: mockpp_pti_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/mockpp_pti_test.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- mockpp_pti_test.cpp 3 Apr 2005 21:49:58 -0000 1.2 +++ mockpp_pti_test.cpp 4 Apr 2005 08:57:34 -0000 1.3 @@ -49,35 +49,12 @@ 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 ); - } -}; -} +MOCKPP_FIFOINVOCATIONDISPATCHER_PTI_IMPL(Setter1Invocation) +MOCKPP_LIFOINVOCATIONDISPATCHER_PTI_IMPL(Setter1Invocation) +MOCKPP_INVOCATIONMOCKER_PTI_IMPL(Setter1Invocation) +MOCKPP_ABSTRACTDYNAMICCHAININGMOCK_PTI_IMPL(Setter1Invocation) +MOCKPP_COREMOCK_PTI_IMPL(Setter1Invocation) namespace { @@ -197,12 +174,10 @@ } virtual void reset() - { - } + {} virtual void verify() - { - } + {} }; @@ -229,8 +204,10 @@ lifo.add(ti2); lifo.myDispatch(si); CPPUNIT_ASSERT(true == ti2->invoked); + CPPUNIT_ASSERT(false == ti1->invoked); lifo.myDispatch(si); CPPUNIT_ASSERT(true == ti1->invoked); + CPPUNIT_ASSERT(false == mvs->invoked); lifo.myDispatch(si); CPPUNIT_ASSERT(true == mvs->invoked); } @@ -259,22 +236,147 @@ fifo.add(ti2); fifo.myDispatch(si); CPPUNIT_ASSERT(true == ti1->invoked); + CPPUNIT_ASSERT(false == ti2->invoked); fifo.myDispatch(si); CPPUNIT_ASSERT(true == ti2->invoked); + CPPUNIT_ASSERT(false == mvs->invoked); fifo.myDispatch(si); CPPUNIT_ASSERT(true == mvs->invoked); } +class MyInvocationMatcher : public mockpp::InvocationMatcher<Setter1Invocation> +{ + public: + + mutable bool invoked; + + MyInvocationMatcher() + { + invoked = false; + } + + virtual bool matches( const Setter1Invocation & /*invocation*/ ) + { + return !invoked; + } + + virtual mockpp::String describeTo( mockpp::String &buffer ) const + { + return buffer; + } + + virtual void verify() + { + } + + virtual void incInvoked( const Setter1Invocation &/*invocation*/ ) + { + invoked = true; + } + + virtual bool hasDescription() + { + return true; + } +}; + + void mockpp_pti_test::test_invocation() { -// MOCKPP_INVOCATIONMOCKER_PTI_IMPL(Setter1Invocation) + Setter1Invocation si(MOCKPP_PCHAR("Setter1Invocation"), 1); + mockpp::InvocationMocker<void, Setter1Invocation> im; + MyInvocationMatcher *ivm1 = new MyInvocationMatcher; + MyInvocationMatcher *ivm2 = new MyInvocationMatcher; + MyVoidStub *stub = new MyVoidStub; + + im.addMatcher( ivm1 ); + im.addMatcher( ivm2 ); + im.setStub(stub); + + im.invoke(si); + CPPUNIT_ASSERT(ivm1->invoked == true); + CPPUNIT_ASSERT(ivm2->invoked == true); + CPPUNIT_ASSERT(stub->invoked == true); } +class ChainingMockDummy : public mockpp::AbstractDynamicChainingMock<void, Setter1Invocation> +{ + public: + + ChainingMockDummy( mockpp::InvocationDispatcher<void, Setter1Invocation>::AP invocationDispatcher, + const mockpp::String &name, + mockpp::VerifiableList *parent ) + : mockpp::AbstractDynamicChainingMock<void, Setter1Invocation>(invocationDispatcher, name, parent) + {} + + void invoke(const Setter1Invocation &invocation) + { + mockInvocation(invocation); + } +}; + +class MyMatcherDummy : public mockpp::Invokable<void, Setter1Invocation> +{ + public: + + bool enable_except; + bool invoked; + + MyMatcherDummy() + { + invoked = false; + enable_except = false; + } + + virtual bool matches( const Setter1Invocation &/*invocation*/ ) + { + return !invoked; + } + + virtual void reset() + { + } + + virtual void invoke( const Setter1Invocation &/*invocation*/ ) + { + invoked = true; + + if (enable_except) + throw mockpp::AssertionFailedError(__LINE__, __FILE__, MOCKPP_PCHAR("invoke-fail")); + } + + virtual void verify() + { + } + + virtual mockpp::String describeTo (mockpp::String &buffer) const + { + return buffer; + } + + virtual bool hasDescription() + { + return true; + } +}; + void mockpp_pti_test::test_abstract() { -// MOCKPP_ABSTRACTDYNAMICCHAININGMOCK_PTI_IMPL(Setter1Invocation) + Setter1Invocation si(MOCKPP_PCHAR("Setter1Invocation"), 1); + ChainingMockDummy cmd (new mockpp::LIFOInvocationDispatcher<void, Setter1Invocation>, MOCKPP_PCHAR( "adc-name" ), 0 ); + MyVoidStub *stub = new MyVoidStub; + MyMatcherDummy *mmd = new MyMatcherDummy; + + cmd.setDefaultStub(stub); + cmd.addInvokable(mmd); + + cmd.invoke(si); + CPPUNIT_ASSERT(mmd->invoked == true); + CPPUNIT_ASSERT(stub->invoked == false); + cmd.invoke(si); + CPPUNIT_ASSERT(stub->invoked == true); } |
From: Ewald A. <ewa...@us...> - 2005-04-04 08:57:42
|
Update of /cvsroot/mockpp/mockpp/mockpp/chaining In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26323/mockpp/chaining Modified Files: AbstractDynamicChainingMock.h InvocationMocker.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.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- mockpp_pti.h 3 Apr 2005 21:49:57 -0000 1.7 +++ mockpp_pti.h 4 Apr 2005 08:57:33 -0000 1.8 @@ -40,7 +40,8 @@ #include <mockpp/chaining/InvocationMocker.h> #include <mockpp/chaining/AbstractDynamicChainingMock.h> - +///////////////////////////////////// +// keep order #define MOCKPP_PTI_IMPLEMENT(I) \ MOCKPP_TYPELESSSTUBADAPTER_PTI_IMPL(I) \ MOCKPP_FIFOINVOCATIONDISPATCHER_PTI_IMPL(I) \ @@ -49,6 +50,8 @@ MOCKPP_ABSTRACTDYNAMICCHAININGMOCK_PTI_IMPL(I) \ MOCKPP_COREMOCK_PTI_IMPL(I) +///////////////////////////////////// +// keep order #define MOCKPP_PTI_DECLARE(I) \ MOCKPP_TYPELESSSTUBADAPTER_PTI_DECL(I) \ MOCKPP_FIFOINVOCATIONDISPATCHER_PTI_DECL(I) \ Index: InvocationMocker.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/InvocationMocker.h,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- InvocationMocker.h 3 Apr 2005 18:32:53 -0000 1.31 +++ InvocationMocker.h 4 Apr 2005 08:57:33 -0000 1.32 @@ -433,53 +433,52 @@ }; -#define MOCKPP_INVOCATIONMOCKER_PTI_IMPL(I) -#define MOCKPP_INVOCATIONMOCKER_PTI_DECL(I) +#define MOCKPP_INVOCATIONMOCKER_PTI_IMPL(I) +#define MOCKPP_INVOCATIONMOCKER_PTI_DECL(I) #else // MOCKPP_PTI_WEAKNESS Partial Template Instantiation Weakness -/** Declare specialized methods for mockpp::InvocationMocker. - * Neccessary for compiler with weak template capabilities. +/** Declare a specialized class for mockpp::InvocationMocker. + * Neccessary for compilers with weak template capabilities. */ #define MOCKPP_INVOCATIONMOCKER_PTI_DECL(I) \ -namespace mockpp { \ -template<> \ -class InvocationMocker<void, I> : public InvocationMockerBase<void, I>; \ -} +namespace mockpp { \ +template<> \ +class InvocationMocker<void, I>; \ +} -/** Implement specialized methods for mockpp::InvocationMocker. - * Neccessary for compiler with weak template capabilities. +/** Implement a specialized class for mockpp::InvocationMocker. + * Neccessary for compilers with weak template capabilities. */ #define MOCKPP_INVOCATIONMOCKER_PTI_IMPL(I) \ -namespace mockpp { \ +namespace mockpp { \ template<> \ -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)) \ - { \ - } \ - \ - 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 - +class InvocationMocker<void, I> : public InvocationMockerBase<void, I> \ +{ \ + public: \ + InvocationMocker<void, I >() \ + : InvocationMockerBase<void, I >( new InvocationMockerBase<void, I >::DefaultDescriber(), \ + new TypelessStubAdapter<void, I >(new VoidStub)) \ + {} \ + \ + InvocationMocker<void, I >(\ + AutoPointer<mockpp::InvocationMockerBase<void, I >::DescriberBase> in_describer ) \ + : InvocationMockerBase<void, I >( in_describer, \ + new TypelessStubAdapter<void, I >(new VoidStub)) \ + {} \ + \ + void invoke( const I &invocation ) \ + { \ + for ( Iterator it = this->matchers.begin(); it != this->matchers.end(); ++it ) \ + ( *it ) ->incInvoked( invocation ); \ + this->stub->invoke( invocation ); \ + } \ +}; \ +} + #endif // MOCKPP_PTI_WEAKNESS Index: AbstractDynamicChainingMock.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/AbstractDynamicChainingMock.h,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- AbstractDynamicChainingMock.h 3 Apr 2005 18:32:46 -0000 1.26 +++ AbstractDynamicChainingMock.h 4 Apr 2005 08:57:33 -0000 1.27 @@ -344,44 +344,64 @@ }; -#define MOCKPP_ABSTRACTDYNAMICCHAININGMOCK_PTI_IMPL(I) -#define MOCKPP_ABSTRACTDYNAMICCHAININGMOCK_PTI_DECL(I) +#define MOCKPP_ABSTRACTDYNAMICCHAININGMOCK_PTI_IMPL(I) +#define MOCKPP_ABSTRACTDYNAMICCHAININGMOCK_PTI_DECL(I) #else // MOCKPP_PTI_WEAKNESS Partial Template Instantiation Weakness -/** Declare specialized methods for mockpp::AbstractDynamicChainingMock. - * Neccessary for compiler with weak template capabilities. +/** Declare a specialized class for mockpp::AbstractDynamicChainingMock. + * Neccessary for compilers with weak template capabilities. */ #define MOCKPP_ABSTRACTDYNAMICCHAININGMOCK_PTI_DECL(I) \ +namespace mockpp { \ template<> \ -void mockpp::AbstractDynamicChainingMock<void, I >::mockInvocation( const I &invocation ); +void mockpp::AbstractDynamicChainingMock<void, I >; \ +} -/** Implement specialized methods for mockpp::AbstractDynamicChainingMock. - * Neccessary for compiler with weak template capabilities. + +/** Implement a specialized class for mockpp::AbstractDynamicChainingMock. + * Neccessary for compilers with weak template capabilities. */ #define MOCKPP_ABSTRACTDYNAMICCHAININGMOCK_PTI_IMPL(I) \ +namespace mockpp { \ template<> \ -void mockpp::AbstractDynamicChainingMock<void, I >::mockInvocation( const I &invocation ) \ +class AbstractDynamicChainingMock<void, I> : public AbstractDynamicChainingMockImpl<void, I> \ { \ - if ( this->failure.get() != 0 ) \ - throw *this->failure.get(); \ - \ - try \ - { \ - this->invocationDispatcher->dispatch( invocation ); \ - } \ - \ - catch ( const AssertionFailedError & assertion ) \ + public: \ + AbstractDynamicChainingMock( InvocationDispatcher<void, I>::AP invocationDispatcher, \ + const String &name, \ + VerifiableList *parent) \ + : AbstractDynamicChainingMockImpl<void, I>(invocationDispatcher, name, parent) \ + {} \ + \ + AbstractDynamicChainingMock( const String &name, \ + VerifiableList *parent) \ + : AbstractDynamicChainingMockImpl<void, I>(new FIFOInvocationDispatcher<void,I>, name, parent) \ + {} \ + \ + void mockInvocation( const I &invocation ) \ { \ - DynamicChainingMockError<void, I > dme( this, \ - invocation, \ - this->invocationDispatcher.get(), \ - assertion.getMessage() ); \ - this->failure.reset( new AssertionFailedError(__LINE__, __FILE__, dme.getMessage())); \ - throw *this->failure.get(); \ + if ( this->failure.get() != 0 ) \ + throw *this->failure.get(); \ + \ + try \ + { \ + this->invocationDispatcher->dispatch( invocation ); \ + } \ + \ + catch ( const AssertionFailedError & assertion ) \ + { \ + DynamicChainingMockError<void, I > dme( this, \ + invocation, \ + this->invocationDispatcher.get(), \ + assertion.getMessage() ); \ + this->failure.reset( new AssertionFailedError(__LINE__, __FILE__, dme.getMessage())); \ + throw *this->failure.get(); \ + } \ } \ +}; \ } |
From: Ewald A. <ewa...@us...> - 2005-04-03 21:50:27
|
Update of /cvsroot/mockpp/mockpp/mockpp/stub In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29266/mockpp/stub Modified Files: TypelessStub.h Log Message: more efforts for msvc6 Index: TypelessStub.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/stub/TypelessStub.h,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- TypelessStub.h 3 Apr 2005 18:32:53 -0000 1.16 +++ TypelessStub.h 3 Apr 2005 21:49:57 -0000 1.17 @@ -176,49 +176,49 @@ }; -#define MOCKPP_TYPELESSSTUBADAPTER_PTI_IMPL(I) -#define MOCKPP_TYPELESSSTUBADAPTER_PTI_DECL(I) +#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. + +/** Declare a specialized class for mockpp::InvocationMocker. * Neccessary for compilers with weak template capabilities. */ #define MOCKPP_TYPELESSSTUBADAPTER_PTI_DECL(I) \ -namespace mockpp { \ +namespace mockpp { \ template<> \ -void mockpp::TypelessStubAdapter<void, I >; \ +void mockpp::TypelessStubAdapter<void, I >; \ } -/** Implement specialized methods for mockpp::InvocationMocker. +/** Implement a specialized class for mockpp::InvocationMocker. * Neccessary for compilers with weak template capabilities. */ #define MOCKPP_TYPELESSSTUBADAPTER_PTI_IMPL(I) \ -namespace mockpp { \ +namespace mockpp { \ template<> \ -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) \ - {} \ - \ +class TypelessStubAdapter<void, I > : public TypelessStubAdapterBase<void, I > \ +{ \ + public: \ + TypelessStubAdapter<void, I >(TypelessStub<void>::AP tm, bool in_delete = true) \ + : TypelessStubAdapterBase<void, I >(tm, in_delete) \ + {} \ + \ void invoke( const I &invocation) \ { \ - MOCKPP_UNUSED(invocation); \ + MOCKPP_UNUSED(invocation); \ this->stubber->typelessInvoke(); \ } \ }; \ -} +} + - #endif // MOCKPP_PTI_WEAKNESS - -} // namespace mockpp + +} // namespace mockpp #endif // MOCKPP_TypelessStub_H |
From: Ewald A. <ewa...@us...> - 2005-04-03 21:50:27
|
Update of /cvsroot/mockpp/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29266 Modified Files: Makefile.am Log Message: more efforts for msvc6 Index: Makefile.am =================================================================== RCS file: /cvsroot/mockpp/mockpp/Makefile.am,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- Makefile.am 3 Apr 2005 19:11:25 -0000 1.25 +++ Makefile.am 3 Apr 2005 21:49:57 -0000 1.26 @@ -41,10 +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 $(distdir)-src.zip + gpg --no-use-agent -ba $(distdir)-src.zip -rm $(distdir)-src.tar.$(ZIPPER_EXT).asc - gpg -ba $(distdir)-src.tar.$(ZIPPER_EXT) -# --no-use-agent + gpg --no-use-agent -ba $(distdir)-src.tar.$(ZIPPER_EXT) + full-dist: doc-dist src-dist |