mockpp-commits Mailing List for Mock Objects for C++ (Page 49)
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-03-05 14:54:23
|
Update of /cvsroot/mockpp/mockpp/mockpp/examples/tutorial In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6692/mockpp/examples/tutorial Modified Files: visitmock.cpp Log Message: fixes non-unicode and BCB5 Index: visitmock.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/examples/tutorial/visitmock.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- visitmock.cpp 4 Mar 2005 23:37:00 -0000 1.8 +++ visitmock.cpp 5 Mar 2005 14:53:40 -0000 1.9 @@ -84,8 +84,8 @@ // record program flow while writing data mock.open("file1.lst"); mock.write("record-1/processed"); - mock.write(stringContains("processed")); - mock.write(stringContains("processed")); + mock.write(stringContains(std::string("processed"))); + mock.write(stringContains(std::string("processed"))); mock.close(); // activate mock object |
From: Ewald A. <ewa...@us...> - 2005-03-05 14:54:21
|
Update of /cvsroot/mockpp/mockpp/mockpp/compat In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6692/mockpp/compat Modified Files: Formatter.cpp Formatter.h Log Message: fixes non-unicode and BCB5 Index: Formatter.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/compat/Formatter.h,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- Formatter.h 3 Mar 2005 15:48:16 -0000 1.25 +++ Formatter.h 5 Mar 2005 14:53:40 -0000 1.26 @@ -152,6 +152,17 @@ * @param repdata value to replace * @return the resulting string */ +mockpp::String & operator << (mockpp::String &formatter, char repdata); + + +/** Replace a positional %-parameter with a value. + * Replaces the lowest %-parameter with the string representation of the data. + * "hello %1" << 'A' gives "hello A" + * @ingroup grp_helper + * @param formatter target string with position parameter + * @param repdata value to replace + * @return the resulting string + */ mockpp::String & operator << (mockpp::String &formatter, const char *repdata); Index: Formatter.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/compat/Formatter.cpp,v retrieving revision 1.35 retrieving revision 1.36 diff -u -d -r1.35 -r1.36 --- Formatter.cpp 3 Mar 2005 15:49:36 -0000 1.35 +++ Formatter.cpp 5 Mar 2005 14:53:39 -0000 1.36 @@ -245,6 +245,15 @@ } +mockpp::String & MOCKPP_EXPORT operator << ( mockpp::String &formatter, char repdata ) +{ + mockpp::String s; + s += repdata; + formatter << s; + return formatter; +} + + mockpp::String & MOCKPP_EXPORT operator << ( mockpp::String &formatter, unsigned char repdata ) { mockpp::String s; |
From: Ewald A. <ewa...@us...> - 2005-03-05 14:54:21
|
Update of /cvsroot/mockpp/mockpp/bcb5 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6692/bcb5 Modified Files: jmock_test.bpr mockpp.bpf mockpp.bpr Log Message: fixes non-unicode and BCB5 Index: mockpp.bpr =================================================================== RCS file: /cvsroot/mockpp/mockpp/bcb5/mockpp.bpr,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- mockpp.bpr 1 Mar 2005 19:34:29 -0000 1.30 +++ mockpp.bpr 5 Mar 2005 14:53:38 -0000 1.31 @@ -24,16 +24,22 @@ c:\tmp\compile\mockpp_23\\SelfDescribing.obj c:\tmp\compile\mockpp_23\\ChainableMockObject.obj c:\tmp\compile\mockpp_23\\BuilderNamespace.obj + c:\tmp\compile\mockpp_23\\VoidStub.obj c:\tmp\compile\mockpp_23\\Invocation.obj c:\tmp\compile\mockpp_23\\IsNothing.obj c:\tmp\compile\mockpp_23\\IsAnything.obj c:\tmp\compile\mockpp_23\\TypelessMatcher.obj c:\tmp\compile\mockpp_23\\InvokeAtMostMatcher.obj + c:\tmp\compile\mockpp_23\\InvokeAtLeastOnceMatcher.obj + c:\tmp\compile\mockpp_23\\UnlimitedMatcher.obj c:\tmp\compile\mockpp_23\\InvokeCountMatcher.obj c:\tmp\compile\mockpp_23\\InvokedRecorder.obj c:\tmp\compile\mockpp_23\\InvokeOnceMatcher.obj c:\tmp\compile\mockpp_23\\TestFailureMatcher.obj - c:\tmp\compile\mockpp_23\\InvokeAtLeastMatcher.obj"/> + c:\tmp\compile\mockpp_23\\InvokeAtLeastMatcher.obj + c:\tmp\compile\mockpp_23\\IdentityBuilder.obj + c:\tmp\compile\mockpp_23\\TypelessConstraint.obj + c:\tmp\compile\mockpp_23\\ConstraintSet.obj"/> <RESFILES value=""/> <DEFFILE value=""/> <RESDEPEN value="$(RESFILES)"/> @@ -44,7 +50,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\constraint;..\mockpp\matcher"/> + <PATHCPP value=".;..\mockpp\util;..\mockpp\compat;..\mockpp\chaining;..\mockpp;..\mockpp\builder;..\mockpp\stub;..\mockpp\constraint;..\mockpp\matcher"/> <PATHPAS value=".;"/> <PATHRC value=".;"/> <PATHASM value=".;"/> @@ -54,8 +60,8 @@ <USERDEFINES value="__DLL___;_DEBUG"/> <SYSDEFINES value="NO_STRICT;_NO_VCL;_RTLDLL;USEPACKAGES"/> <MAINSOURCE value="mockpp.bpf"/> - <INCLUDEPATH value="..\mockpp\matcher;..\mockpp\constraint;..\mockpp\builder;..\mockpp;..\mockpp\chaining;..\mockpp\compat;..\mockpp\util;..;$(BCB)\include;..\..\..\cppunit-1.10.2\include;..\..\cppunit-1.10\include"/> - <LIBPATH value="..\mockpp\matcher;..\mockpp\constraint;..\mockpp\builder;..\mockpp\chaining;..\mockpp\compat;..\mockpp\util;..\mockpp_23\matcher;..\mockpp_23\constraint;..\mockpp_23\builder;..\mockpp;..\mockpp_23\chaining;..\mockpp_23\compat;..\mockpp_23\util;..;$(BCB)\lib\obj;$(BCB)\lib"/> + <INCLUDEPATH value="..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"/> + <LIBPATH value="..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_23\matcher;..\mockpp_23\constraint;..\mockpp_23\builder;..\mockpp;..\mockpp_23\chaining;..\mockpp_23\compat;..\mockpp_23\util;..\..\mockpp;$(BCB)\lib\obj;$(BCB)\lib"/> <WARNINGS value="-w-par"/> </MACROS> <OPTIONS> @@ -101,51 +107,53 @@ Comments= [HistoryLists\hlIncludePath] -Count=27 -Item0=..\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\matcher;..\mockpp\constraint;..\mockpp\builder;..\mockpp;..\mockpp\chaining;..\mockpp\compat;..\mockpp\util;..;$(BCB)\include;..\..\..\cppunit-1.10.2\include -Item2=..;$(BCB)\include;..\..\..\cppunit-1.10.2\include -Item3=..\mockpp\matcher;..\mockpp\constraint;..\mockpp\builder;..\mockpp;..\mockpp\chaining;..\mockpp\compat;..\mockpp\util;..;$(BCB)\include;..\..\..\cppunit-1.10.2\include;..\..\..\cppunit-1.10\include -Item4=..;$(BCB)\include;..\..\..\cppunit-1.10.2\include;..\..\..\cppunit-1.10\include -Item5=..\mockpp\matcher;..\mockpp\constraint;..\mockpp\builder;..\mockpp\chaining;..\mockpp\compat;..\mockpp\util;..\mockpp_23\matcher;..\mockpp_23\constraint;..\mockpp_23\builder;..\mockpp;..\mockpp_23\chaining;..\mockpp_23\compat;..\mockpp_23\util;..;$(BCB)\include;..\..\..\cppunit-1.10.2\include -Item6=..\..\mockpp;$(BCB)\include;..\..\..\cppunit.ups\include -Item7=..\mockpp_23\matcher;..\mockpp_23\constraint;..\mockpp_23\builder;..\mockpp_23\chaining;..\mockpp_23\compat;..\mockpp_23\util;..\mockpp;..\..\mockpp;$(BCB)\include;..\..\..\cppunit.ups\include -Item8=..\mockpp;..;$(BCB)\include;..\..\..\cppunit.ups\include -Item9=..\mockpp_23\builder;..\mockpp_23\matcher;..\mockpp_23\constraint;..\builder;\\SONNE\HOMES\Documents\src\mockpp_23\mockpp\mockpp_23\matcher;\\SONNE\HOMES\Documents\src\mockpp_23\mockpp\mockpp_23\constraint;\\SONNE\HOMES\Documents\src\mockpp_23\mockpp\mockpp_23\builder;..\mockpp_23\chaining;\\SONNE\HOMES\Documents\src\mockpp_23\mockpp\mockpp;\\SONNE\HOMES\Documents\src\mockpp_23\mockpp\mockpp_23\chaining;mockpp;\\SONNE\HOMES\src\mockpp_23\mockpp\mockpp;..\mockpp_23\compat;..\mockpp_23\util;..\mockpp;..;$(BCB)\include;..\..\..\cppunit-1.8.0\include -Item10=..\mockpp_23\builder;..\mockpp_23\matcher;..\mockpp_23\constraint;..\builder;\\SONNE\HOMES\Documents\src\mockpp_23\mockpp\mockpp_23\matcher;\\SONNE\HOMES\Documents\src\mockpp_23\mockpp\mockpp_23\constraint;\\SONNE\HOMES\Documents\src\mockpp_23\mockpp\mockpp_23\builder;..\mockpp_23\chaining;\\SONNE\HOMES\Documents\src\mockpp_23\mockpp\mockpp;\\SONNE\HOMES\Documents\src\mockpp_23\mockpp\mockpp_23\chaining;mockpp;\\SONNE\HOMES\src\mockpp_23\mockpp\mockpp;..\mockpp_23\compat;..\mockpp_23\util;..\mockpp;..\..\mockpp;$(BCB)\include;..\..\..\cppunit-1.8.0\include -Item11=mockpp;\\SONNE\HOMES\src\mockpp_23\mockpp\mockpp;..\mockpp_23\compat;..\mockpp_23\util;..\mockpp;..\..\mockpp;$(BCB)\include;X:\Documents\src\cppunit-1.8.0\include -Item12=mockpp;\\SONNE\HOMES\src\mockpp_23\mockpp\mockpp;..\mockpp_23\compat;..\mockpp_23\util;..\mockpp;..\..\mockpp;$(BCB)\include -Item13=mockpp;\\SONNE\HOMES\src\mockpp_23\mockpp\mockpp;..\mockpp_23\compat;..\mockpp_23\util;..\mockpp;..;$(BCB)\include -Item14=..;$(BCB)\include -Item15=..\mockpp_23\compat;..\mockpp_23\util;..\mockpp;\\SONNE\HOMES\src\mockpp_23\mockpp\mockpp_23\compat;\\SONNE\HOMES\src\mockpp_23\mockpp\mockpp_23\util;\\SONNE\HOMES\src\mockpp_23\mockpp\mockpp;..\ulxmlrpcpp;..\..\mockpp;$(BCB)\include;$(BCB)\include\vcl -Item16=..;$(BCB)\include;$(BCB)\include\vcl -Item17=..\ulxmlrpcpp;C:\Programme\Borland\CBuilder5\Projects;\\SONNE\HOMES\src\ulxr\mockpp_23\mockpp;..;..\mockpp;..\expat;$(BCB)\include;$(BCB)\include\vcl;C:\wx2\include\ -Item18=..\..\mockpp;..\mockpp;..\expat;$(BCB)\include;$(BCB)\include\vcl;C:\wx2\include\ -Item19=..;..\mockpp;..\expat;$(BCB)\include;$(BCB)\include\vcl;C:\wx2\include\ -Item20=..\..\mockpp;..\mockpp;..\expat;..;$(BCB)\include;$(BCB)\include\vcl;C:\wx2\include\ -Item21=..\..\mockpp;..\mockpp;..\expat;$(BCB)\include;$(BCB)\include\vcl;C:\wx2\include -Item22=..\..\mockpp;..\mockpp;..\expat;$(BCB)\include;$(BCB)\include\vcl -Item23=..;..\mockpp;..\expat;$(BCB)\include;$(BCB)\include\vcl -Item24=..\mockpp;..\expat;$(BCB)\include;$(BCB)\include\vcl -Item25=..\mockpp;$(BCB)\include;$(BCB)\include\vcl;..\..\Expat-1.95.2\Source\lib -Item26=..\mockpp;$(BCB)\include;$(BCB)\include\vcl +Count=28 +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\matcher;..\mockpp\constraint;..\mockpp\builder;..\mockpp;..\mockpp\chaining;..\mockpp\compat;..\mockpp\util;..;$(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 +Item3=..;$(BCB)\include;..\..\..\cppunit-1.10.2\include +Item4=..\mockpp\matcher;..\mockpp\constraint;..\mockpp\builder;..\mockpp;..\mockpp\chaining;..\mockpp\compat;..\mockpp\util;..;$(BCB)\include;..\..\..\cppunit-1.10.2\include;..\..\..\cppunit-1.10\include +Item5=..;$(BCB)\include;..\..\..\cppunit-1.10.2\include;..\..\..\cppunit-1.10\include +Item6=..\mockpp\matcher;..\mockpp\constraint;..\mockpp\builder;..\mockpp\chaining;..\mockpp\compat;..\mockpp\util;..\mockpp_23\matcher;..\mockpp_23\constraint;..\mockpp_23\builder;..\mockpp;..\mockpp_23\chaining;..\mockpp_23\compat;..\mockpp_23\util;..;$(BCB)\include;..\..\..\cppunit-1.10.2\include +Item7=..\..\mockpp;$(BCB)\include;..\..\..\cppunit.ups\include +Item8=..\mockpp_23\matcher;..\mockpp_23\constraint;..\mockpp_23\builder;..\mockpp_23\chaining;..\mockpp_23\compat;..\mockpp_23\util;..\mockpp;..\..\mockpp;$(BCB)\include;..\..\..\cppunit.ups\include +Item9=..\mockpp;..;$(BCB)\include;..\..\..\cppunit.ups\include +Item10=..\mockpp_23\builder;..\mockpp_23\matcher;..\mockpp_23\constraint;..\builder;\\SONNE\HOMES\Documents\src\mockpp_23\mockpp\mockpp_23\matcher;\\SONNE\HOMES\Documents\src\mockpp_23\mockpp\mockpp_23\constraint;\\SONNE\HOMES\Documents\src\mockpp_23\mockpp\mockpp_23\builder;..\mockpp_23\chaining;\\SONNE\HOMES\Documents\src\mockpp_23\mockpp\mockpp;\\SONNE\HOMES\Documents\src\mockpp_23\mockpp\mockpp_23\chaining;mockpp;\\SONNE\HOMES\src\mockpp_23\mockpp\mockpp;..\mockpp_23\compat;..\mockpp_23\util;..\mockpp;..;$(BCB)\include;..\..\..\cppunit-1.8.0\include +Item11=..\mockpp_23\builder;..\mockpp_23\matcher;..\mockpp_23\constraint;..\builder;\\SONNE\HOMES\Documents\src\mockpp_23\mockpp\mockpp_23\matcher;\\SONNE\HOMES\Documents\src\mockpp_23\mockpp\mockpp_23\constraint;\\SONNE\HOMES\Documents\src\mockpp_23\mockpp\mockpp_23\builder;..\mockpp_23\chaining;\\SONNE\HOMES\Documents\src\mockpp_23\mockpp\mockpp;\\SONNE\HOMES\Documents\src\mockpp_23\mockpp\mockpp_23\chaining;mockpp;\\SONNE\HOMES\src\mockpp_23\mockpp\mockpp;..\mockpp_23\compat;..\mockpp_23\util;..\mockpp;..\..\mockpp;$(BCB)\include;..\..\..\cppunit-1.8.0\include +Item12=mockpp;\\SONNE\HOMES\src\mockpp_23\mockpp\mockpp;..\mockpp_23\compat;..\mockpp_23\util;..\mockpp;..\..\mockpp;$(BCB)\include;X:\Documents\src\cppunit-1.8.0\include +Item13=mockpp;\\SONNE\HOMES\src\mockpp_23\mockpp\mockpp;..\mockpp_23\compat;..\mockpp_23\util;..\mockpp;..\..\mockpp;$(BCB)\include +Item14=mockpp;\\SONNE\HOMES\src\mockpp_23\mockpp\mockpp;..\mockpp_23\compat;..\mockpp_23\util;..\mockpp;..;$(BCB)\include +Item15=..;$(BCB)\include +Item16=..\mockpp_23\compat;..\mockpp_23\util;..\mockpp;\\SONNE\HOMES\src\mockpp_23\mockpp\mockpp_23\compat;\\SONNE\HOMES\src\mockpp_23\mockpp\mockpp_23\util;\\SONNE\HOMES\src\mockpp_23\mockpp\mockpp;..\ulxmlrpcpp;..\..\mockpp;$(BCB)\include;$(BCB)\include\vcl +Item17=..;$(BCB)\include;$(BCB)\include\vcl +Item18=..\ulxmlrpcpp;C:\Programme\Borland\CBuilder5\Projects;\\SONNE\HOMES\src\ulxr\mockpp_23\mockpp;..;..\mockpp;..\expat;$(BCB)\include;$(BCB)\include\vcl;C:\wx2\include\ +Item19=..\..\mockpp;..\mockpp;..\expat;$(BCB)\include;$(BCB)\include\vcl;C:\wx2\include\ +Item20=..;..\mockpp;..\expat;$(BCB)\include;$(BCB)\include\vcl;C:\wx2\include\ +Item21=..\..\mockpp;..\mockpp;..\expat;..;$(BCB)\include;$(BCB)\include\vcl;C:\wx2\include\ +Item22=..\..\mockpp;..\mockpp;..\expat;$(BCB)\include;$(BCB)\include\vcl;C:\wx2\include +Item23=..\..\mockpp;..\mockpp;..\expat;$(BCB)\include;$(BCB)\include\vcl +Item24=..;..\mockpp;..\expat;$(BCB)\include;$(BCB)\include\vcl +Item25=..\mockpp;..\expat;$(BCB)\include;$(BCB)\include\vcl +Item26=..\mockpp;$(BCB)\include;$(BCB)\include\vcl;..\..\Expat-1.95.2\Source\lib +Item27=..\mockpp;$(BCB)\include;$(BCB)\include\vcl [HistoryLists\hlLibraryPath] -Count=14 -Item0=..\mockpp\matcher;..\mockpp\constraint;..\mockpp\builder;..\mockpp\chaining;..\mockpp\compat;..\mockpp\util;..\mockpp_23\matcher;..\mockpp_23\constraint;..\mockpp_23\builder;..\mockpp;..\mockpp_23\chaining;..\mockpp_23\compat;..\mockpp_23\util;..;$(BCB)\lib\obj;$(BCB)\lib -Item1=..\mockpp\matcher;..\mockpp\constraint;..\mockpp\builder;..\mockpp\chaining;..\mockpp\compat;..\mockpp\util;..\mockpp_23\matcher;..\mockpp_23\constraint;..\mockpp_23\builder;..\mockpp;..\mockpp_23\chaining;..\mockpp_23\compat;..\mockpp_23\util;..\..\mockpp;$(BCB)\lib\obj;$(BCB)\lib -Item2=..;$(BCB)\lib\obj;$(BCB)\lib -Item3=..\mockpp_23\matcher;..\mockpp_23\constraint;..\mockpp_23\builder;..\mockpp;..\mockpp_23\chaining;..\mockpp_23\compat;..\mockpp_23\util;..;$(BCB)\lib\obj;$(BCB)\lib -Item4=..\mockpp_23\matcher;..\mockpp_23\constraint;..\mockpp_23\builder;..\mockpp;..\mockpp_23\chaining;..\mockpp_23\compat;..\mockpp_23\util;..\..\mockpp;$(BCB)\lib\obj;$(BCB)\lib -Item5=..\mockpp_23\builder;..\mockpp_23\matcher;..\mockpp_23\constraint;..\builder;\\SONNE\HOMES\Documents\src\mockpp_23\mockpp\mockpp_23\matcher;\\SONNE\HOMES\Documents\src\mockpp_23\mockpp\mockpp_23\constraint;\\SONNE\HOMES\Documents\src\mockpp_23\mockpp\mockpp_23\builder;..\mockpp_23\chaining;\\SONNE\HOMES\Documents\src\mockpp_23\mockpp\mockpp;\\SONNE\HOMES\Documents\src\mockpp_23\mockpp\mockpp_23\chaining;mockpp;..\mockpp_23\compat;..\mockpp_23\util;\\SONNE\HOMES\src\mockpp_23\mockpp\mockpp_23\compat;\\SONNE\HOMES\src\mockpp_23\mockpp\mockpp_23\util;\\SONNE\HOMES\src\mockpp_23\mockpp\mockpp;..\ulxmlrpcpp;C:\Programme\Borland\CBuilder5\Projects\;\\SONNE\HOMES\src\ulxr\mockpp_23\mockpp;..\mockpp;..\expat;$(BCB)\lib\obj;$(BCB)\lib;c:\tmp\compile\mockpp_23\ -Item6=mockpp;..\mockpp_23\compat;..\mockpp_23\util;\\SONNE\HOMES\src\mockpp_23\mockpp\mockpp_23\compat;\\SONNE\HOMES\src\mockpp_23\mockpp\mockpp_23\util;\\SONNE\HOMES\src\mockpp_23\mockpp\mockpp;..\ulxmlrpcpp;C:\Programme\Borland\CBuilder5\Projects\;\\SONNE\HOMES\src\ulxr\mockpp_23\mockpp;..\mockpp;..\expat;$(BCB)\lib\obj;$(BCB)\lib;c:\tmp\compile\mockpp_23\ -Item7=..\mockpp_23\compat;..\mockpp_23\util;\\SONNE\HOMES\src\mockpp_23\mockpp\mockpp_23\compat;\\SONNE\HOMES\src\mockpp_23\mockpp\mockpp_23\util;\\SONNE\HOMES\src\mockpp_23\mockpp\mockpp;..\ulxmlrpcpp;C:\Programme\Borland\CBuilder5\Projects\;\\SONNE\HOMES\src\ulxr\mockpp_23\mockpp;..\mockpp;..\expat;$(BCB)\lib\obj;$(BCB)\lib;c:\tmp\compile\mockpp_23\ -Item8=..\ulxmlrpcpp;C:\Programme\Borland\CBuilder5\Projects;\\SONNE\HOMES\src\ulxr\mockpp_23\mockpp;..\mockpp;..\expat;$(BCB)\lib\obj;$(BCB)\lib;c:\tmp\compile\mockpp_23\ -Item9=..\mockpp;..\expat;$(BCB)\lib\obj;$(BCB)\lib;c:\tmp\compile\mockpp_23\ -Item10=..\mockpp;..\expat;$(BCB)\lib\obj;$(BCB)\lib;c:\temp -Item11=..\mockpp;..\expat;$(BCB)\lib\obj;$(BCB)\lib -Item12=..\expat;$(BCB)\lib\obj;$(BCB)\lib -Item13=..\mockpp;$(BCB)\lib\obj;$(BCB)\lib +Count=15 +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_23\matcher;..\mockpp_23\constraint;..\mockpp_23\builder;..\mockpp;..\mockpp_23\chaining;..\mockpp_23\compat;..\mockpp_23\util;..;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\mockpp\matcher;..\mockpp\constraint;..\mockpp\builder;..\mockpp\chaining;..\mockpp\compat;..\mockpp\util;..\mockpp_23\matcher;..\mockpp_23\constraint;..\mockpp_23\builder;..\mockpp;..\mockpp_23\chaining;..\mockpp_23\compat;..\mockpp_23\util;..;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\mockpp\matcher;..\mockpp\constraint;..\mockpp\builder;..\mockpp\chaining;..\mockpp\compat;..\mockpp\util;..\mockpp_23\matcher;..\mockpp_23\constraint;..\mockpp_23\builder;..\mockpp;..\mockpp_23\chaining;..\mockpp_23\compat;..\mockpp_23\util;..\..\mockpp;$(BCB)\lib\obj;$(BCB)\lib +Item3=..;$(BCB)\lib\obj;$(BCB)\lib +Item4=..\mockpp_23\matcher;..\mockpp_23\constraint;..\mockpp_23\builder;..\mockpp;..\mockpp_23\chaining;..\mockpp_23\compat;..\mockpp_23\util;..;$(BCB)\lib\obj;$(BCB)\lib +Item5=..\mockpp_23\matcher;..\mockpp_23\constraint;..\mockpp_23\builder;..\mockpp;..\mockpp_23\chaining;..\mockpp_23\compat;..\mockpp_23\util;..\..\mockpp;$(BCB)\lib\obj;$(BCB)\lib +Item6=..\mockpp_23\builder;..\mockpp_23\matcher;..\mockpp_23\constraint;..\builder;\\SONNE\HOMES\Documents\src\mockpp_23\mockpp\mockpp_23\matcher;\\SONNE\HOMES\Documents\src\mockpp_23\mockpp\mockpp_23\constraint;\\SONNE\HOMES\Documents\src\mockpp_23\mockpp\mockpp_23\builder;..\mockpp_23\chaining;\\SONNE\HOMES\Documents\src\mockpp_23\mockpp\mockpp;\\SONNE\HOMES\Documents\src\mockpp_23\mockpp\mockpp_23\chaining;mockpp;..\mockpp_23\compat;..\mockpp_23\util;\\SONNE\HOMES\src\mockpp_23\mockpp\mockpp_23\compat;\\SONNE\HOMES\src\mockpp_23\mockpp\mockpp_23\util;\\SONNE\HOMES\src\mockpp_23\mockpp\mockpp;..\ulxmlrpcpp;C:\Programme\Borland\CBuilder5\Projects\;\\SONNE\HOMES\src\ulxr\mockpp_23\mockpp;..\mockpp;..\expat;$(BCB)\lib\obj;$(BCB)\lib;c:\tmp\compile\mockpp_23\ +Item7=mockpp;..\mockpp_23\compat;..\mockpp_23\util;\\SONNE\HOMES\src\mockpp_23\mockpp\mockpp_23\compat;\\SONNE\HOMES\src\mockpp_23\mockpp\mockpp_23\util;\\SONNE\HOMES\src\mockpp_23\mockpp\mockpp;..\ulxmlrpcpp;C:\Programme\Borland\CBuilder5\Projects\;\\SONNE\HOMES\src\ulxr\mockpp_23\mockpp;..\mockpp;..\expat;$(BCB)\lib\obj;$(BCB)\lib;c:\tmp\compile\mockpp_23\ +Item8=..\mockpp_23\compat;..\mockpp_23\util;\\SONNE\HOMES\src\mockpp_23\mockpp\mockpp_23\compat;\\SONNE\HOMES\src\mockpp_23\mockpp\mockpp_23\util;\\SONNE\HOMES\src\mockpp_23\mockpp\mockpp;..\ulxmlrpcpp;C:\Programme\Borland\CBuilder5\Projects\;\\SONNE\HOMES\src\ulxr\mockpp_23\mockpp;..\mockpp;..\expat;$(BCB)\lib\obj;$(BCB)\lib;c:\tmp\compile\mockpp_23\ +Item9=..\ulxmlrpcpp;C:\Programme\Borland\CBuilder5\Projects;\\SONNE\HOMES\src\ulxr\mockpp_23\mockpp;..\mockpp;..\expat;$(BCB)\lib\obj;$(BCB)\lib;c:\tmp\compile\mockpp_23\ +Item10=..\mockpp;..\expat;$(BCB)\lib\obj;$(BCB)\lib;c:\tmp\compile\mockpp_23\ +Item11=..\mockpp;..\expat;$(BCB)\lib\obj;$(BCB)\lib;c:\temp +Item12=..\mockpp;..\expat;$(BCB)\lib\obj;$(BCB)\lib +Item13=..\expat;$(BCB)\lib\obj;$(BCB)\lib +Item14=..\mockpp;$(BCB)\lib\obj;$(BCB)\lib [HistoryLists\hlDebugSourcePath] Count=1 Index: mockpp.bpf =================================================================== RCS file: /cvsroot/mockpp/mockpp/bcb5/mockpp.bpf,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- mockpp.bpf 3 Mar 2005 23:31:05 -0000 1.16 +++ mockpp.bpf 5 Mar 2005 14:53:38 -0000 1.17 @@ -32,7 +32,10 @@ USEUNIT("..\mockpp\matcher\InvokeOnceMatcher.cpp"); USEUNIT("..\mockpp\matcher\TestFailureMatcher.cpp"); USEUNIT("..\mockpp\matcher\InvokeAtLeastMatcher.cpp"); -//------------------------------------------------------- +USEUNIT("..\mockpp\builder\IdentityBuilder.cpp"); +USEUNIT("..\mockpp\constraint\TypelessConstraint.cpp"); +USEUNIT("..\mockpp\constraint\ConstraintSet.cpp"); +//--------------------------------------------------------------------------- This file is used by the project manager only and should be treated like the project file DllEntryPoint Index: jmock_test.bpr =================================================================== RCS file: /cvsroot/mockpp/mockpp/bcb5/jmock_test.bpr,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- jmock_test.bpr 1 Mar 2005 19:34:29 -0000 1.16 +++ jmock_test.bpr 5 Mar 2005 14:53:37 -0000 1.17 @@ -4,70 +4,72 @@ <MACROS> <VERSION value="BCB.05.03"/> <PROJECT value="c:\tmp\compile\jmock_test_23.exe"/> - <OBJFILES value="c:\tmp\compile\mockpp_23\\AbstractInvocationDispatcher_test.obj - c:\tmp\compile\mockpp_23\\ChainingMockBuilder_test.obj - c:\tmp\compile\mockpp_23\\ChainableMockObject_void_test.obj - c:\tmp\compile\mockpp_23\\classes_ABCDE.obj - c:\tmp\compile\mockpp_23\\And_test.obj - c:\tmp\compile\mockpp_23\\IsAnything_test.obj - c:\tmp\compile\mockpp_23\\IsCloseTo_test.obj - c:\tmp\compile\mockpp_23\\IsEqual_test.obj - c:\tmp\compile\mockpp_23\\IsGreaterOrEqual_test.obj - c:\tmp\compile\mockpp_23\\IsGreaterThan_test.obj - c:\tmp\compile\mockpp_23\\IsInstanceOf_test.obj - c:\tmp\compile\mockpp_23\\IsLessOrEqual_test.obj - c:\tmp\compile\mockpp_23\\IsLessThan_test.obj - c:\tmp\compile\mockpp_23\\IsNot_test.obj - c:\tmp\compile\mockpp_23\\IsNothing_test.obj - c:\tmp\compile\mockpp_23\\IsSame_test.obj - c:\tmp\compile\mockpp_23\\Or_test.obj - c:\tmp\compile\mockpp_23\\ReturnStub_test.obj - c:\tmp\compile\mockpp_23\\StringContains_test.obj - c:\tmp\compile\mockpp_23\\StringStartsWith_test.obj - c:\tmp\compile\mockpp_23\\StringEndsWith_test.obj - c:\tmp\compile\mockpp_23\\StubSequence_test.obj - c:\tmp\compile\mockpp_23\\TestFailureStub_test.obj - c:\tmp\compile\mockpp_23\\ThrowStub_test.obj - c:\tmp\compile\mockpp_23\\VoidStub_test.obj - c:\tmp\compile\mockpp_23\\CustomStub_test.obj - c:\tmp\compile\mockpp_23\\DefaultResultStub_test.obj - c:\tmp\compile\mockpp_23\\mock_test.obj - c:\tmp\compile\mockpp_23\\Invocation_test.obj - c:\tmp\compile\mockpp_23\\AnyArgumentsMatcher_test.obj - c:\tmp\compile\mockpp_23\\InvokedRecorder_test.obj - c:\tmp\compile\mockpp_23\\InvokeAtLeastOnceMatcher_test.obj - c:\tmp\compile\mockpp_23\\InvokeOnceMatcher_test.obj - c:\tmp\compile\mockpp_23\\InvokeCountMatcher_test.obj - c:\tmp\compile\mockpp_23\\InvokedAfterMatcher_test.obj - c:\tmp\compile\mockpp_23\\TestFailureMatcher_test.obj - c:\tmp\compile\mockpp_23\\NoArgumentsMatcher_test.obj - c:\tmp\compile\mockpp_23\\ArgumentsMatcher_test.obj - c:\tmp\compile\mockpp_23\\ConstraintSet_test.obj - c:\tmp\compile\mockpp_23\\ArgumentsMatchBuilder_test.obj - c:\tmp\compile\mockpp_23\\InvocationMockerBuilder_test.obj - c:\tmp\compile\mockpp_23\\AbstractDynamicChainingMock_test.obj - c:\tmp\compile\mockpp_23\\CoreMock_test.obj - c:\tmp\compile\mockpp_23\\DynamicChainingMockError_test.obj - c:\tmp\compile\mockpp_23\\FIFOInvocationDispatcher_test.obj - c:\tmp\compile\mockpp_23\\InvocationMocker_test.obj - c:\tmp\compile\mockpp_23\\LIFOInvocationDispatcher_test.obj - c:\tmp\compile\mockpp_23\\InvokeAtMostMatcher_test.obj - c:\tmp\compile\mockpp_23\\InvokedBeforeMatcher_test.obj - c:\tmp\compile\mockpp_23\\ChainableMockObject_1_void_test.obj - c:\tmp\compile\mockpp_23\\ChainableMockObject_2_test.obj - c:\tmp\compile\mockpp_23\\ChainableMockObject_2_void_test.obj - c:\tmp\compile\mockpp_23\\ChainableMockObject_3_test.obj - c:\tmp\compile\mockpp_23\\ChainableMockObject_3_void_test.obj - c:\tmp\compile\mockpp_23\\ChainableMockObject_4_test.obj - c:\tmp\compile\mockpp_23\\ChainableMockObject_4_void_test.obj - c:\tmp\compile\mockpp_23\\ChainableMockObject_5_test.obj - c:\tmp\compile\mockpp_23\\ChainableMockObject_5_void_test.obj - c:\tmp\compile\mockpp_23\\ChainableMockObject_test.obj - c:\tmp\compile\mockpp_23\\ChainableMockObject_1_test.obj - c:\tmp\compile\mockpp_23\\MatchBuilder_test.obj - c:\tmp\compile\mockpp_23\\MockObject_test.obj - c:\tmp\compile\mockpp_23\\StubBuilder_test.obj - c:\tmp\compile\mockpp_23\\TypelessStubSequence_test.obj + <OBJFILES value="c:\tmp\compile\mockpp_23\\AbstractInvocationDispatcher_test.obj + c:\tmp\compile\mockpp_23\\ChainingMockBuilder_test.obj + c:\tmp\compile\mockpp_23\\ChainableMockObject_void_test.obj + c:\tmp\compile\mockpp_23\\classes_ABCDE.obj + c:\tmp\compile\mockpp_23\\And_test.obj + c:\tmp\compile\mockpp_23\\IsAnything_test.obj + c:\tmp\compile\mockpp_23\\IsCloseTo_test.obj + c:\tmp\compile\mockpp_23\\IsEqual_test.obj + c:\tmp\compile\mockpp_23\\IsGreaterOrEqual_test.obj + c:\tmp\compile\mockpp_23\\IsGreaterThan_test.obj + c:\tmp\compile\mockpp_23\\IsInstanceOf_test.obj + c:\tmp\compile\mockpp_23\\IsLessOrEqual_test.obj + c:\tmp\compile\mockpp_23\\IsLessThan_test.obj + c:\tmp\compile\mockpp_23\\IsNot_test.obj + c:\tmp\compile\mockpp_23\\IsNothing_test.obj + c:\tmp\compile\mockpp_23\\IsSame_test.obj + c:\tmp\compile\mockpp_23\\Or_test.obj + c:\tmp\compile\mockpp_23\\ReturnStub_test.obj + c:\tmp\compile\mockpp_23\\StringContains_test.obj + c:\tmp\compile\mockpp_23\\StringStartsWith_test.obj + c:\tmp\compile\mockpp_23\\StringEndsWith_test.obj + c:\tmp\compile\mockpp_23\\StubSequence_test.obj + c:\tmp\compile\mockpp_23\\TestFailureStub_test.obj + c:\tmp\compile\mockpp_23\\ThrowStub_test.obj + c:\tmp\compile\mockpp_23\\VoidStub_test.obj + c:\tmp\compile\mockpp_23\\CustomStub_test.obj + c:\tmp\compile\mockpp_23\\DefaultResultStub_test.obj + c:\tmp\compile\mockpp_23\\mock_test.obj + c:\tmp\compile\mockpp_23\\Invocation_test.obj + c:\tmp\compile\mockpp_23\\AnyArgumentsMatcher_test.obj + c:\tmp\compile\mockpp_23\\InvokedRecorder_test.obj + c:\tmp\compile\mockpp_23\\InvokeAtLeastOnceMatcher_test.obj + c:\tmp\compile\mockpp_23\\UnlimitedMatcher_test.obj + c:\tmp\compile\mockpp_23\\InvokeOnceMatcher_test.obj + c:\tmp\compile\mockpp_23\\InvokeCountMatcher_test.obj + c:\tmp\compile\mockpp_23\\InvokedAfterMatcher_test.obj + c:\tmp\compile\mockpp_23\\TestFailureMatcher_test.obj + c:\tmp\compile\mockpp_23\\NoArgumentsMatcher_test.obj + c:\tmp\compile\mockpp_23\\ArgumentsMatcher_test.obj + c:\tmp\compile\mockpp_23\\ConstraintSet_test.obj + c:\tmp\compile\mockpp_23\\ConstraintList_test.obj + c:\tmp\compile\mockpp_23\\ArgumentsMatchBuilder_test.obj + c:\tmp\compile\mockpp_23\\InvocationMockerBuilder_test.obj + c:\tmp\compile\mockpp_23\\AbstractDynamicChainingMock_test.obj + c:\tmp\compile\mockpp_23\\CoreMock_test.obj + c:\tmp\compile\mockpp_23\\DynamicChainingMockError_test.obj + c:\tmp\compile\mockpp_23\\FIFOInvocationDispatcher_test.obj + c:\tmp\compile\mockpp_23\\InvocationMocker_test.obj + c:\tmp\compile\mockpp_23\\LIFOInvocationDispatcher_test.obj + c:\tmp\compile\mockpp_23\\InvokeAtMostMatcher_test.obj + c:\tmp\compile\mockpp_23\\InvokedBeforeMatcher_test.obj + c:\tmp\compile\mockpp_23\\ChainableMockObject_1_void_test.obj + c:\tmp\compile\mockpp_23\\ChainableMockObject_2_test.obj + c:\tmp\compile\mockpp_23\\ChainableMockObject_2_void_test.obj + c:\tmp\compile\mockpp_23\\ChainableMockObject_3_test.obj + c:\tmp\compile\mockpp_23\\ChainableMockObject_3_void_test.obj + c:\tmp\compile\mockpp_23\\ChainableMockObject_4_test.obj + c:\tmp\compile\mockpp_23\\ChainableMockObject_4_void_test.obj + c:\tmp\compile\mockpp_23\\ChainableMockObject_5_test.obj + c:\tmp\compile\mockpp_23\\ChainableMockObject_5_void_test.obj + c:\tmp\compile\mockpp_23\\ChainableMockObject_test.obj + c:\tmp\compile\mockpp_23\\ChainableMockObject_1_test.obj + c:\tmp\compile\mockpp_23\\MatchBuilder_test.obj + c:\tmp\compile\mockpp_23\\MockObject_test.obj + c:\tmp\compile\mockpp_23\\StubBuilder_test.obj + c:\tmp\compile\mockpp_23\\TypelessStubSequence_test.obj c:\tmp\compile\mockpp_23\\ChainingMockObjectSupport_test.obj"/> <RESFILES value=""/> <DEFFILE value=""/> @@ -75,9 +77,9 @@ <LIBFILES value="c:\tmp\compile\mockpp_23.lib c:\tmp\compile\cppunit_1_10.lib"/> <LIBRARIES value=""/> <SPARELIBS value=""/> - <PACKAGES value="VCL50.bpi VCLX50.bpi bcbsmp50.bpi QRPT50.bpi VCLDB50.bpi VCLBDE50.bpi - ibsmp50.bpi VCLDBX50.bpi TEEUI50.bpi TEEDB50.bpi TEE50.bpi TEEQR50.bpi - VCLIB50.bpi bcbie50.bpi VCLIE50.bpi INETDB50.bpi INET50.bpi NMFAST50.bpi + <PACKAGES value="VCL50.bpi VCLX50.bpi bcbsmp50.bpi QRPT50.bpi VCLDB50.bpi VCLBDE50.bpi + 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\tests"/> <PATHPAS value=".;"/> @@ -95,7 +97,7 @@ </MACROS> <OPTIONS> <CFLAG1 value="-vGc -vGt -vGd -Od -Vx -Ve -X- -r- -a8 -b- -k -y -v -vi- -tWC -tWM -c"/> - <PFLAGS value="-N2"c:\tmp\compile\mockpp_23\" -N0"c:\tmp\compile\mockpp_23\" -$YD -$W + <PFLAGS value="-N2"c:\tmp\compile\mockpp_23\" -N0"c:\tmp\compile\mockpp_23\" -$YD -$W -$O- -v -JPHNE -M"/> <RFLAGS value=""/> <AFLAGS value="/mx /w2 /zd"/> |
From: Ewald A. <ewa...@us...> - 2005-03-04 23:37:10
|
Update of /cvsroot/mockpp/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25236 Modified Files: TODO Log Message: update documentation Index: TODO =================================================================== RCS file: /cvsroot/mockpp/mockpp/TODO,v retrieving revision 1.37 retrieving revision 1.38 diff -u -d -r1.37 -r1.38 --- TODO 27 Feb 2005 18:04:28 -0000 1.37 +++ TODO 4 Mar 2005 23:36:59 -0000 1.38 @@ -1,15 +1,11 @@ -chainable macros überarbeiten: _/**/ +MixedMockObject DOC: ---- - visitable + constraints ==> doc + tutorial - Problem Exception-Transformation?? - lastWasMethodName in InvocationMocker - VC partial templates: http://www.developer.com/net/csharp/article.php/2217451 Controller addController aufl�en, verify direkt + Tests: { ctr } |
From: Ewald A. <ewa...@us...> - 2005-03-04 23:37:09
|
Update of /cvsroot/mockpp/mockpp/mockpp/examples/tutorial In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25236/mockpp/examples/tutorial Modified Files: chainmock.cpp tut-basic.dox tut-chain.dox tut-visit.dox tutorial.dox visitmock.cpp Log Message: update documentation Index: tut-chain.dox =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/examples/tutorial/tut-chain.dox,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- tut-chain.dox 20 Feb 2005 17:43:14 -0000 1.6 +++ tut-chain.dox 4 Mar 2005 23:37:00 -0000 1.7 @@ -27,6 +27,14 @@ using mockpp::throwException; \endcode +A more convenient way is to place a \c #define before including the mockpp headers +which imports all these shortcut functions into the global namespace: + +\code +#define MOCKPP_IMPORT_ABBREVIATED +#include <mockpp/chaining/ChainingMockObjectSupport.h> +\endcode + The next solution of the know testing problem uses another type of advanced mock objects. It is called <em>ChainableMockObject</em> because the expectations are created by chaining Index: tut-basic.dox =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/examples/tutorial/tut-basic.dox,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- tut-basic.dox 7 Jan 2005 09:36:21 -0000 1.2 +++ tut-basic.dox 4 Mar 2005 23:37:00 -0000 1.3 @@ -114,6 +114,16 @@ mock.read_data.addObjectToReturn("record-3"); \endcode +While processing the records a method \c calculate is invoked several times. Since the input +can't be determined exactly a \c mockpp::ConstraintList is used which verifies similar to +a mockpp::ExpectationList but on the base of a mean amount and a delta value. + +\code + mock.calculate_input.addExpected(eq<unsigned>(5,5)); + mock.calculate_input.addExpected(eq<unsigned>(5,5)); + mock.calculate_input.addExpected(eq<unsigned>(5,5)); +\endcode + The number of calls to \c close() must equal the calls to \c open() . For that reason the according \c mockpp::ExpectationCounter is set to 2: Index: tutorial.dox =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/examples/tutorial/tutorial.dox,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- tutorial.dox 19 Feb 2005 14:05:19 -0000 1.11 +++ tutorial.dox 4 Mar 2005 23:37:00 -0000 1.12 @@ -33,7 +33,8 @@ solved in different ways. There is a class \c Consumer which loads a configuration file. This file is a simple text file with a data record in each line. Each line will be processed and written back in a modified form at the end. For simplicity the string "/processed" is -appended to the original record. +appended to the original record. While processing the data a method \c calculate is invoked +with not exactly defined values. \c Consumer uses another class derived from the pure virtual class \c Interface which provides methods for opening, reading and writing the data file: @@ -44,6 +45,7 @@ public: virtual void open(const std::string &name) = 0; virtual std::string read() = 0; + virtual unsigned calculate(unsigned input) = 0; virtual void write(const std::string &data) = 0; virtual void close() = 0; }; Index: visitmock.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/examples/tutorial/visitmock.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- visitmock.cpp 4 Mar 2005 21:10:02 -0000 1.7 +++ visitmock.cpp 4 Mar 2005 23:37:00 -0000 1.8 @@ -74,12 +74,12 @@ read_controller.addReturnValue("record-3"); // processing is not exactly defined - 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)); + 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)); // record program flow while writing data mock.open("file1.lst"); Index: chainmock.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/examples/tutorial/chainmock.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- chainmock.cpp 4 Mar 2005 21:10:02 -0000 1.5 +++ chainmock.cpp 4 Mar 2005 23:37:00 -0000 1.6 @@ -81,9 +81,9 @@ // Expectations for processing the file calculate_chainer.expects(atLeast(3)) - .with(eq<unsigned>(5 ,5)) - .after(MOCKPP_PCHAR("reader")); - + .with(eq<unsigned>(5, 5)) + .after(MOCKPP_PCHAR("reader")) + .will(returnValue<unsigned>(1)); // Expectations for writing the file back open_chainer.expects(once()) Index: tut-visit.dox =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/examples/tutorial/tut-visit.dox,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- tut-visit.dox 20 Feb 2005 17:43:14 -0000 1.4 +++ tut-visit.dox 4 Mar 2005 23:37:00 -0000 1.5 @@ -155,6 +155,33 @@ <a href="../handbook/ch01s03s02.html#visit-order" >VisitableMockObject section</a> of the handbook. +Since the parameters passed to \c calculate are not exactly defined we must implement +some tolerance. This can be achieved with an according constraint. In this case +\c mockpp::IsCloseTo which allows a delta value. + +\code + mock.calculate(eq<unsigned>(5,5)); + mock.calculate(eq<unsigned>(5,5)); + mock.calculate(eq<unsigned>(5,5)); +\endcode + +Another constraint is used to verify the data that is written back. The important part is +the appended string "processed" so only this substring is verified: + +\code + mock.write(stringContains("processed")); + mock.write(stringContains("processed")); +\endcode + +In a similar manner the return value can be influence by passing the controller object +according constraints instead of exact values. + +\code + calculate_controller.addResponseValue(10, eq<unsigned>(2,2)); + calculate_controller.addResponseValue(20, eq<unsigned>(4,2)); + calculate_controller.addResponseValue(30, eq<unsigned>(6,2)); +\endcode + <a href="visitmock_8cpp-source.html">visitmock.cpp</a> contains the complete source code. Next: \ref chain_mo |
From: Ewald A. <ewa...@us...> - 2005-03-04 23:37:09
|
Update of /cvsroot/mockpp/mockpp/mockpp/matcher In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25236/mockpp/matcher Modified Files: UnlimitedMatcher.h Log Message: update documentation Index: UnlimitedMatcher.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/matcher/UnlimitedMatcher.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- UnlimitedMatcher.h 3 Mar 2005 23:32:26 -0000 1.1 +++ UnlimitedMatcher.h 4 Mar 2005 23:37:00 -0000 1.2 @@ -41,7 +41,7 @@ namespace mockpp { -/** Mtches any invcotion +/** Matches any invcotion * @ingroup grp_matcher * @see mockpp::unlimited */ |
From: Ewald A. <ewa...@us...> - 2005-03-04 23:37:08
|
Update of /cvsroot/mockpp/mockpp/mockpp/docs/en In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25236/mockpp/docs/en Modified Files: dev_advanced_easymock.docbook dev_helper.docbook Log Message: update documentation Index: dev_helper.docbook =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/docs/en/dev_helper.docbook,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- dev_helper.docbook 21 Nov 2004 19:32:39 -0000 1.6 +++ dev_helper.docbook 4 Mar 2005 23:37:00 -0000 1.7 @@ -38,6 +38,7 @@ MOCKPP_ASSERT_EXCLUDES(substr, target); MOCKPP_ASSERT_STARTSWITH(substr, target); MOCKPP_ASSERT_THROWING(action, action_descr, exception, exception_data); <co id="throwing-co" linkends="assert-throwing" /> + MOCKPP_ASSERT_THROWING_COND(action, action_descr, exception, condition); </programlisting> @@ -66,7 +67,7 @@ <callout arearefs="throwing-co" id="assert-throwing" > <para>Another frequent task is to test the correct throwing of - exceptions. This is easily done with the according macro.</para> + exceptions. This is easily done with the according macros.</para> </callout> </calloutlist> Index: dev_advanced_easymock.docbook =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/docs/en/dev_advanced_easymock.docbook,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- dev_advanced_easymock.docbook 5 Jan 2005 14:39:59 -0000 1.6 +++ dev_advanced_easymock.docbook 4 Mar 2005 23:37:00 -0000 1.7 @@ -47,9 +47,11 @@ access_ctr.addThrowable(std::string("throw"), 2); <co id="mock-feed1-co" linkends="mock-feed1" /> access_ctr.addResponseValue(1, 13); <co id="mock-feed2-co" linkends="mock-feed2" /> access_ctr.addResponseValue(2, 37); + access_ctr.addResponseValue(3, gt<unsigned>(50)); <co id="mock-gt-co" linkends="mock-gt" /> mvo.access(1); <co id="mock-feed3-co" linkends="mock-feed3" /> mvo.access(13); + mvo.access(lt<unsigned>(123)); <co id="mock-feed4-co" linkends="mock-feed4" /> mvo.activate(); <co id="mock-activate-co" linkends="mock-activate" /> @@ -96,12 +98,23 @@ with certain return values.</para> </callout> + <callout arearefs="mock-gt-co" id="mock-gt" > + <para>The former controller parameters where strict and demanded exact equality. + By using <link linkend="parameter-constraint">constraint objects</link> it is possible + to use arbitrary tolerance. In the example the parameter must be greater than 50 + to return 3.</para> + </callout> + <callout arearefs="mock-feed3-co" id="mock-feed3" > <para>Describe the expected execution path and the expected parameters for the method how it shall happen in your test later. This is simply done by calling the methods.</para> </callout> + <callout arearefs="mock-feed4-co" id="mock-feed4" > + <para>Demands that the parameter value is less than 123.</para> + </callout> + <callout arearefs="mock-activate-co" id="mock-activate" > <para>Activate the object and use it in the tests.</para> </callout> |
From: Ewald A. <ewa...@us...> - 2005-03-04 23:36:06
|
Update of /cvsroot/mockpp/mockpp/mockpp/constraint In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24974/mockpp/constraint Modified Files: Constraint.h ConstraintSet.h Makefile.am TypelessConstraint.h Added Files: ConstraintSet.cpp TypelessConstraint.cpp Log Message: separated header and source Index: Makefile.am =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/constraint/Makefile.am,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- Makefile.am 27 Feb 2005 11:48:15 -0000 1.8 +++ Makefile.am 4 Mar 2005 23:35:56 -0000 1.9 @@ -12,4 +12,4 @@ libconstraintincludedir = $(includedir)/mockpp/constraint -libconstraint_la_SOURCES = IsAnything.cpp IsNothing.cpp +libconstraint_la_SOURCES = IsAnything.cpp IsNothing.cpp ConstraintSet.cpp TypelessConstraint.cpp --- NEW FILE: ConstraintSet.cpp --- /** @file @internal @brief A set of argument constrains $Id: ConstraintSet.cpp,v 1.1 2005/03/04 23:35:56 ewald-arnold Exp $ ***************************************************************************/ /************************************************************************** begin : Sat Aug 21 2004 copyright : (C) 2002-2005 by Ewald Arnold email : mockpp at ewald-arnold dot de 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 #include <mockpp/constraint/ConstraintSet.h> namespace mockpp { String MOCKPP_EXPORT ConstraintSet0::describeTo( String &buffer ) const { return buffer; } } // namespace mockpp Index: TypelessConstraint.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/constraint/TypelessConstraint.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- TypelessConstraint.h 30 Jan 2005 12:09:18 -0000 1.5 +++ TypelessConstraint.h 4 Mar 2005 23:35:56 -0000 1.6 @@ -52,8 +52,7 @@ /** Destroys the object */ - virtual ~TypelessConstraint() - {} + virtual ~TypelessConstraint(); /** Evaluates the constraint without actual arguments. * @return <code>true</code> if the invocation meets the constraint, --- NEW FILE: TypelessConstraint.cpp --- /** @file @internal @brief Base class for typeless argument constraints $Id: TypelessConstraint.cpp,v 1.1 2005/03/04 23:35:56 ewald-arnold Exp $ ***************************************************************************/ /************************************************************************** begin : Sun Oct 24 2004 copyright : (C) 2002-2005 by Ewald Arnold email : mockpp at ewald-arnold dot de 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 #include <mockpp/constraint/TypelessConstraint.h> namespace mockpp { MOCKPP_EXPORT TypelessConstraint::~TypelessConstraint() { } } // namespace mockpp Index: ConstraintSet.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/constraint/ConstraintSet.h,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- ConstraintSet.h 3 Mar 2005 14:54:08 -0000 1.11 +++ ConstraintSet.h 4 Mar 2005 23:35:56 -0000 1.12 @@ -60,10 +60,7 @@ * @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 buffer; - } + virtual String describeTo( String &buffer ) const; }; Index: Constraint.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/constraint/Constraint.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Constraint.h 6 Jan 2005 13:09:22 -0000 1.6 +++ Constraint.h 4 Mar 2005 23:35:56 -0000 1.7 @@ -45,7 +45,7 @@ /** A constraint over acceptable values. - * Constraints are part of a chained expectation an form a sub-expectation + * Constraints are part of a chained expectation and form a sub-expectation * over a method parameter. * @defgroup grp_constraint Parameter Constraints */ |
From: Ewald A. <ewa...@us...> - 2005-03-04 23:36:04
|
Update of /cvsroot/mockpp/mockpp/mockpp/chaining In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24974/mockpp/chaining Modified Files: Invocation.cpp Invocation.h Log Message: separated header and source Index: Invocation.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/Invocation.h,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- Invocation.h 30 Jan 2005 12:09:18 -0000 1.11 +++ Invocation.h 4 Mar 2005 23:35:55 -0000 1.12 @@ -56,8 +56,7 @@ /** Destroys the object */ - virtual ~InvocationBase() - {} + virtual ~InvocationBase(); }; @@ -72,29 +71,18 @@ /** Constructs the object * @param in_name name of he object */ - Invocation( const String &in_name) - : name(in_name) - { - } + Invocation( const String &in_name); /** 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 - { - buffer += getMethodName(); - buffer += MOCKPP_PCHAR( "(" ) + describeParameters() + MOCKPP_PCHAR( ")" ) ; - return buffer; - } + virtual String describeTo( String &buffer ) const; /** Returns the method name * @return the method name */ - String getMethodName() const - { - return name; - } + String getMethodName() const; /** Returns a description of the parameters * @return the description @@ -124,36 +112,24 @@ /** Constructs the invocation * @param name the method name */ - Invocation0( const String &name) - : Invocation( name) - { - } + Invocation0( const String &name); /** Check if the object equals another invocation * @param other the other invocation * @return true: objects are equal */ - bool equals( const Invocation0 &other ) const - { - return true; - } + bool equals( const Invocation0 &other ) const; /** Check if the object equals another invocation * @param other the other invocation * @return true: objects are equal */ - bool equals( const InvocationBase &other ) const - { - return false; - } + bool equals( const InvocationBase &other ) const; /** Returns a description of the parameters * @return the description */ - virtual String describeParameters() const - { - return String(); - } + virtual String describeParameters() const; }; Index: Invocation.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/Invocation.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Invocation.cpp 30 Dec 2004 20:54:04 -0000 1.3 +++ Invocation.cpp 4 Mar 2005 23:35:55 -0000 1.4 @@ -35,5 +35,60 @@ namespace mockpp { +MOCKPP_EXPORT InvocationBase::~InvocationBase() +{ +} + + +///////////////////////////////////////////////////////////// + + +MOCKPP_EXPORT Invocation::Invocation( const String &in_name) + : name(in_name) +{ +} + + +String MOCKPP_EXPORT Invocation::describeTo( String &buffer ) const +{ + buffer += getMethodName(); + buffer += MOCKPP_PCHAR( "(" ) + describeParameters() + MOCKPP_PCHAR( ")" ) ; + return buffer; +} + + +String MOCKPP_EXPORT Invocation::getMethodName() const +{ + return name; +} + + +///////////////////////////////////////////////////////////// + + +MOCKPP_EXPORT Invocation0::Invocation0( const String &name) + : Invocation( name) +{ +} + + +bool MOCKPP_EXPORT Invocation0::equals( const Invocation0 &/*other*/ ) const +{ + return true; +} + + +bool MOCKPP_EXPORT Invocation0::equals( const InvocationBase &/*other*/ ) const +{ + return false; +} + + +String MOCKPP_EXPORT Invocation0::describeParameters() const +{ + return String(); +} + + } // namespace mockpp |
From: Ewald A. <ewa...@us...> - 2005-03-04 23:36:04
|
Update of /cvsroot/mockpp/mockpp/mockpp/builder In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24974/mockpp/builder Modified Files: IdentityBuilder.h Makefile.am Added Files: IdentityBuilder.cpp Log Message: separated header and source Index: IdentityBuilder.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/builder/IdentityBuilder.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- IdentityBuilder.h 30 Dec 2004 20:54:04 -0000 1.10 +++ IdentityBuilder.h 4 Mar 2005 23:35:55 -0000 1.11 @@ -52,8 +52,7 @@ /** Destruct the item. * Also makes destructor virtual. */ - virtual ~IdentityBuilder() - {} + virtual ~IdentityBuilder(); /** Sets the identifier for the expectation. * @param id identifier for the expectation --- NEW FILE: IdentityBuilder.cpp --- /** @file @internal @brief Build an identity for an invocation $Id: IdentityBuilder.cpp,v 1.1 2005/03/04 23:35:55 ewald-arnold Exp $ ***************************************************************************/ /************************************************************************** begin : Sun Aug 22 2004 copyright : (C) 2002-2005 by Ewald Arnold email : mockpp at ewald-arnold dot de 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. * * Original Java Sources: Copyright (c) 2000-2004, jMock.org * **/ #include <mockpp/mockpp.h> // always first #include <mockpp/builder/IdentityBuilder.h> namespace mockpp { MOCKPP_EXPORT IdentityBuilder::~IdentityBuilder() { } } // namespace mockpp Index: Makefile.am =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/builder/Makefile.am,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Makefile.am 24 Oct 2004 16:43:22 -0000 1.6 +++ Makefile.am 4 Mar 2005 23:35:55 -0000 1.7 @@ -8,4 +8,4 @@ noinst_LTLIBRARIES = libbuilder.la -libbuilder_la_SOURCES = BuilderNamespace.cpp +libbuilder_la_SOURCES = BuilderNamespace.cpp IdentityBuilder.cpp |
From: Ewald A. <ewa...@us...> - 2005-03-04 21:20:53
|
Update of /cvsroot/mockpp/CVSROOT In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19447 Modified Files: loginfo Log Message: unified diff Index: loginfo =================================================================== RCS file: /cvsroot/mockpp/CVSROOT/loginfo,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** loginfo 20 Feb 2005 00:45:18 -0000 1.12 --- loginfo 4 Mar 2005 21:20:37 -0000 1.13 *************** *** 26,28 **** #DEFAULT (echo ""; id; echo %{sVv}; date; cat) >> $CVSROOT/CVSROOT/commitlog ! DEFAULT /cvsroot/sitedocs/CVSROOT/cvstools/syncmail %{sVv} moc...@li... --- 26,28 ---- #DEFAULT (echo ""; id; echo %{sVv}; date; cat) >> $CVSROOT/CVSROOT/commitlog ! DEFAULT /cvsroot/sitedocs/CVSROOT/cvstools/syncmail -u %{sVv} moc...@li... |
From: Ewald A. <ewa...@us...> - 2005-03-04 21:11:42
|
Update of /cvsroot/mockpp/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17070 Modified Files: ChangeLog Log Message: added recent changes Index: ChangeLog =================================================================== RCS file: /cvsroot/mockpp/mockpp/ChangeLog,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** ChangeLog 2 Mar 2005 13:38:03 -0000 1.32 --- ChangeLog 4 Mar 2005 21:11:32 -0000 1.33 *************** *** 4,12 **** -------------- ! 2005-02-26 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 2005-02-25 1.4.0: - changed "verify() const" to "verify()" --- 4,18 ---- -------------- ! 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 cimpile 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: - changed "verify() const" to "verify()" |
From: Ewald A. <ewa...@us...> - 2005-03-04 21:10:14
|
Update of /cvsroot/mockpp/mockpp/mockpp/examples/tutorial In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16642/mockpp/examples/tutorial Modified Files: basicmock.cpp chainmock.cpp consumer.cpp interface.h poormock-se.cpp poormock.cpp visitmock.cpp Log Message: extended example files Index: consumer.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/examples/tutorial/consumer.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** consumer.cpp 2 Jan 2005 17:56:46 -0000 1.2 --- consumer.cpp 4 Mar 2005 21:10:02 -0000 1.3 *************** *** 31,34 **** --- 31,38 ---- void Consumer::process() { + unsigned x = configfile->calculate(1); + x += configfile->calculate(2); + x =+ configfile->calculate(3); + config1 += "/processed"; config2 += "/processed"; Index: interface.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/examples/tutorial/interface.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** interface.h 2 Jan 2005 17:56:46 -0000 1.2 --- interface.h 4 Mar 2005 21:10:02 -0000 1.3 *************** *** 34,38 **** * Each record consists of one line of ascii characters. * Each file contains exactly three lines. ! * Processed lines are written back at with * "/processed" appended. */ --- 34,38 ---- * Each record consists of one line of ascii characters. * Each file contains exactly three lines. ! * Processed lines are written back with * "/processed" appended. */ *************** *** 44,62 **** * @param name name of file to open */ ! virtual void open(const std::string &name) = 0; /** Reads one record from the file * @return the record (one complete line) */ ! virtual std::string read() = 0; /** Writes a record o the file * @param s the record (one complete line) */ ! virtual void write(const std::string &s) = 0; /** Closes the file */ ! virtual void close() = 0; }; --- 44,68 ---- * @param name name of file to open */ ! virtual void open(const std::string &name) = 0; /** Reads one record from the file * @return the record (one complete line) */ ! virtual std::string read() = 0; /** Writes a record o the file * @param s the record (one complete line) */ ! virtual void write(const std::string &s) = 0; ! ! /** Does some calculating ! * @param input ingoing data ! * @return outgoing result ! */ ! virtual unsigned calculate(unsigned input) = 0; /** Closes the file */ ! virtual void close() = 0; }; Index: poormock.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/examples/tutorial/poormock.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** poormock.cpp 30 Jan 2005 12:09:18 -0000 1.5 --- poormock.cpp 4 Mar 2005 21:10:02 -0000 1.6 *************** *** 59,62 **** --- 59,67 ---- } + virtual unsigned calculate(unsigned input) + { + return input + 1; + } + virtual void close() { Index: basicmock.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/examples/tutorial/basicmock.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** basicmock.cpp 30 Jan 2005 12:09:18 -0000 1.4 --- basicmock.cpp 4 Mar 2005 21:10:01 -0000 1.5 *************** *** 17,20 **** --- 17,24 ---- #include <mockpp/ExpectationCounter.h> + #include <mockpp/constraint/ConstraintList.h> + + #include <mockpp/chaining/ChainingMockObjectSupport.h> + #include "interface.h" #include "consumer.h" *************** *** 23,26 **** --- 27,32 ---- #include <iostream> + using namespace mockpp; + class BasicMock : public Interface *************** *** 35,38 **** --- 41,46 ---- , write_data(MOCKPP_PCHAR("BasicMock/write_data"), this) , read_data(MOCKPP_PCHAR("BasicMock/read_data"), this) + , calculate_output(MOCKPP_PCHAR("BasicMock/calculate_output"), this) + , calculate_input(MOCKPP_PCHAR("BasicMock/calculate_input"), this) { } *************** *** 53,56 **** --- 61,70 ---- } + virtual unsigned calculate(unsigned input) + { + calculate_input.addActual(input); + return calculate_output.nextReturnObject(); + } + virtual void close() { *************** *** 62,65 **** --- 76,81 ---- mockpp::ExpectationList<std::string> write_data; mockpp::ReturnObjectList<std::string> read_data; + mockpp::ReturnObjectList<unsigned> calculate_output; + mockpp::ConstraintList<unsigned > calculate_input; }; *************** *** 88,91 **** --- 104,115 ---- mock.write_data.addExpected("record-3/processed"); + // processing is not exactly defined + mock.calculate_input.addExpected(eq<unsigned>(5,5)); + mock.calculate_input.addExpected(eq<unsigned>(5,5)); + mock.calculate_input.addExpected(eq<unsigned>(5,5)); + mock.calculate_output.addObjectToReturn(10); + mock.calculate_output.addObjectToReturn(20); + mock.calculate_output.addObjectToReturn(30); + // Run Consumer object std::cout << "Tests starting" << std::endl; Index: poormock-se.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/examples/tutorial/poormock-se.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** poormock-se.cpp 19 Feb 2005 20:43:17 -0000 1.2 --- poormock-se.cpp 4 Mar 2005 21:10:02 -0000 1.3 *************** *** 23,26 **** --- 23,28 ---- , public mockpp::MockObject { + private: + mockpp::TrackingCounterMaster counter; *************** *** 53,56 **** --- 55,63 ---- } + virtual unsigned calculate(unsigned input) + { + return input + 1; + } + virtual void close() { Index: visitmock.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/examples/tutorial/visitmock.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** visitmock.cpp 30 Jan 2005 12:09:18 -0000 1.6 --- visitmock.cpp 4 Mar 2005 21:10:02 -0000 1.7 *************** *** 11,17 **** --- 11,21 ---- ***************************************************************************/ + #define MOCKPP_IMPORT_ABBREVIATED #include <mockpp/mockpp.h> + #include <mockpp/VisitableMockObject.h> + #include <mockpp/chaining/ChainingMockObjectSupport.h> + #include "interface.h" #include "consumer.h" *************** *** 31,34 **** --- 35,39 ---- , MOCKPP_CONSTRUCT_MEMBERS_FOR_VISITABLE0(read) , MOCKPP_CONSTRUCT_MEMBERS_FOR_VOID_VISITABLE_EXT1(write, ext) + , MOCKPP_CONSTRUCT_MEMBERS_FOR_VISITABLE_EXT1(calculate, ext) , MOCKPP_CONSTRUCT_MEMBERS_FOR_VOID_VISITABLE0(close) {} *************** *** 42,45 **** --- 47,53 ---- ext, std::string); + MOCKPP_VISITABLE_EXT1(VisitMock, unsigned, calculate, unsigned, + unsigned, ext, unsigned); + MOCKPP_VOID_VISITABLE0(VisitMock, close); }; *************** *** 52,55 **** --- 60,64 ---- VisitMock mock; MOCKPP_CONTROLLER_FOR(VisitMock, read) read_controller (&mock); + MOCKPP_CONTROLLER_FOR_EXT(VisitMock, calculate, ext) calculate_controller (&mock); // record program flow while reading data *************** *** 65,73 **** read_controller.addReturnValue("record-3"); // record program flow while writing data mock.open("file1.lst"); mock.write("record-1/processed"); ! mock.write("record-2/processed"); ! mock.write("record-3/processed"); mock.close(); --- 74,90 ---- read_controller.addReturnValue("record-3"); + // processing is not exactly defined + 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)); + // record program flow while writing data mock.open("file1.lst"); mock.write("record-1/processed"); ! mock.write(stringContains("processed")); ! mock.write(stringContains("processed")); mock.close(); Index: chainmock.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/examples/tutorial/chainmock.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** chainmock.cpp 30 Jan 2005 12:09:18 -0000 1.4 --- chainmock.cpp 4 Mar 2005 21:10:02 -0000 1.5 *************** *** 35,38 **** --- 35,39 ---- , MOCKPP_CONSTRUCT_MEMBERS_FOR_CHAINABLE0(read) , MOCKPP_CONSTRUCT_MEMBERS_FOR_VOID_CHAINABLE_EXT1(write, ext) + , MOCKPP_CONSTRUCT_MEMBERS_FOR_CHAINABLE_EXT1(calculate, ext) , MOCKPP_CONSTRUCT_MEMBERS_FOR_VOID_CHAINABLE0(close) {} *************** *** 46,49 **** --- 47,53 ---- ext, std::string); + MOCKPP_CHAINABLE_EXT1(ChainMock, unsigned, calculate, unsigned, + unsigned, ext, unsigned); + MOCKPP_VOID_CHAINABLE0(ChainMock, close); }; *************** *** 59,62 **** --- 63,67 ---- MOCKPP_CHAINER_FOR_EXT(ChainMock, write, ext) write_chainer (&mock); MOCKPP_CHAINER_FOR(ChainMock, close) close_chainer (&mock); + MOCKPP_CHAINER_FOR_EXT(ChainMock, calculate, ext) calculate_chainer (&mock); // Expectations for reading the file *************** *** 75,78 **** --- 80,89 ---- + // Expectations for processing the file + calculate_chainer.expects(atLeast(3)) + .with(eq<unsigned>(5 ,5)) + .after(MOCKPP_PCHAR("reader")); + + // Expectations for writing the file back open_chainer.expects(once()) *************** *** 85,89 **** .with(eq(std::string("record-2/processed"))); write_chainer.expects(once()) ! .with(eq(std::string("record-3/processed"))) .id(MOCKPP_PCHAR("writer")); --- 96,100 ---- .with(eq(std::string("record-2/processed"))); write_chainer.expects(once()) ! .with(stringContains(std::string("processed"))) .id(MOCKPP_PCHAR("writer")); |
From: Ewald A. <ewa...@us...> - 2005-03-04 20:26:50
|
Update of /cvsroot/mockpp/mockpp/mockpp/chaining In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3954/mockpp/chaining Modified Files: ChainableMockObject_macro.h Log Message: restructured to make chainable macros consistent Index: ChainableMockObject_macro.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/ChainableMockObject_macro.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ChainableMockObject_macro.h 30 Dec 2004 20:54:04 -0000 1.9 --- ChainableMockObject_macro.h 4 Mar 2005 20:26:38 -0000 1.10 *************** *** 95,161 **** /** Implements a method with 0 parameters for a mock object. * @param classname the name of the mock class to which the method belongs ! * @param m_name the method name ! * @param x_name optional extension for the internal variable names based on the method name */ #define MOCKPP_VOID_CHAINABLE0_IMPL(classname, m_name, \ ! x_name) \ { \ ! std::string func_name (#m_name "_" #x_name); \ ! mockpp::Invocation0 inv(MOCKPP_PCHAR(#m_name) MOCKPP_PCHAR(#x_name)); \ ! m_name ## x_name ## CoreMock.invoke(inv); \ } \ MOCKPP_MEMBER_RESTRICTOR_PRIVATE: \ ! typedef mockpp::Invocation0 m_name ## x_name ## InvocationType; \ ! mutable mockpp::CoreMock<void, m_name ## x_name ## InvocationType> m_name ## x_name ## CoreMock; \ ! MOCKPP_CHAINER_DECL0(classname, m_name ## x_name, void, m_name ## x_name ## InvocationType) /** Implements a method with 1 parameter for a mock object. * @param classname the name of the mock class to which the method belongs ! * @param m_name the method name * @param m_type1 the data type of the 1. method parameter ! * @param x_name optional extension for the internal variable names based on the method name * @param v_type1 the data type of the internal variable of 1. parameter */ #define MOCKPP_VOID_CHAINABLE1_IMPL(classname, m_name, m_type1, \ ! x_name, v_type1) \ { \ ! std::string func_name (#m_name "_" #x_name); \ ! mockpp::Invocation1<v_type1> inv(MOCKPP_PCHAR(#m_name) MOCKPP_PCHAR(#x_name), (v_type1)param1); \ ! m_name ## x_name ## CoreMock.invoke(inv); \ } \ MOCKPP_MEMBER_RESTRICTOR_PRIVATE: \ ! typedef mockpp::Invocation1<v_type1> m_name ## x_name ## InvocationType; \ ! mutable mockpp::CoreMock<void, m_name ## x_name ## InvocationType> m_name ## x_name ## CoreMock; \ ! MOCKPP_CHAINER_DECL1(classname, m_name ## x_name, void, m_name ## x_name ## InvocationType) /** Implements a method with 2 parameters for a mock object. * @param classname the name of the mock class to which the method belongs ! * @param m_name the method name * @param m_type1 the data type of the 1. method parameter ! * @param x_name optional extension for the internal variable names based on the method name * @param v_type1 the data type of the internal variable of 1. parameter */ #define MOCKPP_VOID_CHAINABLE2_IMPL(classname, m_name, m_type1, m_type2, \ ! x_name, v_type1, v_type2) \ { \ ! std::string func_name (#m_name "_" #x_name); \ ! mockpp::Invocation2<v_type1, v_type2> inv(MOCKPP_PCHAR(#m_name) MOCKPP_PCHAR(#x_name), (v_type1)param1, (v_type2)param2); \ ! m_name ## x_name ## CoreMock.invoke(inv); \ } \ MOCKPP_MEMBER_RESTRICTOR_PRIVATE: \ ! typedef mockpp::Invocation2<v_type1, v_type2> m_name ## x_name ## InvocationType; \ ! mutable mockpp::CoreMock<void, m_name ## x_name ## InvocationType> m_name ## x_name ## CoreMock; \ ! MOCKPP_CHAINER_DECL2(classname, m_name ## x_name, void, m_name ## x_name ## InvocationType) /** Implements a method with 3 parameters for a mock object. * @param classname the name of the mock class to which the method belongs ! * @param m_name the method name * @param m_type1 the data type of the 1. method parameter * @param m_type2 the data type of the 2. method parameter * @param m_type3 the data type of the 3. method parameter ! * @param x_name optional extension for the internal variable names based on the method name * @param v_type1 the data type of the internal variable of 1. parameter * @param v_type2 the data type of the internal variable of 2. parameter --- 95,161 ---- /** Implements a method with 0 parameters for a mock object. * @param classname the name of the mock class to which the method belongs ! * @param m_name the extended method name ! * @param a_name the actual method name */ #define MOCKPP_VOID_CHAINABLE0_IMPL(classname, m_name, \ ! a_name) \ { \ ! std::string func_name (#m_name); \ ! mockpp::Invocation0 inv(MOCKPP_PCHAR(#m_name)); \ ! m_name ## CoreMock.invoke(inv); \ } \ MOCKPP_MEMBER_RESTRICTOR_PRIVATE: \ ! typedef mockpp::Invocation0 m_name ## InvocationType; \ ! mutable mockpp::CoreMock<void, m_name ## InvocationType> m_name ## CoreMock; \ ! MOCKPP_CHAINER_DECL0(classname, m_name, void, m_name ## InvocationType) /** Implements a method with 1 parameter for a mock object. * @param classname the name of the mock class to which the method belongs ! * @param m_name the extended method name * @param m_type1 the data type of the 1. method parameter ! * @param a_name the actual method name * @param v_type1 the data type of the internal variable of 1. parameter */ #define MOCKPP_VOID_CHAINABLE1_IMPL(classname, m_name, m_type1, \ ! a_name, v_type1) \ { \ ! std::string func_name (#m_name); \ ! mockpp::Invocation1<v_type1> inv(MOCKPP_PCHAR(#m_name), (v_type1)param1); \ ! m_name ## CoreMock.invoke(inv); \ } \ MOCKPP_MEMBER_RESTRICTOR_PRIVATE: \ ! typedef mockpp::Invocation1<v_type1> m_name ## InvocationType; \ ! mutable mockpp::CoreMock<void, m_name ## InvocationType> m_name ## CoreMock; \ ! MOCKPP_CHAINER_DECL1(classname, m_name, void, m_name ## InvocationType) /** Implements a method with 2 parameters for a mock object. * @param classname the name of the mock class to which the method belongs ! * @param m_name the extended method name * @param m_type1 the data type of the 1. method parameter ! * @param a_name the actual method name * @param v_type1 the data type of the internal variable of 1. parameter */ #define MOCKPP_VOID_CHAINABLE2_IMPL(classname, m_name, m_type1, m_type2, \ ! a_name, v_type1, v_type2) \ { \ ! std::string func_name (#m_name); \ ! mockpp::Invocation2<v_type1, v_type2> inv(MOCKPP_PCHAR(#m_name), (v_type1)param1, (v_type2)param2); \ ! m_name ## CoreMock.invoke(inv); \ } \ MOCKPP_MEMBER_RESTRICTOR_PRIVATE: \ ! typedef mockpp::Invocation2<v_type1, v_type2> m_name ## InvocationType; \ ! mutable mockpp::CoreMock<void, m_name ## InvocationType> m_name ## CoreMock; \ ! MOCKPP_CHAINER_DECL2(classname, m_name, void, m_name ## InvocationType) /** Implements a method with 3 parameters for a mock object. * @param classname the name of the mock class to which the method belongs ! * @param m_name the extended method name * @param m_type1 the data type of the 1. method parameter * @param m_type2 the data type of the 2. method parameter * @param m_type3 the data type of the 3. method parameter ! * @param a_name the actual method name * @param v_type1 the data type of the internal variable of 1. parameter * @param v_type2 the data type of the internal variable of 2. parameter *************** *** 163,186 **** */ #define MOCKPP_VOID_CHAINABLE3_IMPL(classname, m_name, m_type1, m_type2, m_type3, \ ! x_name, v_type1, v_type2, v_type3) \ { \ ! std::string func_name (#m_name "_" #x_name); \ ! mockpp::Invocation3<v_type1, v_type2, v_type3> inv(MOCKPP_PCHAR(#m_name) MOCKPP_PCHAR(#x_name), (v_type1)param1, (v_type2)param2, (v_type3)param3); \ ! m_name ## x_name ## CoreMock.invoke(inv); \ } \ MOCKPP_MEMBER_RESTRICTOR_PRIVATE: \ ! typedef mockpp::Invocation3<v_type1, v_type2, v_type3> m_name ## x_name ## InvocationType; \ ! mutable mockpp::CoreMock<void, m_name ## x_name ## InvocationType> m_name ## x_name ## CoreMock; \ ! MOCKPP_CHAINER_DECL3(classname, m_name ## x_name, void, m_name ## x_name ## InvocationType) /** Implements a method with 4 parameters for a mock object. * @param classname the name of the mock class to which the method belongs ! * @param m_name the method name * @param m_type1 the data type of the 1. method parameter * @param m_type2 the data type of the 2. method parameter * @param m_type3 the data type of the 3. method parameter * @param m_type4 the data type of the 4. method parameter ! * @param x_name optional extension for the internal variable names based on the method name * @param v_type1 the data type of the internal variable of 1. parameter * @param v_type2 the data type of the internal variable of 2. parameter --- 163,186 ---- */ #define MOCKPP_VOID_CHAINABLE3_IMPL(classname, m_name, m_type1, m_type2, m_type3, \ ! a_name, v_type1, v_type2, v_type3) \ { \ ! std::string func_name (#m_name); \ ! mockpp::Invocation3<v_type1, v_type2, v_type3> inv(MOCKPP_PCHAR(#m_name), (v_type1)param1, (v_type2)param2, (v_type3)param3); \ ! m_name ## CoreMock.invoke(inv); \ } \ MOCKPP_MEMBER_RESTRICTOR_PRIVATE: \ ! typedef mockpp::Invocation3<v_type1, v_type2, v_type3> m_name ## InvocationType; \ ! mutable mockpp::CoreMock<void, m_name ## InvocationType> m_name ## CoreMock; \ ! MOCKPP_CHAINER_DECL3(classname, m_name, void, m_name ## InvocationType) /** Implements a method with 4 parameters for a mock object. * @param classname the name of the mock class to which the method belongs ! * @param m_name the extended method name * @param m_type1 the data type of the 1. method parameter * @param m_type2 the data type of the 2. method parameter * @param m_type3 the data type of the 3. method parameter * @param m_type4 the data type of the 4. method parameter ! * @param a_name the actual method name * @param v_type1 the data type of the internal variable of 1. parameter * @param v_type2 the data type of the internal variable of 2. parameter *************** *** 189,207 **** */ #define MOCKPP_VOID_CHAINABLE4_IMPL(classname, m_name, m_type1, m_type2, m_type3, m_type4, \ ! x_name, v_type1, v_type2, v_type3, v_type4) \ { \ ! std::string func_name (#m_name "_" #x_name); \ ! mockpp::Invocation4<v_type1, v_type2, v_type3, v_type4> inv(MOCKPP_PCHAR(#m_name) MOCKPP_PCHAR(#x_name), (v_type1)param1, (v_type2)param2, (v_type3)param3, (v_type4)param4); \ ! m_name ## x_name ## CoreMock.invoke(inv); \ } \ MOCKPP_MEMBER_RESTRICTOR_PRIVATE: \ ! typedef mockpp::Invocation4<v_type1, v_type2, v_type3, v_type4> m_name ## x_name ## InvocationType; \ ! mutable mockpp::CoreMock<void, m_name ## x_name ## InvocationType> m_name ## x_name ## CoreMock; \ ! MOCKPP_CHAINER_DECL4(classname, m_name ## x_name, void, m_name ## x_name ## InvocationType) /** Implements a method with 5 parameters for a mock object. * @param classname the name of the mock class to which the method belongs ! * @param m_name the method name * @param m_type1 the data type of the 1. method parameter * @param m_type2 the data type of the 2. method parameter --- 189,207 ---- */ #define MOCKPP_VOID_CHAINABLE4_IMPL(classname, m_name, m_type1, m_type2, m_type3, m_type4, \ ! a_name, v_type1, v_type2, v_type3, v_type4) \ { \ ! std::string func_name (#m_name); \ ! mockpp::Invocation4<v_type1, v_type2, v_type3, v_type4> inv(MOCKPP_PCHAR(#m_name), (v_type1)param1, (v_type2)param2, (v_type3)param3, (v_type4)param4); \ ! m_name ## CoreMock.invoke(inv); \ } \ MOCKPP_MEMBER_RESTRICTOR_PRIVATE: \ ! typedef mockpp::Invocation4<v_type1, v_type2, v_type3, v_type4> m_name ## InvocationType; \ ! mutable mockpp::CoreMock<void, m_name ## InvocationType> m_name ## CoreMock; \ ! MOCKPP_CHAINER_DECL4(classname, m_name, void, m_name ## InvocationType) /** Implements a method with 5 parameters for a mock object. * @param classname the name of the mock class to which the method belongs ! * @param m_name the extended method name * @param m_type1 the data type of the 1. method parameter * @param m_type2 the data type of the 2. method parameter *************** *** 209,213 **** * @param m_type4 the data type of the 4. method parameter * @param m_type5 the data type of the 5. method parameter ! * @param x_name optional extension for the internal variable names based on the method name * @param v_type1 the data type of the internal variable of 1. parameter * @param v_type2 the data type of the internal variable of 2. parameter --- 209,213 ---- * @param m_type4 the data type of the 4. method parameter * @param m_type5 the data type of the 5. method parameter ! * @param a_name the actual method name * @param v_type1 the data type of the internal variable of 1. parameter * @param v_type2 the data type of the internal variable of 2. parameter *************** *** 217,230 **** */ #define MOCKPP_VOID_CHAINABLE5_IMPL(classname, m_name, m_type1, m_type2, m_type3, m_type4, m_type5, \ ! x_name, v_type1, v_type2, v_type3, v_type4, v_type5) \ { \ ! std::string func_name (#m_name "_" #x_name); \ ! mockpp::Invocation5<v_type1, v_type2, v_type3, v_type4, v_type5> inv(MOCKPP_PCHAR(#m_name) MOCKPP_PCHAR(#x_name), (v_type1)param1, (v_type2)param2, (v_type3)param3, (v_type4)param4, (v_type5)param5); \ ! m_name ## x_name ## CoreMock.invoke(inv); \ } \ MOCKPP_MEMBER_RESTRICTOR_PRIVATE: \ ! typedef mockpp::Invocation5<v_type1, v_type2, v_type3, v_type4, v_type5> m_name ## x_name ## InvocationType; \ ! mutable mockpp::CoreMock<void, m_name ## x_name ## InvocationType> m_name ## x_name ## CoreMock; \ ! MOCKPP_CHAINER_DECL5(classname, m_name ## x_name, void, m_name ## x_name ## InvocationType) //////////////////////////////////////////////////////////////////////////// --- 217,230 ---- */ #define MOCKPP_VOID_CHAINABLE5_IMPL(classname, m_name, m_type1, m_type2, m_type3, m_type4, m_type5, \ ! a_name, v_type1, v_type2, v_type3, v_type4, v_type5) \ { \ ! std::string func_name (#m_name); \ ! mockpp::Invocation5<v_type1, v_type2, v_type3, v_type4, v_type5> inv(MOCKPP_PCHAR(#m_name), (v_type1)param1, (v_type2)param2, (v_type3)param3, (v_type4)param4, (v_type5)param5); \ ! m_name ## CoreMock.invoke(inv); \ } \ MOCKPP_MEMBER_RESTRICTOR_PRIVATE: \ ! typedef mockpp::Invocation5<v_type1, v_type2, v_type3, v_type4, v_type5> m_name ## InvocationType; \ ! mutable mockpp::CoreMock<void, m_name ## InvocationType> m_name ## CoreMock; \ ! MOCKPP_CHAINER_DECL5(classname, m_name, void, m_name ## InvocationType) //////////////////////////////////////////////////////////////////////////// *************** *** 233,251 **** * @param classname the name of the mock class to which the method belongs * @param m_ret_type the data type of the return value ! * @param m_name the method name * @param v_ret_type the data type of the internal return value respesentation ! * @param x_name optional extension for the internal variable names based on the method name */ #define MOCKPP_CHAINABLE0_IMPL(classname, m_ret_type, m_name, \ ! v_ret_type, x_name) \ { \ ! std::string func_name (#m_name "_" #x_name); \ ! mockpp::Invocation0 inv(MOCKPP_PCHAR(#m_name) MOCKPP_PCHAR(#x_name)); \ ! return m_name ## x_name ## CoreMock.invoke(inv); \ } \ MOCKPP_MEMBER_RESTRICTOR_PRIVATE: \ ! typedef mockpp::Invocation0 m_name ## x_name ## InvocationType; \ ! mutable mockpp::CoreMock<m_ret_type, m_name ## x_name ## InvocationType> m_name ## x_name ## CoreMock; \ ! MOCKPP_CHAINER_DECL0(classname, m_name ## x_name, m_ret_type, m_name ## x_name ## InvocationType) --- 233,251 ---- * @param classname the name of the mock class to which the method belongs * @param m_ret_type the data type of the return value ! * @param m_name the extended method name * @param v_ret_type the data type of the internal return value respesentation ! * @param a_name the actual method name */ #define MOCKPP_CHAINABLE0_IMPL(classname, m_ret_type, m_name, \ ! v_ret_type, a_name) \ { \ ! std::string func_name (#m_name); \ ! mockpp::Invocation0 inv(MOCKPP_PCHAR(#m_name)); \ ! return m_name ## CoreMock.invoke(inv); \ } \ MOCKPP_MEMBER_RESTRICTOR_PRIVATE: \ ! typedef mockpp::Invocation0 m_name ## InvocationType; \ ! mutable mockpp::CoreMock<m_ret_type, m_name ## InvocationType> m_name ## CoreMock; \ ! MOCKPP_CHAINER_DECL0(classname, m_name, m_ret_type, m_name ## InvocationType) *************** *** 253,273 **** * @param classname the name of the mock class to which the method belongs * @param m_ret_type the data type of the return value ! * @param m_name the method name * @param m_type1 the data type of the 1. method parameter * @param v_ret_type the data type of the internal return value respesentation ! * @param x_name optional extension for the internal variable names based on the method name * @param v_type1 the data type of the internal variable of 1. parameter */ #define MOCKPP_CHAINABLE1_IMPL(classname, m_ret_type, m_name, m_type1, \ ! v_ret_type, x_name, v_type1) \ { \ ! std::string func_name (#m_name "_" #x_name); \ ! mockpp::Invocation1<v_type1> inv(MOCKPP_PCHAR(#m_name) MOCKPP_PCHAR(#x_name), (v_type1)param1); \ ! return m_name ## x_name ## CoreMock.invoke(inv); \ } \ MOCKPP_MEMBER_RESTRICTOR_PRIVATE: \ ! typedef mockpp::Invocation1<v_type1> m_name ## x_name ## InvocationType; \ ! mutable mockpp::CoreMock<m_ret_type, m_name ## x_name ## InvocationType> m_name ## x_name ## CoreMock; \ ! MOCKPP_CHAINER_DECL1(classname, m_name ## x_name, m_ret_type, m_name ## x_name ## InvocationType) --- 253,273 ---- * @param classname the name of the mock class to which the method belongs * @param m_ret_type the data type of the return value ! * @param m_name the extended method name * @param m_type1 the data type of the 1. method parameter * @param v_ret_type the data type of the internal return value respesentation ! * @param a_name the actual method name * @param v_type1 the data type of the internal variable of 1. parameter */ #define MOCKPP_CHAINABLE1_IMPL(classname, m_ret_type, m_name, m_type1, \ ! v_ret_type, a_name, v_type1) \ { \ ! std::string func_name (#m_name); \ ! mockpp::Invocation1<v_type1> inv(MOCKPP_PCHAR(#m_name), (v_type1)param1); \ ! return m_name ## CoreMock.invoke(inv); \ } \ MOCKPP_MEMBER_RESTRICTOR_PRIVATE: \ ! typedef mockpp::Invocation1<v_type1> m_name ## InvocationType; \ ! mutable mockpp::CoreMock<m_ret_type, m_name ## InvocationType> m_name ## CoreMock; \ ! MOCKPP_CHAINER_DECL1(classname, m_name, m_ret_type, m_name ## InvocationType) *************** *** 278,295 **** * @param m_type1 the data type of the 1. method parameter * @param v_ret_type the data type of the internal return value respesentation ! * @param x_name optional extension for the internal variable names based on the method name * @param v_type1 the data type of the internal variable of 1. parameter */ #define MOCKPP_CHAINABLE2_IMPL(classname, m_ret_type, m_name, m_type1, m_type2, \ ! v_ret_type, x_name, v_type1, v_type2) \ { \ ! std::string func_name (#m_name "_" #x_name); \ ! mockpp::Invocation2<v_type1, v_type2> inv(MOCKPP_PCHAR(#m_name) MOCKPP_PCHAR(#x_name), (v_type1)param1, (v_type2)param2); \ ! return m_name ## x_name ## CoreMock.invoke(inv); \ } \ MOCKPP_MEMBER_RESTRICTOR_PRIVATE: \ ! typedef mockpp::Invocation2<v_type1, v_type2> m_name ## x_name ## InvocationType; \ ! mutable mockpp::CoreMock<m_ret_type, m_name ## x_name ## InvocationType> m_name ## x_name ## CoreMock; \ ! MOCKPP_CHAINER_DECL2(classname, m_name ## x_name, m_ret_type, m_name ## x_name ## InvocationType) --- 278,295 ---- * @param m_type1 the data type of the 1. method parameter * @param v_ret_type the data type of the internal return value respesentation ! * @param a_name the actual method name * @param v_type1 the data type of the internal variable of 1. parameter */ #define MOCKPP_CHAINABLE2_IMPL(classname, m_ret_type, m_name, m_type1, m_type2, \ ! v_ret_type, a_name, v_type1, v_type2) \ { \ ! std::string func_name (#m_name); \ ! mockpp::Invocation2<v_type1, v_type2> inv(MOCKPP_PCHAR(#m_name), (v_type1)param1, (v_type2)param2); \ ! return m_name ## CoreMock.invoke(inv); \ } \ MOCKPP_MEMBER_RESTRICTOR_PRIVATE: \ ! typedef mockpp::Invocation2<v_type1, v_type2> m_name ## InvocationType; \ ! mutable mockpp::CoreMock<m_ret_type, m_name ## InvocationType> m_name ## CoreMock; \ ! MOCKPP_CHAINER_DECL2(classname, m_name, m_ret_type, m_name ## InvocationType) *************** *** 297,306 **** * @param classname the name of the mock class to which the method belongs * @param m_ret_type the data type of the return value ! * @param m_name the method name * @param m_type1 the data type of the 1. method parameter * @param m_type2 the data type of the 2. method parameter * @param m_type3 the data type of the 3. method parameter * @param v_ret_type the data type of the internal return value respesentation ! * @param x_name optional extension for the internal variable names based on the method name * @param v_type1 the data type of the internal variable of 1. parameter * @param v_type2 the data type of the internal variable of 2. parameter --- 297,306 ---- * @param classname the name of the mock class to which the method belongs * @param m_ret_type the data type of the return value ! * @param m_name the extended method name * @param m_type1 the data type of the 1. method parameter * @param m_type2 the data type of the 2. method parameter * @param m_type3 the data type of the 3. method parameter * @param v_ret_type the data type of the internal return value respesentation ! * @param a_name the actual method name * @param v_type1 the data type of the internal variable of 1. parameter * @param v_type2 the data type of the internal variable of 2. parameter *************** *** 308,321 **** */ #define MOCKPP_CHAINABLE3_IMPL(classname, m_ret_type, m_name, m_type1, m_type2, m_type3, \ ! v_ret_type, x_name, v_type1, v_type2, v_type3) \ { \ ! std::string func_name (#m_name "_" #x_name); \ ! mockpp::Invocation3<v_type1, v_type2, v_type3> inv(MOCKPP_PCHAR(#m_name) MOCKPP_PCHAR(#x_name), (v_type1)param1, (v_type2)param2, (v_type3)param3); \ ! return m_name ## x_name ## CoreMock.invoke(inv); \ } \ MOCKPP_MEMBER_RESTRICTOR_PRIVATE: \ ! typedef mockpp::Invocation3<v_type1, v_type2, v_type3> m_name ## x_name ## InvocationType; \ ! mutable mockpp::CoreMock<m_ret_type, m_name ## x_name ## InvocationType> m_name ## x_name ## CoreMock; \ ! MOCKPP_CHAINER_DECL3(classname, m_name ## x_name, m_ret_type, m_name ## x_name ## InvocationType) --- 308,321 ---- */ #define MOCKPP_CHAINABLE3_IMPL(classname, m_ret_type, m_name, m_type1, m_type2, m_type3, \ ! v_ret_type, a_name, v_type1, v_type2, v_type3) \ { \ ! std::string func_name (#m_name); \ ! mockpp::Invocation3<v_type1, v_type2, v_type3> inv(MOCKPP_PCHAR(#m_name), (v_type1)param1, (v_type2)param2, (v_type3)param3); \ ! return m_name ## CoreMock.invoke(inv); \ } \ MOCKPP_MEMBER_RESTRICTOR_PRIVATE: \ ! typedef mockpp::Invocation3<v_type1, v_type2, v_type3> m_name ## InvocationType; \ ! mutable mockpp::CoreMock<m_ret_type, m_name ## InvocationType> m_name ## CoreMock; \ ! MOCKPP_CHAINER_DECL3(classname, m_name, m_ret_type, m_name ## InvocationType) *************** *** 323,327 **** * @param classname the name of the mock class to which the method belongs * @param m_ret_type the data type of the return value ! * @param m_name the method name * @param m_type1 the data type of the 1. method parameter * @param m_type2 the data type of the 2. method parameter --- 323,327 ---- * @param classname the name of the mock class to which the method belongs * @param m_ret_type the data type of the return value ! * @param m_name the extended method name * @param m_type1 the data type of the 1. method parameter * @param m_type2 the data type of the 2. method parameter *************** *** 329,333 **** * @param m_type4 the data type of the 4. method parameter * @param v_ret_type the data type of the internal return value respesentation ! * @param x_name optional extension for the internal variable names based on the method name * @param v_type1 the data type of the internal variable of 1. parameter * @param v_type2 the data type of the internal variable of 2. parameter --- 329,333 ---- * @param m_type4 the data type of the 4. method parameter * @param v_ret_type the data type of the internal return value respesentation ! * @param a_name the actual method name * @param v_type1 the data type of the internal variable of 1. parameter * @param v_type2 the data type of the internal variable of 2. parameter *************** *** 336,349 **** */ #define MOCKPP_CHAINABLE4_IMPL(classname, m_ret_type, m_name, m_type1, m_type2, m_type3, m_type4, \ ! v_ret_type, x_name, v_type1, v_type2, v_type3, v_type4) \ { \ ! std::string func_name (#m_name "_" #x_name); \ ! mockpp::Invocation4<v_type1, v_type2, v_type3, v_type4> inv(MOCKPP_PCHAR(#m_name) MOCKPP_PCHAR(#x_name), (v_type1)param1, (v_type2)param2, (v_type3)param3, (v_type4)param4); \ ! return m_name ## x_name ## CoreMock.invoke(inv); \ } \ MOCKPP_MEMBER_RESTRICTOR_PRIVATE: \ ! typedef mockpp::Invocation4<v_type1, v_type2, v_type3, v_type4> m_name ## x_name ## InvocationType; \ ! mutable mockpp::CoreMock<m_ret_type, m_name ## x_name ## InvocationType> m_name ## x_name ## CoreMock; \ ! MOCKPP_CHAINER_DECL4(classname, m_name ## x_name, m_ret_type, m_name ## x_name ## InvocationType) --- 336,349 ---- */ #define MOCKPP_CHAINABLE4_IMPL(classname, m_ret_type, m_name, m_type1, m_type2, m_type3, m_type4, \ ! v_ret_type, a_name, v_type1, v_type2, v_type3, v_type4) \ { \ ! std::string func_name (#m_name); \ ! mockpp::Invocation4<v_type1, v_type2, v_type3, v_type4> inv(MOCKPP_PCHAR(#m_name), (v_type1)param1, (v_type2)param2, (v_type3)param3, (v_type4)param4); \ ! return m_name ## CoreMock.invoke(inv); \ } \ MOCKPP_MEMBER_RESTRICTOR_PRIVATE: \ ! typedef mockpp::Invocation4<v_type1, v_type2, v_type3, v_type4> m_name ## InvocationType; \ ! mutable mockpp::CoreMock<m_ret_type, m_name ## InvocationType> m_name ## CoreMock; \ ! MOCKPP_CHAINER_DECL4(classname, m_name, m_ret_type, m_name ## InvocationType) *************** *** 351,355 **** * @param classname the name of the mock class to which the method belongs * @param m_ret_type the data type of the return value ! * @param m_name the method name * @param m_type1 the data type of the 1. method parameter * @param m_type2 the data type of the 2. method parameter --- 351,355 ---- * @param classname the name of the mock class to which the method belongs * @param m_ret_type the data type of the return value ! * @param m_name the extended method name * @param m_type1 the data type of the 1. method parameter * @param m_type2 the data type of the 2. method parameter *************** *** 358,362 **** * @param m_type5 the data type of the 5. method parameter * @param v_ret_type the data type of the internal return value respesentation ! * @param x_name optional extension for the internal variable names based on the method name * @param v_type1 the data type of the internal variable of 1. parameter * @param v_type2 the data type of the internal variable of 2. parameter --- 358,362 ---- * @param m_type5 the data type of the 5. method parameter * @param v_ret_type the data type of the internal return value respesentation ! * @param a_name the actual method name * @param v_type1 the data type of the internal variable of 1. parameter * @param v_type2 the data type of the internal variable of 2. parameter *************** *** 366,379 **** */ #define MOCKPP_CHAINABLE5_IMPL(classname, m_ret_type, m_name, m_type1, m_type2, m_type3, m_type4, m_type5, \ ! v_ret_type, x_name, v_type1, v_type2, v_type3, v_type4, v_type5) \ { \ ! std::string func_name (#m_name "_" #x_name); \ ! mockpp::Invocation5<v_type1, v_type2, v_type3, v_type4, v_type5> inv(MOCKPP_PCHAR(#m_name) MOCKPP_PCHAR(#x_name), (v_type1)param1, (v_type2)param2, (v_type3)param3, (v_type4)param4, (v_type5)param5); \ ! return m_name ## x_name ## CoreMock.invoke(inv); \ } \ MOCKPP_MEMBER_RESTRICTOR_PRIVATE: \ ! typedef mockpp::Invocation5<v_type1, v_type2, v_type3, v_type4, v_type5> m_name ## x_name ## InvocationType; \ ! mutable mockpp::CoreMock<m_ret_type, m_name ## x_name ## InvocationType> m_name ## x_name ## CoreMock; \ ! MOCKPP_CHAINER_DECL5(classname, m_name ## x_name, m_ret_type, m_name ## x_name ## InvocationType) --- 366,379 ---- */ #define MOCKPP_CHAINABLE5_IMPL(classname, m_ret_type, m_name, m_type1, m_type2, m_type3, m_type4, m_type5, \ ! v_ret_type, a_name, v_type1, v_type2, v_type3, v_type4, v_type5) \ { \ ! std::string func_name (#m_name); \ ! mockpp::Invocation5<v_type1, v_type2, v_type3, v_type4, v_type5> inv(MOCKPP_PCHAR(#m_name), (v_type1)param1, (v_type2)param2, (v_type3)param3, (v_type4)param4, (v_type5)param5); \ ! return m_name ## CoreMock.invoke(inv); \ } \ MOCKPP_MEMBER_RESTRICTOR_PRIVATE: \ ! typedef mockpp::Invocation5<v_type1, v_type2, v_type3, v_type4, v_type5> m_name ## InvocationType; \ ! mutable mockpp::CoreMock<m_ret_type, m_name ## InvocationType> m_name ## CoreMock; \ ! MOCKPP_CHAINER_DECL5(classname, m_name, m_ret_type, m_name ## InvocationType) |
From: Ewald A. <ewa...@us...> - 2005-03-04 20:26:50
|
Update of /cvsroot/mockpp/mockpp/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3954/mockpp Modified Files: ChainableMockObject.h Log Message: restructured to make chainable macros consistent Index: ChainableMockObject.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/ChainableMockObject.h,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** ChainableMockObject.h 27 Feb 2005 11:48:14 -0000 1.22 --- ChainableMockObject.h 4 Mar 2005 20:26:40 -0000 1.23 *************** *** 154,158 **** */ #define MOCKPP_CHAINER_FOR(clsname, methname) \ ! MOCKPP_CHAINER_FOR_EXT(clsname, methname, _/**/) /** Implements a chainer for a method. --- 154,158 ---- */ #define MOCKPP_CHAINER_FOR(clsname, methname) \ ! clsname::ChainerFor ## methname [...1082 lines suppressed...] /** Implements the initializers for the internal variables of a --- 1208,1212 ---- */ #define MOCKPP_CONSTRUCT_MEMBERS_FOR_CHAINABLE5(name) \ ! MOCKPP_CONSTRUCT_CHAINABLE_MEMBERS(name) /** Implements the initializers for the internal variables of a *************** *** 1168,1172 **** */ #define MOCKPP_CONSTRUCT_MEMBERS_FOR_CHAINABLE_EXT5(m_name, x_name) \ ! MOCKPP_CONSTRUCT_CHAINABLE_MEMBERS(m_name ## x_name) --- 1216,1220 ---- */ #define MOCKPP_CONSTRUCT_MEMBERS_FOR_CHAINABLE_EXT5(m_name, x_name) \ ! MOCKPP_CONSTRUCT_MEMBERS_FOR_CHAINABLE5(m_name ## x_name) |
From: Ewald A. <ewa...@us...> - 2005-03-04 20:26:50
|
Update of /cvsroot/mockpp/mockpp/mockpp/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3954/mockpp/tests Modified Files: Makefile.am Log Message: restructured to make chainable macros consistent Index: Makefile.am =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/Makefile.am,v retrieving revision 1.64 retrieving revision 1.65 diff -C2 -d -r1.64 -r1.65 *** Makefile.am 3 Mar 2005 23:32:27 -0000 1.64 --- Makefile.am 4 Mar 2005 20:26:40 -0000 1.65 *************** *** 18,22 **** raw-gen: ! cpp -DHAVE_CPPUNIT $(srcdir)/VisitableMockObject_5_void_test.cpp $(INCLUDES) >x.cpp sed -e s,^#,//,g x.cpp >xx.cpp --- 18,22 ---- raw-gen: ! cpp -DHAVE_CPPUNIT $(srcdir)/ChainableMockObject_5_test.cpp $(INCLUDES) >x.cpp sed -e s,^#,//,g x.cpp >xx.cpp |
From: Ewald A. <ewa...@us...> - 2005-03-04 17:54:01
|
Update of /cvsroot/mockpp/mockpp/bcbX In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24566/bcbX Modified Files: jmock_test.cbx Log Message: added new sources Index: jmock_test.cbx =================================================================== RCS file: /cvsroot/mockpp/mockpp/bcbX/jmock_test.cbx,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** jmock_test.cbx 1 Mar 2005 19:35:08 -0000 1.9 --- jmock_test.cbx 4 Mar 2005 17:53:53 -0000 1.10 *************** *** 30,34 **** <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="14"/> <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"/> --- 30,34 ---- <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="version" value="X.1.0"/> <property category="linux.Debug_Build.gnuc++.g++compile" name="option.D_MACRO_VALUE.arg.1" value="HAVE_CPPUNIT"/> *************** *** 60,64 **** <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="14"/> <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"/> --- 60,64 ---- <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="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"/> *************** *** 380,383 **** --- 380,386 ---- <property category="unique" name="id" value="66"/> </file> + <file path="../mockpp/tests/UnlimitedMatcher_test.cpp"> + <property category="unique" name="id" value="15"/> + </file> <file path="../mockpp/tests/VerifyingTestCaller_test.cpp"> <property category="unique" name="id" value="67"/> |
From: Ewald A. <ewa...@us...> - 2005-03-04 17:54:01
|
Update of /cvsroot/mockpp/mockpp/bcb5 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24566/bcb5 Modified Files: jmock_test.bpf Log Message: added new sources Index: jmock_test.bpf =================================================================== RCS file: /cvsroot/mockpp/mockpp/bcb5/jmock_test.bpf,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** jmock_test.bpf 1 Mar 2005 19:34:29 -0000 1.15 --- jmock_test.bpf 4 Mar 2005 17:53:53 -0000 1.16 *************** *** 33,36 **** --- 33,37 ---- USEUNIT("..\mockpp\tests\InvokedRecorder_test.cpp"); USEUNIT("..\mockpp\tests\InvokeAtLeastOnceMatcher_test.cpp"); + USEUNIT("..\mockpp\tests\UnlimitedMatcher_test.cpp"); USEUNIT("..\mockpp\tests\InvokeOnceMatcher_test.cpp"); USEUNIT("..\mockpp\tests\InvokeCountMatcher_test.cpp"); |
From: Ewald A. <ewa...@us...> - 2005-03-04 17:41:16
|
Update of /cvsroot/mockpp/mockpp/mockpp/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20413/mockpp/tests Modified Files: UnlimitedMatcher_test.cpp Log Message: extended tests Index: UnlimitedMatcher_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/UnlimitedMatcher_test.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** UnlimitedMatcher_test.cpp 3 Mar 2005 23:32:27 -0000 1.1 --- UnlimitedMatcher_test.cpp 4 Mar 2005 17:41:07 -0000 1.2 *************** *** 69,72 **** --- 69,73 ---- CPPUNIT_ASSERT(ir.describeTo(s).find(MOCKPP_PCHAR("unlimited invocations")) != mockpp::String::npos); CPPUNIT_ASSERT(s.find(MOCKPP_PCHAR("unlimited invocations")) != mockpp::String::npos); + CPPUNIT_ASSERT(s.find(MOCKPP_PCHAR("has been")) == mockpp::String::npos); ir.incInvoked(); |
From: Ewald A. <ewa...@us...> - 2005-03-04 17:40:42
|
Update of /cvsroot/mockpp/mockpp/mockpp/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20191/mockpp/tests Modified Files: classes_ABCDE.h VisitableMockObject_5_test.cpp VisitableMockObject_5_void_test.cpp Log Message: extended tests Index: classes_ABCDE.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/classes_ABCDE.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** classes_ABCDE.h 30 Dec 2004 20:54:06 -0000 1.5 --- classes_ABCDE.h 4 Mar 2005 17:40:32 -0000 1.6 *************** *** 38,41 **** --- 38,43 ---- public: + CA(char ic) : c( ic ) {} + CA() : c( 'A' ) {} *************** *** 62,65 **** --- 64,69 ---- public: + CB(char ic) : c( ic ) {} + CB() : c( 'B' ) {} *************** *** 86,89 **** --- 90,95 ---- public: + CC(char ic) : c( ic ) {} + CC() : c( 'C' ) {} *************** *** 110,113 **** --- 116,121 ---- public: + CD(char ic) : c( ic ) {} + CD() : c( 'D' ) {} *************** *** 134,137 **** --- 142,147 ---- public: + CE(char ic) : c( ic ) {} + CE() : c( 'E' ) {} *************** *** 158,161 **** --- 168,173 ---- public: + CF(char ic) : c( ic ) {} + CF() : c( 'F' ) {} Index: VisitableMockObject_5_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/VisitableMockObject_5_test.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** VisitableMockObject_5_test.cpp 27 Feb 2005 18:04:29 -0000 1.21 --- VisitableMockObject_5_test.cpp 4 Mar 2005 17:40:32 -0000 1.22 *************** *** 69,72 **** --- 69,73 ---- CPPUNIT_TEST(test_constraint); CPPUNIT_TEST(test_controller_constraint); + CPPUNIT_TEST(test_controller_constraint_ext); CPPUNIT_TEST_EXCEPTION(fail_add_throw_after_active, mockpp::AssertionFailedError); *************** *** 97,100 **** --- 98,102 ---- void test_constraint(); void test_controller_constraint(); + void test_controller_constraint_ext(); void fail_unused_value(); *************** *** 265,268 **** --- 267,278 ---- virtual int abc_visitable0 () = 0; + virtual int cba_visitable5 (const CE&, const CD&, const CC&, const CB&, CA) = 0; + virtual int cba_visitable5 (const CF&, const CD&, const CC&, const CB&, CA) = 0; + virtual int cba_visitable4 (const CE&, const CD&, const CC&, const CB&) = 0; + virtual int cba_visitable3 (const CE&, const CD&, const CC&) = 0; + virtual int cba_visitable2 (const CE&, const CD&) = 0; + virtual int cba_visitable1 (const CE&) = 0; + virtual int cba_visitable0 () = 0; + virtual int abc_visitable5_p (const CA*, const CB*, const CC*, const CD*, const CE*) = 0; virtual int abc_visitable4_p (const CA*, const CB*, const CC*, const CD*) = 0; *************** *** 313,316 **** --- 323,334 ---- , MOCKPP_CONSTRUCT_MEMBERS_FOR_VISITABLE_EXT0(abc_visitable0, Ext) + , MOCKPP_CONSTRUCT_MEMBERS_FOR_VISITABLE_EXT5(cba_visitable5, Ext1) + , MOCKPP_CONSTRUCT_MEMBERS_FOR_VISITABLE_EXT5(cba_visitable5, Ext2) + , MOCKPP_CONSTRUCT_MEMBERS_FOR_VISITABLE_EXT4(cba_visitable4, Ext) + , MOCKPP_CONSTRUCT_MEMBERS_FOR_VISITABLE_EXT3(cba_visitable3, Ext) + , MOCKPP_CONSTRUCT_MEMBERS_FOR_VISITABLE_EXT2(cba_visitable2, Ext) + , MOCKPP_CONSTRUCT_MEMBERS_FOR_VISITABLE_EXT1(cba_visitable1, Ext) + , MOCKPP_CONSTRUCT_MEMBERS_FOR_VISITABLE_EXT0(cba_visitable0, Ext) + , MOCKPP_CONSTRUCT_MEMBERS_FOR_VISITABLE_EXT5(abc_visitable5_p, Ext) , MOCKPP_CONSTRUCT_MEMBERS_FOR_VISITABLE_EXT4(abc_visitable4_p, Ext) *************** *** 395,398 **** --- 413,438 ---- + MOCKPP_VISITABLE_EXT5(MyVisitableMockObject_5ex, int, cba_visitable5, const CE&, const CD&, const CC&, const CB&, CA, + int, Ext1, CE, CD, CC, CB, CA); + + MOCKPP_VISITABLE_EXT5(MyVisitableMockObject_5ex, int, cba_visitable5, const CF&, const CD&, const CC&, const CB&, CA, + int, Ext2, CF, CD, CC, CB, CA); + + MOCKPP_VISITABLE_EXT4(MyVisitableMockObject_5ex, int, cba_visitable4, const CE&, const CD&, const CC&, const CB&, + int, Ext, CE, CD, CC, CB); + + MOCKPP_VISITABLE_EXT3(MyVisitableMockObject_5ex, int, cba_visitable3, const CE&, const CD&, const CC&, + int, Ext, CE, CD, CC); + + MOCKPP_VISITABLE_EXT2(MyVisitableMockObject_5ex, int, cba_visitable2, const CE&, const CD&, + int, Ext, CE, CD); + + MOCKPP_VISITABLE_EXT1(MyVisitableMockObject_5ex, int, cba_visitable1, const CE&, + int, Ext, CE); + + MOCKPP_VISITABLE_EXT0(MyVisitableMockObject_5ex, int, cba_visitable0, + int, Ext); + + MOCKPP_VISITABLE_EXT5(MyVisitableMockObject_5ex, int, abc_visitable5_p, const CA*, const CB*, const CC*, const CD*, const CE*, int, Ext, CA*, CB*, CC*, CD*, CE*); *************** *** 1008,1010 **** --- 1048,1135 ---- + void VisitableMockObject_5_test::test_controller_constraint_ext() + { + MyVisitableMockObject_5ex mvo(MOCKPP_PCHAR("mvo")); + MOCKPP_CONTROLLER_FOR_EXT(MyVisitableMockObject_5ex, abc_visitable5, Ext1) abc1_ctr5 (&mvo); + MOCKPP_CONTROLLER_FOR_EXT(MyVisitableMockObject_5ex, abc_visitable5, Ext2) abc2_ctr5 (&mvo); + MOCKPP_CONTROLLER_FOR_EXT(MyVisitableMockObject_5ex, cba_visitable5, Ext1) cba_ctr5 (&mvo); + + abc1_ctr5.setDefaultReturnValue(123); + abc2_ctr5.setDefaultReturnValue(456); + cba_ctr5.setDefaultReturnValue(321); + + mvo.abc_visitable5(mockpp::eq<CA>(10), + mockpp::eq<CB>(20), + mockpp::eq<CC>(30), + mockpp::eq<CD>(40), + mockpp::eq<CE>(50)); + + mvo.abc_visitable5(mockpp::eq<CA>(10), + mockpp::eq<CB>(20), + mockpp::eq<CC>(30), + mockpp::eq<CD>(40), + mockpp::eq<CF>(50)); + + mvo.cba_visitable5(mockpp::eq<CE>(10), + mockpp::eq<CD>(20), + mockpp::eq<CC>(30), + mockpp::eq<CB>(40), + mockpp::eq<CA>(50)); + + mvo.abc_visitable5(mockpp::eq<CA>(11), + mockpp::eq<CB>(21), + mockpp::eq<CC>(31), + mockpp::eq<CD>(41), + mockpp::eq<CE>(51)); + + mvo.abc_visitable5(mockpp::eq<CA>(11), + mockpp::eq<CB>(21), + mockpp::eq<CC>(31), + mockpp::eq<CD>(41), + mockpp::eq<CF>(51)); + + mvo.cba_visitable5(mockpp::eq<CE>(11), + mockpp::eq<CD>(21), + mockpp::eq<CC>(31), + mockpp::eq<CB>(41), + mockpp::eq<CA>(51)); + + abc1_ctr5.addResponseThrowable(mockpp::make_throwable((int)2), + mockpp::eq<CA>(10), + mockpp::eq<CB>(20), + mockpp::eq<CC>(30), + mockpp::eq<CD>(40), + mockpp::eq<CE>(50)); + + abc2_ctr5.addResponseValue(4, mockpp::eq<CA>(10), + mockpp::eq<CB>(20), + mockpp::eq<CC>(30), + mockpp::eq<CD>(40), + mockpp::eq<CF>(50)); + + cba_ctr5.addResponseValue(2, mockpp::eq<CE>(10), + mockpp::eq<CD>(20), + mockpp::eq<CC>(30), + mockpp::eq<CB>(40), + mockpp::eq<CA>(50)); + + mvo.activate(); + + MOCKPP_ASSERT_THROWING(mvo.abc_visitable5(CA(10), CB(20), CC(30), CD(40), CE(50)), + MOCKPP_PCHAR("mvo.abc_visitable5(CA(10), CB(20), CC(30), CD(40), CE(50))"), + int, + 2); + + CPPUNIT_ASSERT(4 == mvo.abc_visitable5(CA(10), CB(20), CC(30), CD(40), CF(50))); + + CPPUNIT_ASSERT(2 == mvo.cba_visitable5(CE(10), CD(20), CC(30), CB(40), CA(50))); + + CPPUNIT_ASSERT(123 == mvo.abc_visitable5(CA(11), CB(21), CC(31), CD(41), CE(51))); + CPPUNIT_ASSERT(456 == mvo.abc_visitable5(CA(11), CB(21), CC(31), CD(41), CF(51))); + CPPUNIT_ASSERT(321 == mvo.cba_visitable5(CE(11), CD(21), CC(31), CB(41), CA(51))); + + mvo.verify(); + } + + #endif // HAVE_CPPUNIT Index: VisitableMockObject_5_void_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/VisitableMockObject_5_void_test.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** VisitableMockObject_5_void_test.cpp 27 Feb 2005 18:04:29 -0000 1.18 --- VisitableMockObject_5_void_test.cpp 4 Mar 2005 17:40:32 -0000 1.19 *************** *** 64,67 **** --- 64,68 ---- CPPUNIT_TEST(test_constraint); CPPUNIT_TEST(test_controller_constraint); + CPPUNIT_TEST(test_controller_constraint_ext); CPPUNIT_TEST_EXCEPTION(fail_add_throw_after_active, mockpp::AssertionFailedError); *************** *** 84,87 **** --- 85,89 ---- void test_constraint(); void test_controller_constraint(); + void test_controller_constraint_ext(); void fail_unused_throwable(); *************** *** 235,238 **** --- 237,248 ---- virtual void abc_visitable0 () = 0; + virtual void cba_visitable5 (const CE&, const CD&, const CC&, const CB&, CA) = 0; + virtual void cba_visitable5 (const CF&, const CD&, const CC&, const CB&, CA) = 0; + virtual void cba_visitable4 (const CE&, const CD&, const CC&, const CB&) = 0; + virtual void cba_visitable3 (const CE&, const CD&, const CC&) = 0; + virtual void cba_visitable2 (const CE&, const CD&) = 0; + virtual void cba_visitable1 (const CE&) = 0; + virtual void cba_visitable0 () = 0; + virtual void abc_visitable5_p (const CA*, const CB*, const CC*, const CD*, const CE*) = 0; virtual void abc_visitable4_p (const CA*, const CB*, const CC*, const CD*) = 0; *************** *** 285,288 **** --- 295,306 ---- , MOCKPP_CONSTRUCT_MEMBERS_FOR_VOID_VISITABLE_EXT0(abc_visitable0, Ext) + , MOCKPP_CONSTRUCT_MEMBERS_FOR_VOID_VISITABLE_EXT5(cba_visitable5, Ext1) + , MOCKPP_CONSTRUCT_MEMBERS_FOR_VOID_VISITABLE_EXT5(cba_visitable5, Ext2) + , MOCKPP_CONSTRUCT_MEMBERS_FOR_VOID_VISITABLE_EXT4(cba_visitable4, Ext) + , MOCKPP_CONSTRUCT_MEMBERS_FOR_VOID_VISITABLE_EXT3(cba_visitable3, Ext) + , MOCKPP_CONSTRUCT_MEMBERS_FOR_VOID_VISITABLE_EXT2(cba_visitable2, Ext) + , MOCKPP_CONSTRUCT_MEMBERS_FOR_VOID_VISITABLE_EXT1(cba_visitable1, Ext) + , MOCKPP_CONSTRUCT_MEMBERS_FOR_VOID_VISITABLE_EXT0(cba_visitable0, Ext) + , MOCKPP_CONSTRUCT_MEMBERS_FOR_VOID_VISITABLE_EXT5(abc_visitable5_p, Ext) , MOCKPP_CONSTRUCT_MEMBERS_FOR_VOID_VISITABLE_EXT4(abc_visitable4_p, Ext) *************** *** 367,370 **** --- 385,410 ---- + MOCKPP_VOID_VISITABLE_EXT5(MyVisitableMockObject_5_void_ex, cba_visitable5, const CE&, const CD&, const CC&, const CB&, CA, + Ext1, CE, CD, CC, CB, CA); + + MOCKPP_VOID_VISITABLE_EXT5(MyVisitableMockObject_5_void_ex, cba_visitable5, const CF&, const CD&, const CC&, const CB&, CA, + Ext2, CF, CD, CC, CB, CA); + + MOCKPP_VOID_VISITABLE_EXT4(MyVisitableMockObject_5_void_ex, cba_visitable4, const CE&, const CD&, const CC&, const CB&, + Ext, CE, CD, CC, CB); + + MOCKPP_VOID_VISITABLE_EXT3(MyVisitableMockObject_5_void_ex, cba_visitable3, const CE&, const CD&, const CC&, + Ext, CE, CD, CC); + + MOCKPP_VOID_VISITABLE_EXT2(MyVisitableMockObject_5_void_ex, cba_visitable2, const CE&, const CD&, + Ext, CE, CD); + + MOCKPP_VOID_VISITABLE_EXT1(MyVisitableMockObject_5_void_ex, cba_visitable1, const CE&, + Ext, CE); + + MOCKPP_VOID_VISITABLE_EXT0(MyVisitableMockObject_5_void_ex, cba_visitable0, + Ext); + + MOCKPP_VOID_VISITABLE_EXT5(MyVisitableMockObject_5_void_ex, abc_visitable5_p, const CA*, const CB*, const CC*, const CD*, const CE*, Ext, CA*, CB*, CC*, CD*, CE*); *************** *** 745,747 **** --- 785,855 ---- + void VisitableMockObject_5_void_test::test_controller_constraint_ext() + { + MyVisitableMockObject_5_void_ex mvo(MOCKPP_PCHAR("mvo")); + MOCKPP_CONTROLLER_FOR_EXT(MyVisitableMockObject_5_void_ex, abc_visitable5, Ext1) abc1_ctr5 (&mvo); + MOCKPP_CONTROLLER_FOR_EXT(MyVisitableMockObject_5_void_ex, abc_visitable5, Ext2) abc2_ctr5 (&mvo); + MOCKPP_CONTROLLER_FOR_EXT(MyVisitableMockObject_5_void_ex, cba_visitable5, Ext1) cba_ctr5 (&mvo); + + mvo.abc_visitable5(mockpp::eq<CA>(10), + mockpp::eq<CB>(20), + mockpp::eq<CC>(30), + mockpp::eq<CD>(40), + mockpp::eq<CE>(50)); + + mvo.abc_visitable5(mockpp::eq<CA>(10), + mockpp::eq<CB>(20), + mockpp::eq<CC>(30), + mockpp::eq<CD>(40), + mockpp::eq<CF>(50)); + + mvo.cba_visitable5(mockpp::eq<CE>(10), + mockpp::eq<CD>(20), + mockpp::eq<CC>(30), + mockpp::eq<CB>(40), + mockpp::eq<CA>(50)); + + mvo.abc_visitable5(mockpp::eq<CA>(11), + mockpp::eq<CB>(21), + mockpp::eq<CC>(31), + mockpp::eq<CD>(41), + mockpp::eq<CE>(51)); + + mvo.abc_visitable5(mockpp::eq<CA>(11), + mockpp::eq<CB>(21), + mockpp::eq<CC>(31), + mockpp::eq<CD>(41), + mockpp::eq<CF>(51)); + + mvo.cba_visitable5(mockpp::eq<CE>(11), + mockpp::eq<CD>(21), + mockpp::eq<CC>(31), + mockpp::eq<CB>(41), + mockpp::eq<CA>(51)); + + abc1_ctr5.addResponseThrowable(mockpp::make_throwable((int)2), + mockpp::eq<CA>(10), + mockpp::eq<CB>(20), + mockpp::eq<CC>(30), + mockpp::eq<CD>(40), + mockpp::eq<CE>(50)); + + mvo.activate(); + + MOCKPP_ASSERT_THROWING(mvo.abc_visitable5(CA(10), CB(20), CC(30), CD(40), CE(50)), + MOCKPP_PCHAR("mvo.abc_visitable5(CA(10), CB(20), CC(30), CD(40), CE(50))"), + int, + 2); + + mvo.abc_visitable5(CA(10), CB(20), CC(30), CD(40), CF(50)); + + mvo.cba_visitable5(CE(10), CD(20), CC(30), CB(40), CA(50)); + + mvo.abc_visitable5(CA(11), CB(21), CC(31), CD(41), CE(51)); + mvo.abc_visitable5(CA(11), CB(21), CC(31), CD(41), CF(51)); + mvo.cba_visitable5(CE(11), CD(21), CC(31), CB(41), CA(51)); + + mvo.verify(); + } + #endif // HAVE_CPPUNIT |
From: Ewald A. <ewa...@us...> - 2005-03-04 17:39:51
|
Update of /cvsroot/mockpp/mockpp/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19898/mockpp Modified Files: Makefile.am VisitableMockObject.h VisitableMockObject_macro.h Log Message: use correct method name Index: Makefile.am =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/Makefile.am,v retrieving revision 1.69 retrieving revision 1.70 diff -C2 -d -r1.69 -r1.70 *** Makefile.am 27 Feb 2005 11:48:14 -0000 1.69 --- Makefile.am 4 Mar 2005 17:39:40 -0000 1.70 *************** *** 11,19 **** libmockpp_la_LIBADD = $(top_builddir)/mockpp/util/libutil.la \ ! $(top_builddir)/mockpp/matcher/libmatcher.la \ ! $(top_builddir)/mockpp/constraint/libconstraint.la \ ! $(top_builddir)/mockpp/compat/libcompat.la \ ! $(top_builddir)/mockpp/chaining/libchaining.la \ ! $(top_builddir)/mockpp/builder/libbuilder.la libmockpp_la_SOURCES = ExpectationCounter.cpp mockpp.cpp Throwable.cpp \ --- 11,17 ---- libmockpp_la_LIBADD = $(top_builddir)/mockpp/util/libutil.la \ ! $(top_builddir)/mockpp/stub/libstub.la $(top_builddir)/mockpp/matcher/libmatcher.la \ ! $(top_builddir)/mockpp/constraint/libconstraint.la $(top_builddir)/mockpp/compat/libcompat.la \ ! $(top_builddir)/mockpp/chaining/libchaining.la $(top_builddir)/mockpp/builder/libbuilder.la libmockpp_la_SOURCES = ExpectationCounter.cpp mockpp.cpp Throwable.cpp \ Index: VisitableMockObject.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/VisitableMockObject.h,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** VisitableMockObject.h 27 Feb 2005 18:04:28 -0000 1.35 --- VisitableMockObject.h 4 Mar 2005 17:39:40 -0000 1.36 *************** *** 438,442 **** void name(const type1 ¶m1) \ MOCKPP_VOID_VISITABLE1_IMPL(classname, name, const type1 &, \ ! type1) /** Implements a const method with 1 parameter for a mock object. --- 438,442 ---- void name(const type1 ¶m1) \ MOCKPP_VOID_VISITABLE1_IMPL(classname, name, const type1 &, \ ! name, type1) /** Implements a const method with 1 parameter for a mock object. *************** *** 449,453 **** void name(const type1 ¶m1) const \ MOCKPP_VOID_VISITABLE1_IMPL(classname, name, const type1 &, \ ! type1) /** Implements a method with 1 parameter for a mock object. --- 449,453 ---- void name(const type1 ¶m1) const \ MOCKPP_VOID_VISITABLE1_IMPL(classname, name, const type1 &, \ ! name, type1) /** Implements a method with 1 parameter for a mock object. *************** *** 465,469 **** void m_name(m_type1 param1) \ MOCKPP_VOID_VISITABLE1_IMPL(classname, m_name ## x_name, m_type1, \ ! v_type1) /** Implements a const method with 1 parameter for a mock object. --- 465,469 ---- void m_name(m_type1 param1) \ MOCKPP_VOID_VISITABLE1_IMPL(classname, m_name ## x_name, m_type1, \ ! m_name, v_type1) /** Implements a const method with 1 parameter for a mock object. *************** *** 481,485 **** void m_name(m_type1 param1) const \ MOCKPP_VOID_VISITABLE1_IMPL(classname, m_name ## x_name, m_type1, \ ! v_type1) //////////////////////////////////////////////////////////////////////////////// --- 481,485 ---- void m_name(m_type1 param1) const \ MOCKPP_VOID_VISITABLE1_IMPL(classname, m_name ## x_name, m_type1, \ ! m_name, v_type1) //////////////////////////////////////////////////////////////////////////////// *************** *** 496,500 **** void name(const type1 ¶m1, const type2 ¶m2) \ MOCKPP_VOID_VISITABLE2_IMPL(classname, name, const type1 &, const type2 &, \ ! type1, type2) /** Implements a const method with 2 parameters for a mock object. --- 496,500 ---- void name(const type1 ¶m1, const type2 ¶m2) \ MOCKPP_VOID_VISITABLE2_IMPL(classname, name, const type1 &, const type2 &, \ ! name, type1, type2) /** Implements a const method with 2 parameters for a mock object. *************** *** 509,513 **** void name(const type1 ¶m1, const type2 ¶m2) const \ MOCKPP_VOID_VISITABLE2_IMPL(classname, name, const type1 &, const type2 &, \ ! type1, type2) /** Implements a method with 2 parameters for a mock object. --- 509,513 ---- void name(const type1 ¶m1, const type2 ¶m2) const \ MOCKPP_VOID_VISITABLE2_IMPL(classname, name, const type1 &, const type2 &, \ ! name, type1, type2) /** Implements a method with 2 parameters for a mock object. *************** *** 527,531 **** void m_name(m_type1 param1, m_type2 param2) \ MOCKPP_VOID_VISITABLE2_IMPL(classname, m_name ## x_name, m_type1, m_type2, \ ! v_type1, v_type2) /** Implements a const method with 2 parameters for a mock object. --- 527,531 ---- void m_name(m_type1 param1, m_type2 param2) \ MOCKPP_VOID_VISITABLE2_IMPL(classname, m_name ## x_name, m_type1, m_type2, \ ! m_name, v_type1, v_type2) /** Implements a const method with 2 parameters for a mock object. *************** *** 545,549 **** void m_name(m_type1 param1, m_type2 param2) const \ MOCKPP_VOID_VISITABLE2_IMPL(classname, m_name ## x_name, m_type1, m_type2, \ ! v_type1, v_type2) //////////////////////////////////////////////////////////////////////////////// --- 545,549 ---- void m_name(m_type1 param1, m_type2 param2) const \ MOCKPP_VOID_VISITABLE2_IMPL(classname, m_name ## x_name, m_type1, m_type2, \ ! m_name, v_type1, v_type2) //////////////////////////////////////////////////////////////////////////////// *************** *** 561,565 **** void name(const type1 ¶m1, const type2 ¶m2, const type3 ¶m3) \ MOCKPP_VOID_VISITABLE3_IMPL(classname, name, const type1 &, const type2 &, const type3 &, \ ! type1, type2, type3) /** Implements a const method with 3 parameters for a mock object. --- 561,565 ---- void name(const type1 ¶m1, const type2 ¶m2, const type3 ¶m3) \ MOCKPP_VOID_VISITABLE3_IMPL(classname, name, const type1 &, const type2 &, const type3 &, \ ! name, type1, type2, type3) /** Implements a const method with 3 parameters for a mock object. *************** *** 575,579 **** void name(const type1 ¶m1, const type2 ¶m2, const type3 ¶m3) const \ MOCKPP_VOID_VISITABLE3_IMPL(classname, name, const type1 &, const type2 &, const type3 &, \ ! type1, type2, type3) /** Implements a method with 3 parameters for a mock object. --- 575,579 ---- void name(const type1 ¶m1, const type2 ¶m2, const type3 ¶m3) const \ MOCKPP_VOID_VISITABLE3_IMPL(classname, name, const type1 &, const type2 &, const type3 &, \ ! name, type1, type2, type3) /** Implements a method with 3 parameters for a mock object. *************** *** 595,599 **** void m_name(m_type1 param1, m_type2 param2, m_type3 param3) \ MOCKPP_VOID_VISITABLE3_IMPL(classname, m_name ## x_name, m_type1, m_type2, m_type3, \ ! v_type1, v_type2, v_type3) /** Implements a const method with 3 parameters for a mock object. --- 595,599 ---- void m_name(m_type1 param1, m_type2 param2, m_type3 param3) \ MOCKPP_VOID_VISITABLE3_IMPL(classname, m_name ## x_name, m_type1, m_type2, m_type3, \ ! m_name, v_type1, v_type2, v_type3) /** Implements a const method with 3 parameters for a mock object. *************** *** 615,619 **** void m_name(m_type1 param1, m_type2 param2, m_type3 param3) const \ MOCKPP_VOID_VISITABLE3_IMPL(classname, m_name ## x_name, m_type1, m_type2, m_type3, \ ! v_type1, v_type2, v_type3) //////////////////////////////////////////////////////////////////////////////// --- 615,619 ---- void m_name(m_type1 param1, m_type2 param2, m_type3 param3) const \ MOCKPP_VOID_VISITABLE3_IMPL(classname, m_name ## x_name, m_type1, m_type2, m_type3, \ ! m_name, v_type1, v_type2, v_type3) //////////////////////////////////////////////////////////////////////////////// *************** *** 632,636 **** void name(const type1 ¶m1, const type2 ¶m2, const type3 ¶m3, const type4 ¶m4) \ MOCKPP_VOID_VISITABLE4_IMPL(classname, name, const type1 &, const type2 &, const type3 &, const type4 &, \ ! type1, type2, type3, type4) /** Implements a const method with 4 parameters for a mock object. --- 632,636 ---- void name(const type1 ¶m1, const type2 ¶m2, const type3 ¶m3, const type4 ¶m4) \ MOCKPP_VOID_VISITABLE4_IMPL(classname, name, const type1 &, const type2 &, const type3 &, const type4 &, \ ! name, type1, type2, type3, type4) /** Implements a const method with 4 parameters for a mock object. *************** *** 647,651 **** void name(const type1 ¶m1, const type2 ¶m2, const type3 ¶m3, const type4 ¶m4) const\ MOCKPP_VOID_VISITABLE4_IMPL(classname, name, const type1 &, const type2 &, const type3 &, const type4 &, \ ! type1, type2, type3, type4) /** Implements a method with 4 parameters for a mock object. --- 647,651 ---- void name(const type1 ¶m1, const type2 ¶m2, const type3 ¶m3, const type4 ¶m4) const\ MOCKPP_VOID_VISITABLE4_IMPL(classname, name, const type1 &, const type2 &, const type3 &, const type4 &, \ ! name, type1, type2, type3, type4) /** Implements a method with 4 parameters for a mock object. *************** *** 669,673 **** void m_name(m_type1 param1, m_type2 param2, m_type3 param3, m_type4 param4) \ MOCKPP_VOID_VISITABLE4_IMPL(classname, m_name ## x_name, m_type1, m_type2, m_type3, m_type4, \ ! v_type1, v_type2, v_type3, v_type4) /** Implements a const method with 4 parameters for a mock object. --- 669,673 ---- void m_name(m_type1 param1, m_type2 param2, m_type3 param3, m_type4 param4) \ MOCKPP_VOID_VISITABLE4_IMPL(classname, m_name ## x_name, m_type1, m_type2, m_type3, m_type4, \ ! m_name, v_type1, v_type2, v_type3, v_type4) /** Implements a const method with 4 parameters for a mock object. *************** *** 691,695 **** void m_name(m_type1 param1, m_type2 param2, m_type3 param3, m_type4 param4) const\ MOCKPP_VOID_VISITABLE4_IMPL(classname, m_name ## x_name, m_type1, m_type2, m_type3, m_type4, \ ! v_type1, v_type2, v_type3, v_type4) //////////////////////////////////////////////////////////////////////////////// --- 691,695 ---- void m_name(m_type1 param1, m_type2 param2, m_type3 param3, m_type4 param4) const\ MOCKPP_VOID_VISITABLE4_IMPL(classname, m_name ## x_name, m_type1, m_type2, m_type3, m_type4, \ ! m_name, v_type1, v_type2, v_type3, v_type4) //////////////////////////////////////////////////////////////////////////////// *************** *** 709,713 **** void name(const type1 ¶m1, const type2 ¶m2, const type3 ¶m3, const type4 ¶m4, const type5 ¶m5) \ MOCKPP_VOID_VISITABLE5_IMPL(classname, name, const type1 &, const type2 &, const type3 &, const type4 &, const type5 &, \ ! type1, type2, type3, type4, type5) /** Implements a const method with 5 parameters for a mock object. --- 709,713 ---- void name(const type1 ¶m1, const type2 ¶m2, const type3 ¶m3, const type4 ¶m4, const type5 ¶m5) \ MOCKPP_VOID_VISITABLE5_IMPL(classname, name, const type1 &, const type2 &, const type3 &, const type4 &, const type5 &, \ ! name, type1, type2, type3, type4, type5) /** Implements a const method with 5 parameters for a mock object. *************** *** 725,729 **** void name(const type1 ¶m1, const type2 ¶m2, const type3 ¶m3, const type4 ¶m4, const type5 ¶m5) const \ MOCKPP_VOID_VISITABLE5_IMPL(classname, name, const type1 &, const type2 &, const type3 &, const type4 &, const type5 &, \ ! type1, type2, type3, type4, type5) /** Implements a method with 5 parameters for a mock object. --- 725,729 ---- void name(const type1 ¶m1, const type2 ¶m2, const type3 ¶m3, const type4 ¶m4, const type5 ¶m5) const \ MOCKPP_VOID_VISITABLE5_IMPL(classname, name, const type1 &, const type2 &, const type3 &, const type4 &, const type5 &, \ ! name, type1, type2, type3, type4, type5) /** Implements a method with 5 parameters for a mock object. *************** *** 749,753 **** void m_name(m_type1 param1, m_type2 param2, m_type3 param3, m_type4 param4, m_type5 param5) \ MOCKPP_VOID_VISITABLE5_IMPL(classname, m_name ##x_name, m_type1, m_type2, m_type3, m_type4, m_type5, \ ! v_type1, v_type2, v_type3, v_type4, v_type5) /** Implements a const method with 5 parameters for a mock object. --- 749,753 ---- void m_name(m_type1 param1, m_type2 param2, m_type3 param3, m_type4 param4, m_type5 param5) \ MOCKPP_VOID_VISITABLE5_IMPL(classname, m_name ##x_name, m_type1, m_type2, m_type3, m_type4, m_type5, \ ! m_name, v_type1, v_type2, v_type3, v_type4, v_type5) /** Implements a const method with 5 parameters for a mock object. *************** *** 773,777 **** void m_name(m_type1 param1, m_type2 param2, m_type3 param3, m_type4 param4, m_type5 param5) const \ MOCKPP_VOID_VISITABLE5_IMPL(classname, m_name ## x_name, m_type1, m_type2, m_type3, m_type4, m_type5, \ ! v_type1, v_type2, v_type3, v_type4, v_type5) //////////////////////////////////////////////////////////////////////////////// --- 773,777 ---- void m_name(m_type1 param1, m_type2 param2, m_type3 param3, m_type4 param4, m_type5 param5) const \ MOCKPP_VOID_VISITABLE5_IMPL(classname, m_name ## x_name, m_type1, m_type2, m_type3, m_type4, m_type5, \ ! m_name, v_type1, v_type2, v_type3, v_type4, v_type5) //////////////////////////////////////////////////////////////////////////////// *************** *** 846,850 **** ret_type name(const type1 ¶m1) \ MOCKPP_VISITABLE1_IMPL(classname, ret_type, name, const type1 &, \ ! ret_type, type1) /** Implements a const method with 1 parameter for a mock object. --- 846,850 ---- ret_type name(const type1 ¶m1) \ MOCKPP_VISITABLE1_IMPL(classname, ret_type, name, const type1 &, \ ! ret_type, name, type1) /** Implements a const method with 1 parameter for a mock object. *************** *** 859,863 **** ret_type name(const type1 ¶m1) const \ MOCKPP_VISITABLE1_IMPL(classname, ret_type, name, const type1 &, \ ! ret_type, type1) /** Implements a method with 1 parameter for a mock object. --- 859,863 ---- ret_type name(const type1 ¶m1) const \ MOCKPP_VISITABLE1_IMPL(classname, ret_type, name, const type1 &, \ ! ret_type, name, type1) /** Implements a method with 1 parameter for a mock object. *************** *** 877,881 **** m_ret_type m_name(m_type1 param1) \ MOCKPP_VISITABLE1_IMPL(classname, m_ret_type, m_name ## x_name, m_type1, \ ! v_ret_type, v_type1) /** Implements a const method with 1 parameter for a mock object. --- 877,881 ---- m_ret_type m_name(m_type1 param1) \ MOCKPP_VISITABLE1_IMPL(classname, m_ret_type, m_name ## x_name, m_type1, \ ! v_ret_type, m_name, v_type1) /** Implements a const method with 1 parameter for a mock object. *************** *** 895,899 **** m_ret_type m_name(m_type1 param1) const \ MOCKPP_VISITABLE1_IMPL(classname, m_ret_type, m_name ## x_name, m_type1, \ ! v_ret_type, v_type1) //////////////////////////////////////////////////////////////////////////////// --- 895,899 ---- m_ret_type m_name(m_type1 param1) const \ MOCKPP_VISITABLE1_IMPL(classname, m_ret_type, m_name ## x_name, m_type1, \ ! v_ret_type, m_name, v_type1) //////////////////////////////////////////////////////////////////////////////// *************** *** 911,915 **** ret_type name(const type1 ¶m1, const type2 ¶m2) \ MOCKPP_VISITABLE2_IMPL(classname, ret_type, name, const type1 &, const type2 &, \ ! ret_type, type1, type2) /** Implements a const method with 2 parameters for a mock object. --- 911,915 ---- ret_type name(const type1 ¶m1, const type2 ¶m2) \ MOCKPP_VISITABLE2_IMPL(classname, ret_type, name, const type1 &, const type2 &, \ ! ret_type, name, type1, type2) /** Implements a const method with 2 parameters for a mock object. *************** *** 925,929 **** ret_type name(const type1 ¶m1, const type2 ¶m2) const \ MOCKPP_VISITABLE2_IMPL(classname, ret_type, name, const type1 &, const type2 &, \ ! ret_type, type1, type2) /** Implements a method with 2 parameters for a mock object. --- 925,929 ---- ret_type name(const type1 ¶m1, const type2 ¶m2) const \ MOCKPP_VISITABLE2_IMPL(classname, ret_type, name, const type1 &, const type2 &, \ ! ret_type, name, type1, type2) /** Implements a method with 2 parameters for a mock object. *************** *** 945,949 **** m_ret_type m_name(m_type1 param1, m_type2 param2) \ MOCKPP_VISITABLE2_IMPL(classname, m_ret_type, m_name ## x_name, m_type1, m_type2, \ ! v_ret_type, v_type1, v_type2) /** Implements a const method with 2 parameters for a mock object. --- 945,949 ---- m_ret_type m_name(m_type1 param1, m_type2 param2) \ MOCKPP_VISITABLE2_IMPL(classname, m_ret_type, m_name ## x_name, m_type1, m_type2, \ ! v_ret_type, m_name, v_type1, v_type2) /** Implements a const method with 2 parameters for a mock object. *************** *** 965,969 **** m_ret_type m_name(m_type1 param1, m_type2 param2) const \ MOCKPP_VISITABLE2_IMPL(classname, m_ret_type, m_name ## x_name, m_type1, m_type2, \ ! v_ret_type, v_type1, v_type2) --- 965,969 ---- m_ret_type m_name(m_type1 param1, m_type2 param2) const \ MOCKPP_VISITABLE2_IMPL(classname, m_ret_type, m_name ## x_name, m_type1, m_type2, \ ! v_ret_type, m_name, v_type1, v_type2) *************** *** 983,987 **** ret_type name(const type1 ¶m1, const type2 ¶m2, const type3 ¶m3) \ MOCKPP_VISITABLE3_IMPL(classname, ret_type, name, const type1 &, const type2 &, const type3, \ ! ret_type, type1, type2, type3) /** Implements a const method with 3 parameters for a mock object. --- 983,987 ---- ret_type name(const type1 ¶m1, const type2 ¶m2, const type3 ¶m3) \ MOCKPP_VISITABLE3_IMPL(classname, ret_type, name, const type1 &, const type2 &, const type3, \ ! ret_type, name, type1, type2, type3) /** Implements a const method with 3 parameters for a mock object. *************** *** 998,1002 **** ret_type name(const type1 ¶m1, const type2 ¶m2, const type3 ¶m3) const \ MOCKPP_VISITABLE3_IMPL(classname, ret_type, name, const type1 &, const type2 &, const type3, \ ! ret_type, type1, type2, type3) /** Implements a method with 3 parameters for a mock object. --- 998,1002 ---- ret_type name(const type1 ¶m1, const type2 ¶m2, const type3 ¶m3) const \ MOCKPP_VISITABLE3_IMPL(classname, ret_type, name, const type1 &, const type2 &, const type3, \ ! ret_type, name, type1, type2, type3) /** Implements a method with 3 parameters for a mock object. *************** *** 1020,1024 **** m_ret_type m_name(m_type1 param1, m_type2 param2, m_type3 param3) \ MOCKPP_VISITABLE3_IMPL(classname, m_ret_type, m_name ## x_name, m_type1, m_type2, m_type3, \ ! v_ret_type, v_type1, v_type2, v_type3) /** Implements a const method with 3 parameters for a mock object. --- 1020,1024 ---- m_ret_type m_name(m_type1 param1, m_type2 param2, m_type3 param3) \ MOCKPP_VISITABLE3_IMPL(classname, m_ret_type, m_name ## x_name, m_type1, m_type2, m_type3, \ ! v_ret_type, m_name, v_type1, v_type2, v_type3) /** Implements a const method with 3 parameters for a mock object. *************** *** 1042,1046 **** m_ret_type m_name(m_type1 param1, m_type2 param2, m_type3 param3) const \ MOCKPP_VISITABLE3_IMPL(classname, m_ret_type, m_name ## x_name, m_type1, m_type2, m_type3, \ ! v_ret_type, v_type1, v_type2, v_type3) --- 1042,1046 ---- m_ret_type m_name(m_type1 param1, m_type2 param2, m_type3 param3) const \ MOCKPP_VISITABLE3_IMPL(classname, m_ret_type, m_name ## x_name, m_type1, m_type2, m_type3, \ ! v_ret_type, m_name, v_type1, v_type2, v_type3) *************** *** 1061,1065 **** ret_type name(const type1 ¶m1, const type2 ¶m2, const type3 ¶m3, const type4 ¶m4) \ MOCKPP_VISITABLE4_IMPL(classname, ret_type, name, const m_type1 &, const type2 &, const type3 &, const type4 &, \ ! ret_type, type1, type2, type3, type4) /** Implements a const method with 4 parameters for a mock object. --- 1061,1065 ---- ret_type name(const type1 ¶m1, const type2 ¶m2, const type3 ¶m3, const type4 ¶m4) \ MOCKPP_VISITABLE4_IMPL(classname, ret_type, name, const m_type1 &, const type2 &, const type3 &, const type4 &, \ ! ret_type, name, type1, type2, type3, type4) /** Implements a const method with 4 parameters for a mock object. *************** *** 1077,1081 **** ret_type name(const type1 ¶m1, const type2 ¶m2, const type3 ¶m3, const type4 ¶m4) const \ MOCKPP_VISITABLE4_IMPL(classname, ret_type, name, const type1 &, const type2 &, const type3 &, const type4 &, \ ! ret_type, type1, type2, type3, type4) /** Implements a method with 4 parameters for a mock object. --- 1077,1081 ---- ret_type name(const type1 ¶m1, const type2 ¶m2, const type3 ¶m3, const type4 ¶m4) const \ MOCKPP_VISITABLE4_IMPL(classname, ret_type, name, const type1 &, const type2 &, const type3 &, const type4 &, \ ! ret_type, name, type1, type2, type3, type4) /** Implements a method with 4 parameters for a mock object. *************** *** 1101,1105 **** m_ret_type m_name(m_type1 param1, m_type2 param2, m_type3 param3, m_type4 param4) \ MOCKPP_VISITABLE4_IMPL(classname, m_ret_type, m_name ## x_name, m_type1, m_type2, m_type3, m_type4, \ ! v_ret_type, v_type1, v_type2, v_type3, v_type4) /** Implements a const method with 4 parameters for a mock object. --- 1101,1105 ---- m_ret_type m_name(m_type1 param1, m_type2 param2, m_type3 param3, m_type4 param4) \ MOCKPP_VISITABLE4_IMPL(classname, m_ret_type, m_name ## x_name, m_type1, m_type2, m_type3, m_type4, \ ! v_ret_type, m_name, v_type1, v_type2, v_type3, v_type4) /** Implements a const method with 4 parameters for a mock object. *************** *** 1125,1129 **** m_ret_type m_name(m_type1 param1, m_type2 param2, m_type3 param3, m_type4 param4) const \ MOCKPP_VISITABLE4_IMPL(classname, m_ret_type, m_name ## x_name, m_type1, m_type2, m_type3, m_type4, \ ! v_ret_type, v_type1, v_type2, v_type3, v_type4) --- 1125,1129 ---- m_ret_type m_name(m_type1 param1, m_type2 param2, m_type3 param3, m_type4 param4) const \ MOCKPP_VISITABLE4_IMPL(classname, m_ret_type, m_name ## x_name, m_type1, m_type2, m_type3, m_type4, \ ! v_ret_type, m_name, v_type1, v_type2, v_type3, v_type4) *************** *** 1145,1149 **** ret_type name(const type1 ¶m1, const type2 ¶m2, const type3 ¶m3, const type4 ¶m4, const type5 ¶m5) \ MOCKPP_VISITABLE5_IMPL(classname, ret_type, name, const type1 &, const type2 &, const type3 &, const type4 &, const type5 &, \ ! ret_type, type1, type2, type3, type4, type5) /** Implements a const method with 5 parameters for a mock object. --- 1145,1149 ---- ret_type name(const type1 ¶m1, const type2 ¶m2, const type3 ¶m3, const type4 ¶m4, const type5 ¶m5) \ MOCKPP_VISITABLE5_IMPL(classname, ret_type, name, const type1 &, const type2 &, const type3 &, const type4 &, const type5 &, \ ! ret_type, name, type1, type2, type3, type4, type5) /** Implements a const method with 5 parameters for a mock object. *************** *** 1162,1166 **** ret_type name(const type1 ¶m1, const type2 ¶m2, const type3 ¶m3, const type4 ¶m4, const type5 ¶m5) const \ MOCKPP_VISITABLE5_IMPL(classname, ret_type, name, const type1 &, const type2 &, const type3 &, const type4 &, const type5 &, \ ! ret_type, type1, type2, type3, type4, type5) /** Implements a method with 5 parameters for a mock object. --- 1162,1166 ---- ret_type name(const type1 ¶m1, const type2 ¶m2, const type3 ¶m3, const type4 ¶m4, const type5 ¶m5) const \ MOCKPP_VISITABLE5_IMPL(classname, ret_type, name, const type1 &, const type2 &, const type3 &, const type4 &, const type5 &, \ ! ret_type, name, type1, type2, type3, type4, type5) /** Implements a method with 5 parameters for a mock object. *************** *** 1188,1192 **** m_ret_type m_name(m_type1 param1, m_type2 param2, m_type3 param3, m_type4 param4, m_type5 param5) \ MOCKPP_VISITABLE5_IMPL(classname, m_ret_type, m_name ## x_name, m_type1, m_type2, m_type3, m_type4, m_type5, \ ! v_ret_type, v_type1, v_type2, v_type3, v_type4, v_type5) /** Implements a const method with 5 parameters for a mock object. --- 1188,1192 ---- m_ret_type m_name(m_type1 param1, m_type2 param2, m_type3 param3, m_type4 param4, m_type5 param5) \ MOCKPP_VISITABLE5_IMPL(classname, m_ret_type, m_name ## x_name, m_type1, m_type2, m_type3, m_type4, m_type5, \ ! v_ret_type, m_name, v_type1, v_type2, v_type3, v_type4, v_type5) /** Implements a const method with 5 parameters for a mock object. *************** *** 1214,1218 **** m_ret_type m_name(m_type1 param1, m_type2 param2, m_type3 param3, m_type4 param4, m_type5 param5) const \ MOCKPP_VISITABLE5_IMPL(classname, m_ret_type, m_name ## x_name, m_type1, m_type2, m_type3, m_type4, m_type5, \ ! v_ret_type, v_type1, v_type2, v_type3, v_type4, v_type5) ////////////////////////////////////////////////////////////// --- 1214,1218 ---- m_ret_type m_name(m_type1 param1, m_type2 param2, m_type3 param3, m_type4 param4, m_type5 param5) const \ MOCKPP_VISITABLE5_IMPL(classname, m_ret_type, m_name ## x_name, m_type1, m_type2, m_type3, m_type4, m_type5, \ ! v_ret_type, m_name, v_type1, v_type2, v_type3, v_type4, v_type5) ////////////////////////////////////////////////////////////// Index: VisitableMockObject_macro.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/VisitableMockObject_macro.h,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** VisitableMockObject_macro.h 27 Feb 2005 18:04:28 -0000 1.26 --- VisitableMockObject_macro.h 4 Mar 2005 17:39:40 -0000 1.27 *************** *** 711,720 **** * the internal variables. * @param classname the name of the mock class to which the method belongs ! * @param m_name the method name * @param m_type1 the data type of the 1. method parameter * @param v_type1 the data type of the internal variable of 1. parameter */ #define MOCKPP_VOID_VISITABLE1_IMPL(classname, m_name, m_type1, \ ! v_type1) \ { \ std::string func_name (#m_name); \ --- 711,721 ---- * the internal variables. * @param classname the name of the mock class to which the method belongs ! * @param m_name the extended method name * @param m_type1 the data type of the 1. method parameter + * @param a_name the actual method name * @param v_type1 the data type of the internal variable of 1. parameter */ #define MOCKPP_VOID_VISITABLE1_IMPL(classname, m_name, m_type1, \ ! a_name, v_type1) \ { \ std::string func_name (#m_name); \ *************** *** 742,746 **** } \ \ ! void m_name (const mockpp::ConstraintHolder<v_type1> ¶m1) \ { \ addExpectedMethod(std::string(#m_name)); \ --- 743,747 ---- } \ \ ! void a_name (const mockpp::ConstraintHolder<v_type1> ¶m1) /* @todo const? */ \ { \ addExpectedMethod(std::string(#m_name)); \ *************** *** 759,770 **** * the internal variables. * @param classname the name of the mock class to which the method belongs ! * @param m_name the method name * @param m_type1 the data type of the 1. method parameter * @param m_type2 the data type of the 2. method parameter * @param v_type1 the data type of the internal variable of 1. parameter * @param v_type2 the data type of the internal variable of 2. parameter */ #define MOCKPP_VOID_VISITABLE2_IMPL(classname, m_name, m_type1, m_type2, \ ! v_type1, v_type2) \ { \ std::string func_name (#m_name); \ --- 760,772 ---- * the internal variables. * @param classname the name of the mock class to which the method belongs ! * @param m_name the extended method name * @param m_type1 the data type of the 1. method parameter * @param m_type2 the data type of the 2. method parameter + * @param a_name the actual method name * @param v_type1 the data type of the internal variable of 1. parameter * @param v_type2 the data type of the internal variable of 2. parameter */ #define MOCKPP_VOID_VISITABLE2_IMPL(classname, m_name, m_type1, m_type2, \ ! a_name, v_type1, v_type2) \ { \ std::string func_name (#m_name); \ *************** *** 795,800 **** } \ \ ! void m_name(const mockpp::ConstraintHolder<v_type1> ¶m1, \ ! const mockpp::ConstraintHolder<v_type2> ¶m2) \ { \ addExpectedMethod(std::string(#m_name)); \ --- 797,802 ---- } \ \ ! void a_name(const mockpp::ConstraintHolder<v_type1> ¶m1, \ ! const mockpp::ConstraintHolder<v_type2> ¶m2) /* @todo const? */ \ { \ addExpectedMethod(std::string(#m_name)); \ *************** *** 815,822 **** * the internal variables. * @param classname the name of the mock class to which the method belongs ! * @param m_name the method name * @param m_type1 the data type of the 1. method parameter * @param m_type2 the data type of the 2. method parameter * @param m_type3 the data type of the 3. method parameter * @param v_type1 the data type of the internal variable of 1. parameter * @param v_type2 the data type of the internal variable of 2. parameter --- 817,825 ---- * the internal variables. * @param classname the name of the mock class to which the method belongs ! * @param m_name the extended method name * @param m_type1 the data type of the 1. method parameter * @param m_type2 the data type of the 2. method parameter * @param m_type3 the data type of the 3. method parameter + * @param a_name the actual method name * @param v_type1 the data type of the internal variable of 1. parameter * @param v_type2 the data type of the internal variable of 2. parameter *************** *** 824,828 **** */ #define MOCKPP_VOID_VISITABLE3_IMPL(classname, m_name, m_type1, m_type2, m_type3, \ ! v_type1, v_type2, v_type3) \ { \ std::string func_name (#m_name); \ --- 827,831 ---- */ #define MOCKPP_VOID_VISITABLE3_IMPL(classname, m_name, m_type1, m_type2, m_type3, \ ! a_name, v_type1, v_type2, v_type3) \ { \ std::string func_name (#m_name); \ *************** *** 856,862 **** } \ \ ! void m_name(const mockpp::ConstraintHolder<v_type1> ¶m1, \ const mockpp::ConstraintHolder<v_type2> ¶m2, \ ! const mockpp::ConstraintHolder<v_type3> ¶m3) \ { \ addExpectedMethod(std::string(#m_name)); \ --- 859,865 ---- } \ \ ! void a_name(const mockpp::ConstraintHolder<v_type1> ¶m1, \ const mockpp::ConstraintHolder<v_type2> ¶m2, \ ! const mockpp::ConstraintHolder<v_type3> ¶m3) /* @todo const? */ \ { \ addExpectedMethod(std::string(#m_name)); \ *************** *** 879,887 **** * the internal variables. * @param classname the name of the mock class to which the method belongs ! * @param m_name the method name * @param m_type1 the data type of the 1. method parameter * @param m_type2 the data type of the 2. method parameter * @param m_type3 the data type of the 3. method parameter * @param m_type4 the data type of the 4. method parameter * @param v_type1 the data type of the internal variable of 1. parameter * @param v_type2 the data type of the internal variable of 2. parameter --- 882,891 ---- * the internal variables. * @param classname the name of the mock class to which the method belongs ! * @param m_name the extended method name * @param m_type1 the data type of the 1. method parameter * @param m_type2 the data type of the 2. method parameter * @param m_type3 the data type of the 3. method parameter * @param m_type4 the data type of the 4. method parameter + * @param a_name the actual method name * @param v_type1 the data type of the internal variable of 1. parameter * @param v_type2 the data type of the internal variable of 2. parameter *************** *** 890,894 **** */ #define MOCKPP_VOID_VISITABLE4_IMPL(classname, m_name, m_type1, m_type2, m_type3, m_type4, \ ! v_type1, v_type2, v_type3, v_type4) \ { \ std::string func_name (#m_name); \ --- 894,898 ---- */ #define MOCKPP_VOID_VISITABLE4_IMPL(classname, m_name, m_type1, m_type2, m_type3, m_type4, \ ! a_name, v_type1, v_type2, v_type3, v_type4) \ { \ std::string func_name (#m_name); \ *************** *** 925,932 **** } \ \ ! void m_name(const mockpp::ConstraintHolder<v_type1> ¶m1, \ const mockpp::ConstraintHolder<v_type2> ¶m2, \ const mockpp::ConstraintHolder<v_type3> ¶m3, \ ! const mockpp::ConstraintHolder<v_type4> ¶m4) \ { \ addExpectedMethod(std::string(#m_name)); \ --- 929,936 ---- } \ \ ! void a_name(const mockpp::ConstraintHolder<v_type1> ¶m1, \ const mockpp::ConstraintHolder<v_type2> ¶m2, \ const mockpp::ConstraintHolder<v_type3> ¶m3, \ ! const mockpp::ConstraintHolder<v_type4> ¶m4) /* @todo const? */ \ { \ addExpectedMethod(std::string(#m_name)); \ *************** *** 951,955 **** * the internal variables. * @param classname the name of the mock class to which the method belongs ! * @param m_name the method name * @param m_type1 the data type of the 1. method parameter * @param m_type2 the data type of the 2. method parameter --- 955,959 ---- * the internal variables. * @param classname the name of the mock class to which the method belongs ! * @param m_name the extended method name * @param m_type1 the data type of the 1. method parameter * @param m_type2 the data type of the 2. method parameter *************** *** 957,960 **** --- 961,965 ---- * @param m_type4 the data type of the 4. method parameter * @param m_type5 the data type of the 5. method parameter + * @param a_name the actual method name * @param v_type1 the data type of the internal variable of 1. parameter * @param v_type2 the data type of the internal variable of 2. parameter *************** *** 964,968 **** */ #define MOCKPP_VOID_VISITABLE5_IMPL(classname, m_name, m_type1, m_type2, m_type3, m_type4, m_type5, \ ! v_type1, v_type2, v_type3, v_type4, v_type5) \ { \ std::string func_name (#m_name); \ --- 969,973 ---- */ #define MOCKPP_VOID_VISITABLE5_IMPL(classname, m_name, m_type1, m_type2, m_type3, m_type4, m_type5, \ ! a_name, v_type1, v_type2, v_type3, v_type4, v_type5) \ { \ std::string func_name (#m_name); \ *************** *** 1002,1010 **** } \ \ ! void m_name(const mockpp::ConstraintHolder<v_type1> ¶m1, \ const mockpp::ConstraintHolder<v_type2> ¶m2, \ const mockpp::ConstraintHolder<v_type3> ¶m3, \ const mockpp::ConstraintHolder<v_type4> ¶m4, \ ! const mockpp::ConstraintHolder<v_type5> ¶m5) \ { \ addExpectedMethod(std::string(#m_name)); \ --- 1007,1015 ---- } \ \ ! void a_name(const mockpp::ConstraintHolder<v_type1> ¶m1, \ const mockpp::ConstraintHolder<v_type2> ¶m2, \ const mockpp::ConstraintHolder<v_type3> ¶m3, \ const mockpp::ConstraintHolder<v_type4> ¶m4, \ ! const mockpp::ConstraintHolder<v_type5> ¶m5) /* @todo const? */ \ { \ addExpectedMethod(std::string(#m_name)); \ *************** *** 1069,1079 **** * @param classname the name of the mock class to which the method belongs * @param m_ret_type the data type of the return value ! * @param m_name the method name * @param m_type1 the data type of the 1. method parameter * @param v_ret_type the data type of the internal return value respesentation * @param v_type1 the data type of the internal variable of 1. parameter */ #define MOCKPP_VISITABLE1_IMPL(classname, m_ret_type, m_name, m_type1, \ ! v_ret_type, v_type1) \ { \ std::string func_name = #m_name; \ --- 1074,1085 ---- * @param classname the name of the mock class to which the method belongs * @param m_ret_type the data type of the return value ! * @param m_name the extended method name * @param m_type1 the data type of the 1. method parameter * @param v_ret_type the data type of the internal return value respesentation + * @param a_name the actual method name * @param v_type1 the data type of the internal variable of 1. parameter */ #define MOCKPP_VISITABLE1_IMPL(classname, m_ret_type, m_name, m_type1, \ ! v_ret_type, a_name, v_type1) \ { \ std::string func_name = #m_name; \ *************** *** 1110,1114 **** } \ \ ! m_ret_type m_name(const mockpp::ConstraintHolder<v_type1> ¶m1) \ { \ addExpectedMethod(std::string(#m_name)); \ --- 1116,1120 ---- } \ \ ! m_ret_type a_name(const mockpp::ConstraintHolder<v_type1> ¶m1) /* @todo const? */ \ { \ addExpectedMethod(std::string(#m_name)); \ *************** *** 1130,1142 **** * @param classname the name of the mock class to which the method belongs * @param m_ret_type the data type of the return value ! * @param m_name the method name * @param m_type1 the data type of the 1. method parameter * @param m_type2 the data type of the 2. method parameter * @param v_ret_type the data type of the internal return value respesentation * @param v_type1 the data type of the internal variable of 1. parameter * @param v_type2 the data type of the internal variable of 2. parameter */ #define MOCKPP_VISITABLE2_IMPL(classname, m_ret_type, m_name, m_type1, m_type2, \ ! v_ret_type, v_type1, v_type2) \ { \ std::string func_name = #m_name; \ --- 1136,1149 ---- * @param classname the name of the mock class to which the method belongs * @param m_ret_type the data type of the return value ! * @param m_name the extended method name * @param m_type1 the data type of the 1. method parameter * @param m_type2 the data type of the 2. method parameter * @param v_ret_type the data type of the internal return value respesentation + * @param a_name the actual method name * @param v_type1 the data type of the internal variable of 1. parameter * @param v_type2 the data type of the internal variable of 2. parameter */ #define MOCKPP_VISITABLE2_IMPL(classname, m_ret_type, m_name, m_type1, m_type2, \ ! v_ret_type, a_name, v_type1, v_type2) \ { \ std::string func_name = #m_name; \ *************** *** 1176,1181 **** } \ \ ! m_ret_type m_name(const mockpp::ConstraintHolder<v_type1> ¶m1, \ ! const mockpp::ConstraintHolder<v_type2> ¶m2) \ { \ addExpectedMethod(std::string(#m_name)); \ --- 1183,1188 ---- } \ \ ! m_ret_type a_name(const mockpp::ConstraintHolder<v_type1> ¶m1, \ ! const mockpp::ConstraintHolder<v_type2> ¶m2) /* @todo const? */ \ { \ addExpectedMethod(std::string(#m_name)); \ *************** *** 1199,1207 **** * @param classname the name of the mock class to which the method belongs * @param m_ret_type the data type of the return value ! * @param m_name the method name * @param m_type1 the data type of the 1. method parameter * @param m_type2 the data type of the 2. method parameter * @param m_type3 the data type of the 3. method parameter * @param v_ret_type the data type of the internal return value respesentation * @param v_type1 the data type of the internal variable of 1. parameter * @param v_type2 the data type of the internal variable of 2. parameter --- 1206,1215 ---- * @param classname the name of the mock class to which the method belongs * @param m_ret_type the data type of the return value ! * @param m_name the extended method name * @param m_type1 the data type of the 1. method parameter * @param m_type2 the data type of the 2. method parameter * @param m_type3 the data type of the 3. method parameter * @param v_ret_type the data type of the internal return value respesentation + * @param a_name the actual method name * @param v_type1 the data type of the internal variable of 1. parameter * @param v_type2 the data type of the internal variable of 2. parameter *************** *** 1209,1213 **** */ #define MOCKPP_VISITABLE3_IMPL(classname, m_ret_type, m_name, m_type1, m_type2, m_type3, \ ! v_ret_type, v_type1, v_type2, v_type3) \ { \ std::string func_name = #m_name; \ --- 1217,1221 ---- */ #define MOCKPP_VISITABLE3_IMPL(classname, m_ret_type, m_name, m_type1, m_type2, m_type3, \ ! v_ret_type, a_name, v_type1, v_type2, v_type3) \ { \ std::string func_name = #m_name; \ *************** *** 1250,1256 **** } \ \ ! m_ret_type m_name(const mockpp::ConstraintHolder<v_type1> ¶m1, \ const mockpp::ConstraintHolder<v_type2> ¶m2, \ ! const mockpp::ConstraintHolder<v_type3> ¶m3) \ { \ addExpectedMethod(std::string(#m_name)); \ --- 1258,1264 ---- } \ \ ! m_ret_type a_name(const mockpp::ConstraintHolder<v_type1> ¶m1, \ const mockpp::ConstraintHolder<v_type2> ¶m2, \ ! const mockpp::ConstraintHolder<v_type3> ¶m3) /* @todo const? */ \ { \ addExpectedMethod(std::string(#m_name)); \ *************** *** 1275,1279 **** * @param classname the name of the mock class to which the method belongs * @param m_ret_type the data type of the return value ! * @param m_name the method name * @param m_type1 the data type of the 1. method parameter * @param m_type2 the data type of the 2. method parameter --- 1283,1287 ---- * @param classname the name of the mock class to which the method belongs * @param m_ret_type the data type of the return value ! * @param m_name the extended method name * @param m_type1 the data type of the 1. method parameter * @param m_type2 the data type of the 2. method parameter *************** *** 1281,1284 **** --- 1289,1293 ---- * @param m_type4 the data type of the 4. method parameter * @param v_ret_type the data type of the internal return value respesentation + * @param a_name the actual method name * @param v_type1 the data type of the internal variable of 1. parameter * @param v_type2 the data type of the internal variable of 2. parameter *************** *** 1287,1291 **** */ #define MOCKPP_VISITABLE4_IMPL(classname, m_ret_type, m_name, m_type1, m_type2, m_type3, m_type4, \ ! v_ret_type, v_type1, v_type2, v_type3, v_type4) \ { \ std::string func_name = #m_name; \ --- 1296,1300 ---- */ #define MOCKPP_VISITABLE4_IMPL(classname, m_ret_type, m_name, m_type1, m_type2, m_type3, m_type4, \ ! v_ret_type, a_name, v_type1, v_type2, v_type3, v_type4) \ { \ std::string func_name = #m_name; \ *************** *** 1331,1338 **** } \ \ ! m_ret_type m_name(const mockpp::ConstraintHolder<v_type1> ¶m1, \ const mockpp::ConstraintHolder<v_type2> ¶m2, \ const mockpp::ConstraintHolder<v_type3> ¶m3, \ ! const mockpp::ConstraintHolder<v_type4> ¶m4) \ { \ addExpectedMethod(std::string(#m_name)); \ --- 1340,1347 ---- } \ \ ! m_ret_type a_name(const mockpp::ConstraintHolder<v_type1> ¶m1, \ const mockpp::ConstraintHolder<v_type2> ¶m2, \ const mockpp::ConstraintHolder<v_type3> ¶m3, \ ! const mockpp::ConstraintHolder<v_type4> ¶m4) /* @todo const? */ \ { \ addExpectedMethod(std::string(#m_name)); \ *************** *** 1359,1363 **** * @param classname the name of the mock class to which the method belongs * @param m_ret_type the data type of the return value ! * @param m_name the method name * @param m_type1 the data type of the 1. method parameter * @param m_type2 the data type of the 2. method parameter --- 1368,1372 ---- * @param classname the name of the mock class to which the method belongs * @param m_ret_type the data type of the return value ! * @param m_name the extended method name * @param m_type1 the data type of the 1. method parameter * @param m_type2 the data type of the 2. method parameter *************** *** 1366,1369 **** --- 1375,1379 ---- * @param m_type5 the data type of the 5. method parameter * @param v_ret_type the data type of the internal return value respesentation + * @param a_name the actual method name * @param v_type1 the data type of the internal variable of 1. parameter * @param v_type2 the data type of the internal variable of 2. parameter *************** *** 1373,1377 **** */ #define MOCKPP_VISITABLE5_IMPL(classname, m_ret_type, m_name, m_type1, m_type2, m_type3, m_type4, m_type5, \ ! v_ret_type, v_type1, v_type2, v_type3, v_type4, v_type5) \ { \ std::string func_name = #m_name; \ --- 1383,1387 ---- */ #define MOCKPP_VISITABLE5_IMPL(classname, m_ret_type, m_name, m_type1, m_type2, m_type3, m_type4, m_type5, \ ! v_ret_type, a_name, v_type1, v_type2, v_type3, v_type4, v_type5) \ { \ std::string func_name = #m_name; \ *************** *** 1420,1428 **** } \ \ ! m_ret_type m_name(const mockpp::ConstraintHolder<v_type1> ¶m1, \ const mockpp::ConstraintHolder<v_type2> ¶m2, \ const mockpp::ConstraintHolder<v_type3> ¶m3, \ const mockpp::ConstraintHolder<v_type4> ¶m4, \ ! const mockpp::ConstraintHolder<v_type5> ¶m5) \ { \ addExpectedMethod(std::string(#m_name)); \ --- 1430,1438 ---- } \ \ ! m_ret_type a_name(const mockpp::ConstraintHolder<v_type1> ¶m1, \ const mockpp::ConstraintHolder<v_type2> ¶m2, \ const mockpp::ConstraintHolder<v_type3> ¶m3, \ const mockpp::ConstraintHolder<v_type4> ¶m4, \ ! const mockpp::ConstraintHolder<v_type5> ¶m5) /* @todo const? */ \ { \ addExpectedMethod(std::string(#m_name)); \ |
From: Ewald A. <ewa...@us...> - 2005-03-03 23:32:39
|
Update of /cvsroot/mockpp/mockpp/mockpp/chaining In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23722/mockpp/chaining Modified Files: ChainingMockObjectSupport.cpp ChainingMockObjectSupport.h Log Message: new matcher class Index: ChainingMockObjectSupport.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/ChainingMockObjectSupport.h,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** ChainingMockObjectSupport.h 1 Mar 2005 19:35:58 -0000 1.17 --- ChainingMockObjectSupport.h 3 Mar 2005 23:32:26 -0000 1.18 *************** *** 351,354 **** --- 351,362 ---- + /** Creates a stub returning a void stub + * @ingroup grp_stub_abbrev + * @see mockpp::VoidStub + * @return the new stub + */ + TypelessStub<void>::AP isVoid( ); + + /** Creates a stub throwing a value * @ingroup grp_stub_abbrev *************** *** 565,568 **** --- 573,584 ---- + /** Creates a matcher to verify an arbitrary invocation count. + * @ingroup grp_matcher_abbrev + * @see mockpp::UnlimitedMatcher + * @return the new matcher + */ + AutoPointer<TypelessMatcher> unlimited(); + + /** Creates a matcher to verify a maximal invocation count. * @ingroup grp_matcher_abbrev *************** *** 638,641 **** --- 654,659 ---- using mockpp::exactly; using mockpp::never; + using mockpp::isVoid; + using mockpp::unlimited; #endif Index: ChainingMockObjectSupport.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/ChainingMockObjectSupport.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ChainingMockObjectSupport.cpp 31 Dec 2004 12:34:09 -0000 1.4 --- ChainingMockObjectSupport.cpp 3 Mar 2005 23:32:23 -0000 1.5 *************** *** 41,44 **** --- 41,45 ---- #include <mockpp/matcher/InvokeAtMostMatcher.h> #include <mockpp/matcher/InvokeCountMatcher.h> + #include <mockpp/matcher/UnlimitedMatcher.h> #include <mockpp/matcher/TestFailureMatcher.h> *************** *** 71,74 **** --- 72,81 ---- + AutoPointer<TypelessMatcher> MOCKPP_EXPORT unlimited() + { + return new UnlimitedMatcher(); + } + + AutoPointer<TypelessMatcher> MOCKPP_EXPORT exactly( int expectedCount ) { *************** *** 103,105 **** --- 110,117 ---- + MOCKPP_EXPORT TypelessStub<void>::AP isVoid() + { + return new VoidStub; + } + } //namespace mockpp |
From: Ewald A. <ewa...@us...> - 2005-03-03 23:32:39
|
Update of /cvsroot/mockpp/mockpp/mockpp/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23722/mockpp/tests Modified Files: Makefile.am Added Files: UnlimitedMatcher_test.cpp Log Message: new matcher class Index: Makefile.am =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/Makefile.am,v retrieving revision 1.63 retrieving revision 1.64 diff -C2 -d -r1.63 -r1.64 *** Makefile.am 27 Feb 2005 11:48:16 -0000 1.63 --- Makefile.am 3 Mar 2005 23:32:27 -0000 1.64 *************** *** 67,71 **** 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 jmock_test_count: --- 67,71 ---- 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 jmock_test_count: --- NEW FILE: UnlimitedMatcher_test.cpp --- /*************************************************************************** UnlimitedMatcher_test.cpp - unit tests for UnlimitedMatcher class ------------------- begin : Sat Aug 27 2004 copyright : (C) 2002-2005 by Ewald Arnold email : mockpp at ewald-arnold dot de $Id: UnlimitedMatcher_test.cpp,v 1.1 2005/03/03 23:32:27 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/matcher/UnlimitedMatcher.h> #include <cppunit/extensions/HelperMacros.h> class UnlimitedMatcher_test : public CppUnit::TestFixture { public: CPPUNIT_TEST_SUITE( UnlimitedMatcher_test ); CPPUNIT_TEST(test_invoke); CPPUNIT_TEST_SUITE_END(); public: void test_invoke(); }; CPPUNIT_TEST_SUITE_REGISTRATION(UnlimitedMatcher_test); void UnlimitedMatcher_test::test_invoke() { mockpp::UnlimitedMatcher ir; CPPUNIT_ASSERT(ir.matches() == true); CPPUNIT_ASSERT(ir.hasBeenInvoked() == false); CPPUNIT_ASSERT(ir.getInvocationCount() == 0); mockpp::String s = MOCKPP_PCHAR("hallo"); CPPUNIT_ASSERT(ir.describeTo(s).find(MOCKPP_PCHAR("unlimited invocations")) != mockpp::String::npos); CPPUNIT_ASSERT(s.find(MOCKPP_PCHAR("unlimited invocations")) != mockpp::String::npos); ir.incInvoked(); CPPUNIT_ASSERT(ir.hasBeenInvoked() == true); CPPUNIT_ASSERT(ir.getInvocationCount() == 1); CPPUNIT_ASSERT(ir.matches() == true); s = MOCKPP_PCHAR("hallo"); CPPUNIT_ASSERT(ir.describeTo(s).find(MOCKPP_PCHAR("unlimited invocations")) != mockpp::String::npos); CPPUNIT_ASSERT(s.find(MOCKPP_PCHAR("unlimited invocations")) != mockpp::String::npos); CPPUNIT_ASSERT(s.find(MOCKPP_PCHAR("hallo")) != mockpp::String::npos); CPPUNIT_ASSERT(s.find(MOCKPP_PCHAR("has been")) != mockpp::String::npos); } #endif // HAVE_CPPUNIT |
From: Ewald A. <ewa...@us...> - 2005-03-03 23:32:39
|
Update of /cvsroot/mockpp/mockpp/mockpp/matcher In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23722/mockpp/matcher Modified Files: Makefile.am Added Files: UnlimitedMatcher.cpp UnlimitedMatcher.h Log Message: new matcher class --- NEW FILE: UnlimitedMatcher.h --- /** @file @brief Matches always $Id: UnlimitedMatcher.h,v 1.1 2005/03/03 23:32:26 ewald-arnold Exp $ ***************************************************************************/ /************************************************************************** begin : Thu Aug 26 2004 copyright : (C) 2002-2005 by Ewald Arnold email : mockpp at ewald-arnold dot de 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. * * Original Java Sources: Copyright (c) 2000-2004, jMock.org * **/ #ifndef MOCKPP_UnlimitedMATCHER_H #define MOCKPP_UnlimitedMATCHER_H #include <mockpp/mockpp.h> // always first #include <mockpp/matcher/InvokedRecorder.h> namespace mockpp { /** Mtches any invcotion * @ingroup grp_matcher * @see mockpp::unlimited */ class UnlimitedMatcher : public InvokedRecorder { public: /** Verifies always. */ virtual void verify(); /** Does the object provide meaningful description via describeTo() ?. * @return true: description is available */ virtual bool hasDescription(); /** Checks if an invocation matches the expectaton * @return always true */ virtual bool matches( ); /** 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; }; } // namespace mockpp #endif // MOCKPP_UnlimitedMATCHER_H Index: Makefile.am =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/matcher/Makefile.am,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Makefile.am 3 Mar 2005 15:51:00 -0000 1.11 --- Makefile.am 3 Mar 2005 23:32:26 -0000 1.12 *************** *** 13,17 **** libmatcher_la_SOURCES = InvokeAtLeastMatcher.cpp InvokeAtMostMatcher.cpp \ InvokeCountMatcher.cpp InvokedRecorder.cpp InvokeOnceMatcher.cpp TestFailureMatcher.cpp \ ! TypelessMatcher.cpp InvokeAtLeastOnceMatcher.cpp CLEANFILES = *.~* *.~~* *~ *.old --- 13,17 ---- libmatcher_la_SOURCES = InvokeAtLeastMatcher.cpp InvokeAtMostMatcher.cpp \ InvokeCountMatcher.cpp InvokedRecorder.cpp InvokeOnceMatcher.cpp TestFailureMatcher.cpp \ ! TypelessMatcher.cpp InvokeAtLeastOnceMatcher.cpp UnlimitedMatcher.cpp CLEANFILES = *.~* *.~~* *~ *.old --- NEW FILE: UnlimitedMatcher.cpp --- /** @file @brief Matches always $Id: UnlimitedMatcher.cpp,v 1.1 2005/03/03 23:32:26 ewald-arnold Exp $ ***************************************************************************/ /************************************************************************** begin : Thu Aug 26 2004 copyright : (C) 2002-2005 by Ewald Arnold email : mockpp at ewald-arnold dot de 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. * * Original Java Sources: Copyright (c) 2000-2004, jMock.org * **/ #include <mockpp/mockpp.h> // always first #include <mockpp/matcher/UnlimitedMatcher.h> namespace mockpp { void MOCKPP_EXPORT UnlimitedMatcher::verify() { // verifies always } bool MOCKPP_EXPORT UnlimitedMatcher::hasDescription() { return true; } bool MOCKPP_EXPORT UnlimitedMatcher::matches( ) { return true; } String MOCKPP_EXPORT UnlimitedMatcher::describeTo( String &buffer ) const { buffer += MOCKPP_PCHAR("expected unlimited invocations"); if (hasBeenInvoked()) { buffer += MOCKPP_PCHAR(" and has been invoked"); } return buffer; } } // namespace mockpp |
From: Ewald A. <ewa...@us...> - 2005-03-03 23:31:47
|
Update of /cvsroot/mockpp/mockpp/bcbX In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23302/bcbX Modified Files: mockpp.cbx Log Message: added new sources Index: mockpp.cbx =================================================================== RCS file: /cvsroot/mockpp/mockpp/bcbX/mockpp.cbx,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** mockpp.cbx 1 Mar 2005 19:35:08 -0000 1.9 --- mockpp.cbx 3 Mar 2005 23:31:06 -0000 1.10 *************** *** 60,64 **** <property category="buildorder" name="node.8" value="35"/> <property category="buildorder" name="node.9" value="9"/> ! <property category="cbproject" name="lastnodeid" value="68"/> <property category="cbproject" name="version" value="X.1.0"/> <property category="classbrowser" name="enable" value="1"/> --- 60,64 ---- <property category="buildorder" name="node.8" value="35"/> <property category="buildorder" name="node.9" value="9"/> ! <property category="cbproject" name="lastnodeid" value="74"/> <property category="cbproject" name="version" value="X.1.0"/> <property category="classbrowser" name="enable" value="1"/> *************** *** 91,95 **** <property category="runtime" name="DefaultConfiguration" value="-1"/> <property category="runtime" name="ExcludeDefaultForZero" value="1"/> ! <property category="unique" name="id" value="68"/> <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"/> --- 91,95 ---- <property category="runtime" name="DefaultConfiguration" value="-1"/> <property category="runtime" name="ExcludeDefaultForZero" value="1"/> ! <property category="unique" name="id" value="74"/> <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"/> *************** *** 251,254 **** --- 251,257 ---- <property category="unique" name="id" value="53"/> </file> + <file path="../mockpp/matcher/InvokeAtLeastOnceMatcher.cpp"> + <property category="unique" name="id" value="69"/> + </file> <file path="../mockpp/matcher/InvokeAtMostMatcher.cpp"> <property category="unique" name="id" value="49"/> *************** *** 296,299 **** --- 299,305 ---- <property category="unique" name="id" value="41"/> </file> + <file path="../mockpp/matcher/UnlimitedMatcher.cpp"> + <property category="unique" name="id" value="73"/> + </file> <file path="../mockpp/Verifiable.cpp"> <property category="unique" name="id" value="11"/> *************** *** 308,310 **** --- 314,319 ---- <property category="unique" name="id" value="13"/> </file> + <file path="../mockpp/stub/VoidStub.cpp"> + <property category="unique" name="id" value="71"/> + </file> </project> |