[Mockpp-commits] mockpp/mockpp/matcher InvocationMatcher.h,1.8,1.9 InvokeAtLeastMatcher.cpp,1.2,1.3
Brought to you by:
ewald-arnold
Update of /cvsroot/mockpp/mockpp/mockpp/matcher In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24081/mockpp/matcher Modified Files: InvocationMatcher.h InvokeAtLeastMatcher.cpp InvokeAtLeastMatcher.h InvokeAtLeastOnceMatcher.h InvokeAtMostMatcher.cpp InvokeAtMostMatcher.h InvokeCountMatcher.cpp InvokeCountMatcher.h InvokeOnceMatcher.cpp InvokeOnceMatcher.h InvokedRecorder.cpp InvokedRecorder.h StatelessInvocationMatcher.h TestFailureMatcher.cpp TestFailureMatcher.h TypelessMatcher.cpp TypelessMatcher.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: InvokeAtLeastMatcher.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/matcher/InvokeAtLeastMatcher.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** InvokeAtLeastMatcher.h 6 Jan 2005 13:09:23 -0000 1.11 --- InvokeAtLeastMatcher.h 27 Feb 2005 11:48:16 -0000 1.12 *************** *** 64,68 **** * If it fails, an AssertionFailedError is thrown */ ! virtual void verify() const; /** Does the object provide meaningful description via describeTo() ?. --- 64,68 ---- * If it fails, an AssertionFailedError is thrown */ ! virtual void verify(); /** Does the object provide meaningful description via describeTo() ?. Index: InvokeOnceMatcher.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/matcher/InvokeOnceMatcher.h,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** InvokeOnceMatcher.h 6 Jan 2005 13:09:23 -0000 1.19 --- InvokeOnceMatcher.h 27 Feb 2005 11:48:16 -0000 1.20 *************** *** 59,63 **** * If it fails, an AssertionFailedError is thrown */ ! virtual void verify() const; /** Does the object provide meaningful description via describeTo() ?. --- 59,63 ---- * If it fails, an AssertionFailedError is thrown */ ! virtual void verify(); /** Does the object provide meaningful description via describeTo() ?. Index: InvokeAtMostMatcher.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/matcher/InvokeAtMostMatcher.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** InvokeAtMostMatcher.cpp 30 Dec 2004 20:54:04 -0000 1.2 --- InvokeAtMostMatcher.cpp 27 Feb 2005 11:48:16 -0000 1.3 *************** *** 54,58 **** ! void MOCKPP_EXPORT InvokeAtMostMatcher::verify() const { String fmt (MOCKPP_PCHAR("expected method was invoked too often, expected ") --- 54,58 ---- ! void MOCKPP_EXPORT InvokeAtMostMatcher::verify() { String fmt (MOCKPP_PCHAR("expected method was invoked too often, expected ") Index: InvokeOnceMatcher.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/matcher/InvokeOnceMatcher.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** InvokeOnceMatcher.cpp 30 Dec 2004 20:54:04 -0000 1.2 --- InvokeOnceMatcher.cpp 27 Feb 2005 11:48:16 -0000 1.3 *************** *** 46,50 **** ! void MOCKPP_EXPORT InvokeOnceMatcher::verify() const { verifyHasBeenInvoked(); --- 46,50 ---- ! void MOCKPP_EXPORT InvokeOnceMatcher::verify() { verifyHasBeenInvoked(); Index: InvokeAtMostMatcher.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/matcher/InvokeAtMostMatcher.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** InvokeAtMostMatcher.h 6 Jan 2005 13:09:23 -0000 1.14 --- InvokeAtMostMatcher.h 27 Feb 2005 11:48:16 -0000 1.15 *************** *** 63,67 **** * If it fails, an AssertionFailedError is thrown */ ! virtual void verify() const; /** Does the object provide meaningful description via describeTo() ?. --- 63,67 ---- * If it fails, an AssertionFailedError is thrown */ ! virtual void verify(); /** Does the object provide meaningful description via describeTo() ?. Index: TypelessMatcher.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/matcher/TypelessMatcher.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TypelessMatcher.cpp 30 Dec 2004 20:54:04 -0000 1.3 --- TypelessMatcher.cpp 27 Feb 2005 11:48:16 -0000 1.4 *************** *** 47,50 **** --- 47,55 ---- + void MOCKPP_EXPORT TypelessMatcher::reset() + { + } + + } // namespace mockpp Index: InvocationMatcher.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/matcher/InvocationMatcher.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** InvocationMatcher.h 6 Jan 2005 13:09:23 -0000 1.8 --- InvocationMatcher.h 27 Feb 2005 11:48:16 -0000 1.9 *************** *** 88,91 **** --- 88,98 ---- */ virtual bool hasDescription() = 0; + + /** + * Sets all internal data to the state after construction. + * Only a dummy as matchers don't have data to reset. + */ + virtual void reset() + {} }; Index: InvokedRecorder.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/matcher/InvokedRecorder.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** InvokedRecorder.cpp 30 Dec 2004 20:54:04 -0000 1.3 --- InvokedRecorder.cpp 27 Feb 2005 11:48:16 -0000 1.4 *************** *** 87,91 **** ! void MOCKPP_EXPORT InvokedRecorder::verify() const { // always verifies --- 87,91 ---- ! void MOCKPP_EXPORT InvokedRecorder::verify() { // always verifies Index: InvokeAtLeastMatcher.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/matcher/InvokeAtLeastMatcher.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** InvokeAtLeastMatcher.cpp 30 Dec 2004 20:54:04 -0000 1.2 --- InvokeAtLeastMatcher.cpp 27 Feb 2005 11:48:16 -0000 1.3 *************** *** 53,57 **** ! void MOCKPP_EXPORT InvokeAtLeastMatcher::verify() const { String fmt(MOCKPP_PCHAR("expected method was not invoked often enough, expected ") --- 53,57 ---- ! void MOCKPP_EXPORT InvokeAtLeastMatcher::verify() { String fmt(MOCKPP_PCHAR("expected method was not invoked often enough, expected ") Index: TypelessMatcher.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/matcher/TypelessMatcher.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** TypelessMatcher.h 30 Dec 2004 20:54:04 -0000 1.10 --- TypelessMatcher.h 27 Feb 2005 11:48:16 -0000 1.11 *************** *** 77,80 **** --- 77,85 ---- */ virtual void incInvoked( ) = 0; + + /** Sets all internal data to the state after construction. + * Only a dummy as matchers don't have data to reset. + */ + virtual void reset(); }; *************** *** 116,120 **** * If it fails, an AssertionFailedError is thrown */ ! virtual void verify() const { matcher->verify(); --- 121,125 ---- * If it fails, an AssertionFailedError is thrown */ ! virtual void verify() { matcher->verify(); Index: StatelessInvocationMatcher.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/matcher/StatelessInvocationMatcher.h,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** StatelessInvocationMatcher.h 30 Dec 2004 20:54:04 -0000 1.17 --- StatelessInvocationMatcher.h 27 Feb 2005 11:48:16 -0000 1.18 *************** *** 64,68 **** * If it fails, an AssertionFailedError is thrown */ ! virtual void verify() const { // Nothing to verify because state cannot change --- 64,68 ---- * If it fails, an AssertionFailedError is thrown */ ! virtual void verify() { // Nothing to verify because state cannot change Index: InvokeAtLeastOnceMatcher.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/matcher/InvokeAtLeastOnceMatcher.h,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** InvokeAtLeastOnceMatcher.h 6 Jan 2005 13:09:23 -0000 1.20 --- InvokeAtLeastOnceMatcher.h 27 Feb 2005 11:48:16 -0000 1.21 *************** *** 53,57 **** * If it fails, an AssertionFailedError is thrown */ ! virtual void verify() const { verifyHasBeenInvoked(); --- 53,57 ---- * If it fails, an AssertionFailedError is thrown */ ! virtual void verify() { verifyHasBeenInvoked(); Index: InvokeCountMatcher.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/matcher/InvokeCountMatcher.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** InvokeCountMatcher.cpp 30 Dec 2004 20:54:04 -0000 1.2 --- InvokeCountMatcher.cpp 27 Feb 2005 11:48:16 -0000 1.3 *************** *** 57,61 **** ! void MOCKPP_EXPORT InvokeCountMatcher::verify() const { verifyHasBeenInvokedExactly(expectedCount); --- 57,61 ---- ! void MOCKPP_EXPORT InvokeCountMatcher::verify() { verifyHasBeenInvokedExactly(expectedCount); Index: TestFailureMatcher.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/matcher/TestFailureMatcher.h,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** TestFailureMatcher.h 6 Jan 2005 13:09:23 -0000 1.21 --- TestFailureMatcher.h 27 Feb 2005 11:48:16 -0000 1.22 *************** *** 81,85 **** * If it fails, an AssertionFailedError is thrown */ ! virtual void verify() const; private: --- 81,85 ---- * If it fails, an AssertionFailedError is thrown */ ! virtual void verify(); private: Index: TestFailureMatcher.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/matcher/TestFailureMatcher.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TestFailureMatcher.cpp 30 Dec 2004 20:54:04 -0000 1.2 --- TestFailureMatcher.cpp 27 Feb 2005 11:48:16 -0000 1.3 *************** *** 72,76 **** ! void MOCKPP_EXPORT TestFailureMatcher::verify() const { // Always verify --- 72,76 ---- ! void MOCKPP_EXPORT TestFailureMatcher::verify() { // Always verify Index: InvokedRecorder.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/matcher/InvokedRecorder.h,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** InvokedRecorder.h 30 Dec 2004 20:54:04 -0000 1.25 --- InvokedRecorder.h 27 Feb 2005 11:48:16 -0000 1.26 *************** *** 97,101 **** * If it fails, an AssertionFailedError is thrown */ ! virtual void verify() const; /** Verifys that the object has been invoked at least once. --- 97,101 ---- * If it fails, an AssertionFailedError is thrown */ ! virtual void verify(); /** Verifys that the object has been invoked at least once. Index: InvokeCountMatcher.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/matcher/InvokeCountMatcher.h,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** InvokeCountMatcher.h 6 Jan 2005 13:09:23 -0000 1.18 --- InvokeCountMatcher.h 27 Feb 2005 11:48:16 -0000 1.19 *************** *** 68,72 **** * If it fails, an AssertionFailedError is thrown */ ! virtual void verify() const; /** Does the object provide meaningful description via describeTo() ?. --- 68,72 ---- * If it fails, an AssertionFailedError is thrown */ ! virtual void verify(); /** Does the object provide meaningful description via describeTo() ?. |