[Mockpp-commits] mockpp/mockpp/chaining AbstractDynamicChainingMock.h,1.20,1.21 AbstractInvocationDi
Brought to you by:
ewald-arnold
|
From: Ewald A. <ewa...@us...> - 2005-02-27 11:48:27
|
Update of /cvsroot/mockpp/mockpp/mockpp/chaining In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24081/mockpp/chaining Modified Files: AbstractDynamicChainingMock.h AbstractInvocationDispatcher.h ChainingMockBuilder.h InvocationMocker.h Log Message: - VisitableMockObjects optionally take Constraints - mock objects reset all their sub objects - all mock objects get their own reset() method - ReturnObjectList has a default return value - changed "verify() const" to "verify()" Index: InvocationMocker.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/InvocationMocker.h,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** InvocationMocker.h 30 Jan 2005 12:09:18 -0000 1.22 --- InvocationMocker.h 27 Feb 2005 11:48:15 -0000 1.23 *************** *** 89,92 **** --- 89,99 ---- virtual ~InvocationMockerBase() { + reset(); + } + + /** Removes all the objects from the list. + */ + virtual void reset() + { for ( Iterator it = matchers.begin(); it != matchers.end(); ++it ) delete (*it); *************** *** 111,115 **** * If it fails, an AssertionFailedError is thrown */ ! virtual void verify() const { try --- 118,122 ---- * If it fails, an AssertionFailedError is thrown */ ! virtual void verify() { try Index: ChainingMockBuilder.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/ChainingMockBuilder.h,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** ChainingMockBuilder.h 30 Jan 2005 12:09:17 -0000 1.22 --- ChainingMockBuilder.h 27 Feb 2005 11:48:15 -0000 1.23 *************** *** 83,87 **** * If it fails, an AssertionFailedError is thrown */ ! virtual void verify() const { coreMock->verify(); --- 83,87 ---- * If it fails, an AssertionFailedError is thrown */ ! virtual void verify() { coreMock->verify(); Index: AbstractDynamicChainingMock.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/AbstractDynamicChainingMock.h,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** AbstractDynamicChainingMock.h 30 Jan 2005 12:09:17 -0000 1.20 --- AbstractDynamicChainingMock.h 27 Feb 2005 11:48:15 -0000 1.21 *************** *** 116,120 **** * If it fails, an AssertionFailedError is thrown */ ! virtual void verify() const { forgetFailure(); --- 116,120 ---- * If it fails, an AssertionFailedError is thrown */ ! virtual void verify() { forgetFailure(); Index: AbstractInvocationDispatcher.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/AbstractInvocationDispatcher.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** AbstractInvocationDispatcher.h 30 Jan 2005 12:09:17 -0000 1.12 --- AbstractInvocationDispatcher.h 27 Feb 2005 11:48:15 -0000 1.13 *************** *** 101,105 **** * If it fails, an AssertionFailedError is thrown */ ! virtual void verify() const { for ( unsigned i = 0; i < invokables.size(); ++i ) --- 101,105 ---- * If it fails, an AssertionFailedError is thrown */ ! virtual void verify() { for ( unsigned i = 0; i < invokables.size(); ++i ) *************** *** 107,110 **** --- 107,117 ---- } + /** Removes all the objects from the list. + */ + virtual void reset() + { + clear(); + } + /** Clears all internal states */ |