mockpp-commits Mailing List for Mock Objects for C++ (Page 22)
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-11-19 19:14:37
|
Update of /cvsroot/mockpp/mockpp/mockpp/docs/en In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8925/mockpp/docs/en Modified Files: appendix.docbook dev_advanced_intro.docbook dev_production.docbook Log Message: cleanup docs Index: dev_advanced_intro.docbook =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/docs/en/dev_advanced_intro.docbook,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- dev_advanced_intro.docbook 19 Nov 2005 14:15:07 -0000 1.7 +++ dev_advanced_intro.docbook 19 Nov 2005 19:14:29 -0000 1.8 @@ -39,11 +39,11 @@ class MyMockObject : public MyInterface <co id="adv-intro-class-co" linkends="adv-intro-class" /> { - mockpp::ExpectationList<unsigned> methParams; + ExpectationList<unsigned> methParams; public: - MyMockObject(mockpp::String name, Verifiable *v) + MyMockObject(String name, Verifiable *v) : MockObject(name, v) , methParams("method parameters", this) { @@ -181,13 +181,13 @@ <programlisting> - mockpp::VisitableMockMethod0<void> mmv0(MOCKPP_PCHAR("mm0"), 0); - mockpp::VisitableMockMethod1<void, int> mmv1(MOCKPP_PCHAR("mm1"), 0); - mockpp::VisitableMockMethod2<void, int, int> mmv2(MOCKPP_PCHAR("mm2"), 0); + VisitableMockMethod0<void> mmv0(MOCKPP_PCHAR("mm0"), 0); + VisitableMockMethod1<void, int> mmv1(MOCKPP_PCHAR("mm1"), 0); + VisitableMockMethod2<void, int, int> mmv2(MOCKPP_PCHAR("mm2"), 0); - mockpp::VisitableMockMethod<void> mmvd0(MOCKPP_PCHAR("mm0"), 0); - mockpp::VisitableMockMethod<void, int> mmvd1(MOCKPP_PCHAR("mm1"), 0); - mockpp::VisitableMockMethod<void, int, int> mmvd2(MOCKPP_PCHAR("mm2"), 0); + VisitableMockMethod<void> mmvd0(MOCKPP_PCHAR("mm0"), 0); + VisitableMockMethod<void, int> mmvd1(MOCKPP_PCHAR("mm1"), 0); + VisitableMockMethod<void, int, int> mmvd2(MOCKPP_PCHAR("mm2"), 0); </programlisting> </para> Index: appendix.docbook =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/docs/en/appendix.docbook,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- appendix.docbook 21 May 2005 14:17:50 -0000 1.10 +++ appendix.docbook 19 Nov 2005 19:14:29 -0000 1.11 @@ -123,6 +123,30 @@ </sect2> +<sect2 id="installing-cygwin"> +<title>Installing on systems using Cygwin</title> + +<para>There have been reports about problemx to compile and link +with cppunit on Windows system under Cygwin. A solution might be to be to link +statically. First compile &cppunit; (and possibly force installation with -k): +</para> + +<screen width="40"> + <prompt>%</prompt> <userinput>./configure --disable-shared</userinput> + <prompt>%</prompt> <userinput>make check</userinput> + <prompt>%</prompt> <userinput>make -k install</userinput> +</screen> + +<para>Then install &mockpp;:</para> + +<screen width="40"> + <prompt>%</prompt> <userinput>./configure --disable-shared</userinput> + <prompt>%</prompt> <userinput>make check</userinput> + <prompt>%</prompt> <userinput>make install</userinput> +</screen> + +</sect2> + </sect1> </appendix> Index: dev_production.docbook =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/docs/en/dev_production.docbook,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- dev_production.docbook 21 May 2005 14:17:50 -0000 1.4 +++ dev_production.docbook 19 Nov 2005 19:14:29 -0000 1.5 @@ -34,14 +34,14 @@ have to create your own code similar to this example. See the sources and documentation about <classname>RealTimeServer</classname> and <classname>MockTimeServer</classname>.<programlisting>// prototype for the method under test: -void myTimedMethod(mockpp::TimeServer *time); +void myTimedMethod(TimeServer *time); // in production code: -mockpp::RealTimeServer rt_server; +RealTimeServer rt_server; myTimedMethod(&rt_server); // in test code: -mockpp::MockTimeServer mock_server; +MockTimeServer mock_server; mock_server.addUnixTime(0x123456); myTimedMethod(&mock_server); </programlisting></para> @@ -127,7 +127,7 @@ class DerivedSample : public Sample { private: - + virtual Complicated *getVariable() { return &mock; |
From: Ewald A. <ewa...@us...> - 2005-11-19 19:14:20
|
Update of /cvsroot/mockpp/mockpp/mockpp/examples/tutorial In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8873/mockpp/examples/tutorial Modified Files: tut-basic.dox tut-chain.dox tut-chain2.dox tut-poor-se.dox tut-visit.dox tut-visit2.dox Log Message: cleanup docs Index: tut-chain.dox =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/examples/tutorial/tut-chain.dox,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- tut-chain.dox 18 Nov 2005 10:58:55 -0000 1.10 +++ tut-chain.dox 19 Nov 2005 19:14:11 -0000 1.11 @@ -27,12 +27,12 @@ using mockpp::throwException; \endcode -A more convenient way is to place a \c \#define before including the mockpp headers +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> +#define MOCKPP_IMPORT_ABBREVIATED +#include <mockpp/chaining/ChainingMockObjectSupport.h> \endcode The next solution of the know testing problem @@ -47,12 +47,12 @@ \code class ChainMock : public Interface - , public mockpp::ChainableMockObject + , public ChainableMockObject { public: ChainMock() - : mockpp::ChainableMockObject(MOCKPP_PCHAR("ChainMock"), 0) + : ChainableMockObject("ChainMock", 0) , MOCKPP_CONSTRUCT_MEMBERS_FOR_VOID_CHAINABLE_EXT1(open, ext) , MOCKPP_CONSTRUCT_MEMBERS_FOR_CHAINABLE0(read) , MOCKPP_CONSTRUCT_MEMBERS_FOR_VOID_CHAINABLE_EXT1(write, ext) Index: tut-poor-se.dox =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/examples/tutorial/tut-poor-se.dox,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- tut-poor-se.dox 19 Feb 2005 14:36:57 -0000 1.2 +++ tut-poor-se.dox 19 Nov 2005 19:14:11 -0000 1.3 @@ -20,24 +20,24 @@ \code class PoorMockSecondEdition : public Interface - , public mockpp::MockObject + , public MockObject { - mockpp::TrackingCounterMaster counter; + TrackingCounterMaster counter; public: - mockpp::TrackingCounterClient open_counter; - mockpp::TrackingCounterClient read_counter; - mockpp::TrackingCounterClient write_counter; - mockpp::TrackingCounterClient close_counter; + TrackingCounterClient open_counter; + TrackingCounterClient read_counter; + TrackingCounterClient write_counter; + TrackingCounterClient close_counter; PoorMockSecondEdition() - : mockpp::MockObject(MOCKPP_PCHAR("MockObject")) - , counter(MOCKPP_PCHAR("counter"), this) - , open_counter(MOCKPP_PCHAR("open_counter"), counter) - , read_counter(MOCKPP_PCHAR("read_counter"), counter) - , write_counter(MOCKPP_PCHAR("write_counter"), counter) - , close_counter(MOCKPP_PCHAR("close_counter"), counter) + : MockObject("MockObject") + , counter("counter", this) + , open_counter("open_counter", counter) + , read_counter("read_counter", counter) + , write_counter("write_counter", counter) + , close_counter("close_counter", counter) { } \endcode Index: tut-visit2.dox =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/examples/tutorial/tut-visit2.dox,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- tut-visit2.dox 18 Nov 2005 18:07:38 -0000 1.3 +++ tut-visit2.dox 19 Nov 2005 19:14:11 -0000 1.4 @@ -43,12 +43,12 @@ public: VisitMock() - : VisitableMockObject(MOCKPP_PCHAR("VisitMock"), 0) - , open_mocker(MOCKPP_PCHAR("open"), this) - , read_mocker(MOCKPP_PCHAR("read"), this) - , write_mocker(MOCKPP_PCHAR("write"), this) - , close_mocker(MOCKPP_PCHAR("close"), this) - , calculate_mocker(MOCKPP_PCHAR("calculate"), this) + : VisitableMockObject("VisitMock", 0) + , open_mocker("open", this) + , read_mocker("read", this) + , write_mocker("write", this) + , close_mocker("close", this) + , calculate_mocker("calculate", this) {} \endcode Index: tut-visit.dox =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/examples/tutorial/tut-visit.dox,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- tut-visit.dox 18 Nov 2005 10:58:55 -0000 1.9 +++ tut-visit.dox 19 Nov 2005 19:14:11 -0000 1.10 @@ -21,7 +21,7 @@ or by <em>visting</em> the mock object. First the a container mock object must be implemeneted. Similar to the first solution -is must inherit from \c Interface and from \c mockpp::VisitableMockObject . +is must inherit from \c Interface and from \c VisitableMockObject . All the functionality is hidden in internal variables and helper methods. There is a set of variables for each method which must be initialized in the constructor. This work is done with a macro. The macro name depends on the type of method and the number of @@ -30,12 +30,12 @@ \code class VisitMock : public Interface - , public mockpp::VisitableMockObject + , public VisitableMockObject { public: VisitMock() - : mockpp::VisitableMockObject("VisitMock", 0) + : VisitableMockObject("VisitMock", 0) , MOCKPP_CONSTRUCT_MEMBERS_FOR_VOID_VISITABLE_EXT1(open, ext) , MOCKPP_CONSTRUCT_MEMBERS_FOR_VISITABLE0(read) , MOCKPP_CONSTRUCT_MEMBERS_FOR_VOID_VISITABLE_EXT1(write, ext) @@ -135,7 +135,7 @@ Another rather common problem is the simulation of runtime errors. Such errors happen usually when you don't expect them but you hardly can reproduce them. To address such -testing problems you might use a \c mockpp::Throwable . The following code could +testing problems you might use a \c Throwable . The following code could be used to emulate a method that returns bytes from a network connection. The first 10 calls return 0, but the next call throws a \c NetworkError . All the following calls return 1. @@ -146,7 +146,7 @@ MOCKPP_CONTROLLER_FOR(VisitMock, network_read) read_controller (&mock); read_controller.addReturnValue(0, 10); - read_controller.addThrowable(mockpp::make_throwable(NetworkError())); + read_controller.addThrowable(make_throwable(NetworkError())); read_controller.setDefaultValue(1); \endcode @@ -157,7 +157,7 @@ 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. +\c IsCloseTo which allows a delta value. \code mock.calculate(eq<unsigned>(5,5)); Index: tut-basic.dox =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/examples/tutorial/tut-basic.dox,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- tut-basic.dox 4 Mar 2005 23:37:00 -0000 1.3 +++ tut-basic.dox 19 Nov 2005 19:14:11 -0000 1.4 @@ -17,11 +17,11 @@ The first solution will use basic mock objects to express the needed expectations. Additionally there is a container object to hold and verify all those tiny mock objects. The container must inherit from the \c Interface class as well as -from the root of all more advanced mock objects \c mockpp::MockObject : +from the root of all more advanced mock objects \c MockObject : \code class BasicMock : public Interface - , public mockpp::MockObject + , public MockObject { public: \endcode @@ -35,7 +35,7 @@ \code BasicMock() - : mockpp::MockObject("BasicMock", 0) + : MockObject("BasicMock", 0) , open_name("BasicMock/open_name", this) , close_counter("BasicMock/close_counter", this) , write_data("BasicMock/write_data", this) @@ -48,13 +48,13 @@ Depending on your personal taste you can simply use public member variables or hide them and offer getter and setter methods. -To verify the calls to \c open() a \c mockpp::ExpectationList is used. This way +To verify the calls to \c open() a \c ExpectationList is used. This way all the actual values are checked against the expectations one after the other. As a side effect the total number of calls to \c open() is verified since the count of actual and expected values have to be equal. \code - mockpp::ExpectationList<std::string> open_name; + ExpectationList<std::string> open_name; virtual void open(const std::string &name) { @@ -63,12 +63,12 @@ \endcode The implementation of method \c read() needs a different approach. To return -a predefined set of values an object of type \c mockpp::ReturnObjectList is +a predefined set of values an object of type \c ReturnObjectList is used. And again the additional benefit is the fact that the total number of calls must equal the number of return values. \code - mockpp::ReturnObjectList<std::string> read_data; + ReturnObjectList<std::string> read_data; virtual std::string read() { @@ -78,10 +78,10 @@ A third alternative is chosen to to verify the correct number of calls to \c close(). Since there are no parameters or return values the only -possibility is to take \c mockpp::ExpectationCounter . +possibility is to take \c ExpectationCounter . \code - mockpp::ExpectationCounter close_counter; + ExpectationCounter close_counter; virtual void close() { @@ -106,7 +106,7 @@ \endcode Next you have to provide the appropriate number of return values for the \c read() method. -They are added in the expected order to the \c mockpp::ReturnObjectList : +They are added in the expected order to the \c ReturnObjectList : \code mock.read_data.addObjectToReturn("record-1"); @@ -115,8 +115,8 @@ \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. +can't be determined exactly a \c ConstraintList is used which verifies similar to +a ExpectationList but on the base of a mean amount and a delta value. \code mock.calculate_input.addExpected(eq<unsigned>(5,5)); @@ -125,7 +125,7 @@ \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: +the according \c ExpectationCounter is set to 2: \code mock.close_counter.setExpected(2); Index: tut-chain2.dox =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/examples/tutorial/tut-chain2.dox,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- tut-chain2.dox 18 Nov 2005 18:07:38 -0000 1.3 +++ tut-chain2.dox 19 Nov 2005 19:14:11 -0000 1.4 @@ -31,12 +31,12 @@ public: ChainMock() - : ChainableMockObject(MOCKPP_PCHAR("ChainMock"), 0) - , open_mocker(MOCKPP_PCHAR("open"), this) - , read_mocker(MOCKPP_PCHAR("read"), this) - , write_mocker(MOCKPP_PCHAR("write"), this) - , close_mocker(MOCKPP_PCHAR("close"), this) - , calculate_mocker(MOCKPP_PCHAR("calculate"), this) + : ChainableMockObject("ChainMock", 0) + , open_mocker("open", this) + , read_mocker("read", this) + , write_mocker("write", this) + , close_mocker("close", this) + , calculate_mocker("calculate", this) {} void open(const std::string &filename) |
From: Ewald A. <ewa...@us...> - 2005-11-19 17:35:35
|
Update of /cvsroot/mockpp/mockpp/bcb5 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14652 Modified Files: Makefile.am run.bat Log Message: added batch files Index: run.bat =================================================================== RCS file: /cvsroot/mockpp/mockpp/bcb5/run.bat,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- run.bat 19 Nov 2005 14:16:38 -0000 1.1 +++ run.bat 19 Nov 2005 17:35:27 -0000 1.2 @@ -1,6 +1,6 @@ c:\tmp\compile\mock_test_34.exe pause -c:\tmp\compile\readability_34.exe +c:\tmp\compile\readability_test_34.exe pause c:\tmp\compile\jmock_test_34.exe pause @@ -18,7 +18,7 @@ pause c:\tmp\compile\poormock_34.exe pause -c:\tmp\compile\poormock-se_34.exe +c:\tmp\compile\poormock_se_34.exe pause c:\tmp\compile\verifying_34.exe pause Index: Makefile.am =================================================================== RCS file: /cvsroot/mockpp/mockpp/bcb5/Makefile.am,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- Makefile.am 18 Nov 2005 20:30:27 -0000 1.12 +++ Makefile.am 19 Nov 2005 17:35:27 -0000 1.13 @@ -4,6 +4,8 @@ EXTRA_DIST = \ gen-mak.bat \ + run.bat \ + compile.bat \ mockpp.bpg \ mockpp_production.bpr \ mockpp_production.bpf \ |
Update of /cvsroot/mockpp/mockpp/bcb5 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6085/bcb5 Modified Files: basicmock.bpf basicmock.bpr chainmock.bpf chainmock.bpr chainmock2.bpf chainmock2.bpr mock_greeter.bpf mock_greeter.bpr mockpp_production.bpr poormock-se.bpf poormock-se.bpr poormock.bpf poormock.bpr readability.bpf readability.bpr verifying.bpf verifying.bpr visitmock.bpf visitmock.bpr visitmock2.bpf visitmock2.bpr Added Files: compile.bat run.bat Log Message: fixes for bcb5 Index: visitmock2.bpr =================================================================== RCS file: /cvsroot/mockpp/mockpp/bcb5/visitmock2.bpr,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- visitmock2.bpr 18 Nov 2005 20:30:27 -0000 1.1 +++ visitmock2.bpr 19 Nov 2005 14:16:38 -0000 1.2 @@ -4,17 +4,17 @@ <MACROS> <VERSION value="BCB.05.03"/> <PROJECT value="c:\tmp\compile\visitmock2_34.exe"/> - <OBJFILES value="c:\tmp\compile\mockpp_34\\visitmock2.obj + <OBJFILES value="c:\tmp\compile\mockpp_34\\visitmock2.obj c:\tmp\compile\mockpp_34\\consumer.obj"/> <RESFILES value=""/> <DEFFILE value=""/> <RESDEPEN value="$(RESFILES)"/> - <LIBFILES value="c:\tmp\compile\mockpp_34.lib c:\tmp\compile\cppunit_1_10.lib"/> + <LIBFILES value="c:\tmp\compile\mockpp_34.lib c:\tmp\compile\cppunit_1_10_bcb5.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\examples\tutorial"/> <PATHPAS value=".;"/> @@ -32,7 +32,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_34\" -N0"c:\tmp\compile\mockpp_34\" -$YD -$W + <PFLAGS value="-N2"c:\tmp\compile\mockpp_34\" -N0"c:\tmp\compile\mockpp_34\" -$YD -$W -$O- -v -JPHNE -M"/> <RFLAGS value=""/> <AFLAGS value="/mx /w2 /zd"/> Index: visitmock2.bpf =================================================================== RCS file: /cvsroot/mockpp/mockpp/bcb5/visitmock2.bpf,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- visitmock2.bpf 18 Nov 2005 20:30:27 -0000 1.1 +++ visitmock2.bpf 19 Nov 2005 14:16:38 -0000 1.2 @@ -1,5 +1,5 @@ USELIB("c:\tmp\compile\mockpp_34.lib"); -USELIB("c:\tmp\compile\cppunit_1_10.lib"); +USELIB("c:\tmp\compile\cppunit_1_10_bcb5.lib"); USEUNIT("..\mockpp\examples\tutorial\visitmock2.cpp"); USEUNIT("..\mockpp\examples\tutorial\consumer.cpp"); //--------------------------------------------------------------------------- Index: mockpp_production.bpr =================================================================== RCS file: /cvsroot/mockpp/mockpp/bcb5/mockpp_production.bpr,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- mockpp_production.bpr 31 Oct 2005 19:19:52 -0000 1.13 +++ mockpp_production.bpr 19 Nov 2005 14:16:38 -0000 1.14 @@ -25,7 +25,7 @@ <USERDEFINES value="__DLL___;_DEBUG"/> <SYSDEFINES value="NO_STRICT;_NO_VCL;_RTLDLL;USEPACKAGES"/> <MAINSOURCE value="mockpp_production.bpf"/> - <INCLUDEPATH value="..\mockpp\production;..;$(BCB)\include"/> + <INCLUDEPATH value="..\mockpp\production;..\..\mockpp;$(BCB)\include"/> <LIBPATH value="..\mockpp\production;..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_34\matcher;..\mockpp_34\constraint;..\mockpp_34\builder;..\mockpp;..\mockpp_34\chaining;..\mockpp_34\compat;..\mockpp_34\util;..\..\mockpp-1.8.0;$(BCB)\lib\obj;$(BCB)\lib"/> <WARNINGS value="-w8092 -w8091 -w8090 -w8089 -w8087 -wprc -wuse -wucp -wstv -wstu -wpin -wnod -wnak -wdef -wcln -wbbf -wasm -wamp -wamb"/> Index: visitmock.bpr =================================================================== RCS file: /cvsroot/mockpp/mockpp/bcb5/visitmock.bpr,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- visitmock.bpr 31 Oct 2005 19:19:52 -0000 1.20 +++ visitmock.bpr 19 Nov 2005 14:16:38 -0000 1.21 @@ -9,7 +9,7 @@ <RESFILES value=""/> <DEFFILE value=""/> <RESDEPEN value="$(RESFILES)"/> - <LIBFILES value="c:\tmp\compile\mockpp_34.lib c:\tmp\compile\cppunit_1_10.lib"/> + <LIBFILES value="c:\tmp\compile\mockpp_34.lib c:\tmp\compile\cppunit_1_10_bcb5.lib"/> <LIBRARIES value=""/> <SPARELIBS value=""/> <PACKAGES value="VCL50.bpi VCLX50.bpi bcbsmp50.bpi QRPT50.bpi VCLDB50.bpi VCLBDE50.bpi --- NEW FILE: compile.bat --- if exist c:\Programme\Borland\CBuilder5\Bin\make.exe set BCB_BIN=c:\Programme\Borland\CBuilder5\Bin if exist m:\ep\utilit\borland\cbuilder5\bin\make.exe set BCB_BIN=m:\ep\utilit\borland\cbuilder5\bin if exist d:\programme\borland\cbuilder5\bin\make.exe set BCB_BIN=d:\programme\borland\cbuilder5\bin set path=%path%;%BCB_BIN% %BCB_BIN%\make -f mockpp.mak %BCB_BIN%\make -f mock_test.mak %BCB_BIN%\make -f readability.mak %BCB_BIN%\make -f jmock_test.mak %BCB_BIN%\make -f mock_greeter.mak %BCB_BIN%\make -f basicmock.mak %BCB_BIN%\make -f visitmock.mak %BCB_BIN%\make -f visitmock2.mak %BCB_BIN%\make -f chainmock.mak %BCB_BIN%\make -f chainmock2.mak %BCB_BIN%\make -f poormock.mak %BCB_BIN%\make -f poormock-se.mak %BCB_BIN%\make -f verifying.mak %BCB_BIN%\make -f cppunit.mak Index: readability.bpf =================================================================== RCS file: /cvsroot/mockpp/mockpp/bcb5/readability.bpf,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- readability.bpf 31 Oct 2005 19:19:52 -0000 1.6 +++ readability.bpf 19 Nov 2005 14:16:38 -0000 1.7 @@ -1,5 +1,5 @@ USELIB("c:\tmp\compile\mockpp_34.lib"); -USELIB("c:\tmp\compile\cppunit_1_10.lib"); +USELIB("c:\tmp\compile\cppunit_1_10_bcb5.lib"); USEUNIT("..\mockpp\tests\readability_test.cpp"); USEUNIT("..\mockpp\tests\classes_ABCDE.cpp"); //--------------------------------------------------------------------------- Index: visitmock.bpf =================================================================== RCS file: /cvsroot/mockpp/mockpp/bcb5/visitmock.bpf,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- visitmock.bpf 31 Oct 2005 19:19:52 -0000 1.17 +++ visitmock.bpf 19 Nov 2005 14:16:38 -0000 1.18 @@ -1,5 +1,5 @@ USELIB("c:\tmp\compile\mockpp_34.lib"); -USELIB("c:\tmp\compile\cppunit_1_10.lib"); +USELIB("c:\tmp\compile\cppunit_1_10_bcb5.lib"); USEUNIT("..\mockpp\examples\tutorial\visitmock.cpp"); USEUNIT("..\mockpp\examples\tutorial\consumer.cpp"); //--------------------------------------------------------------------------- Index: readability.bpr =================================================================== RCS file: /cvsroot/mockpp/mockpp/bcb5/readability.bpr,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- readability.bpr 1 Nov 2005 08:43:27 -0000 1.9 +++ readability.bpr 19 Nov 2005 14:16:38 -0000 1.10 @@ -9,7 +9,7 @@ <RESFILES value=""/> <DEFFILE value=""/> <RESDEPEN value="$(RESFILES)"/> - <LIBFILES value="c:\tmp\compile\mockpp_34.lib c:\tmp\compile\cppunit_1_10.lib"/> + <LIBFILES value="c:\tmp\compile\mockpp_34.lib c:\tmp\compile\cppunit_1_10_bcb5.lib"/> <LIBRARIES value=""/> <SPARELIBS value=""/> <PACKAGES value="VCL50.bpi VCLX50.bpi bcbsmp50.bpi QRPT50.bpi VCLDB50.bpi VCLBDE50.bpi Index: poormock.bpr =================================================================== RCS file: /cvsroot/mockpp/mockpp/bcb5/poormock.bpr,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- poormock.bpr 31 Oct 2005 19:19:52 -0000 1.21 +++ poormock.bpr 19 Nov 2005 14:16:38 -0000 1.22 @@ -9,7 +9,7 @@ <RESFILES value=""/> <DEFFILE value=""/> <RESDEPEN value="$(RESFILES)"/> - <LIBFILES value="c:\tmp\compile\mockpp_34.lib c:\tmp\compile\cppunit_1_10.lib"/> + <LIBFILES value="c:\tmp\compile\mockpp_34.lib c:\tmp\compile\cppunit_1_10_bcb5.lib"/> <LIBRARIES value=""/> <SPARELIBS value=""/> <PACKAGES value="VCL50.bpi VCLX50.bpi bcbsmp50.bpi QRPT50.bpi VCLDB50.bpi VCLBDE50.bpi Index: verifying.bpr =================================================================== RCS file: /cvsroot/mockpp/mockpp/bcb5/verifying.bpr,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- verifying.bpr 31 Oct 2005 19:19:52 -0000 1.19 +++ verifying.bpr 19 Nov 2005 14:16:38 -0000 1.20 @@ -8,7 +8,7 @@ <RESFILES value=""/> <DEFFILE value=""/> <RESDEPEN value="$(RESFILES)"/> - <LIBFILES value="c:\tmp\compile\mockpp_34.lib c:\tmp\compile\cppunit_1_10.lib"/> + <LIBFILES value="c:\tmp\compile\mockpp_34.lib c:\tmp\compile\cppunit_1_10_bcb5.lib"/> <LIBRARIES value=""/> <SPARELIBS value=""/> <PACKAGES value="VCL50.bpi VCLX50.bpi bcbsmp50.bpi QRPT50.bpi VCLDB50.bpi VCLBDE50.bpi Index: mock_greeter.bpr =================================================================== RCS file: /cvsroot/mockpp/mockpp/bcb5/mock_greeter.bpr,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- mock_greeter.bpr 31 Oct 2005 19:19:52 -0000 1.27 +++ mock_greeter.bpr 19 Nov 2005 14:16:38 -0000 1.28 @@ -8,7 +8,7 @@ <RESFILES value=""/> <DEFFILE value=""/> <RESDEPEN value="$(RESFILES)"/> - <LIBFILES value="c:\tmp\compile\mockpp_34.lib c:\tmp\compile\cppunit_1_10.lib"/> + <LIBFILES value="c:\tmp\compile\mockpp_34.lib c:\tmp\compile\cppunit_1_10_bcb5.lib"/> <LIBRARIES value=""/> <SPARELIBS value=""/> <PACKAGES value="VCL50.bpi VCLX50.bpi bcbsmp50.bpi QRPT50.bpi VCLDB50.bpi VCLBDE50.bpi Index: poormock.bpf =================================================================== RCS file: /cvsroot/mockpp/mockpp/bcb5/poormock.bpf,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- poormock.bpf 31 Oct 2005 19:19:52 -0000 1.17 +++ poormock.bpf 19 Nov 2005 14:16:38 -0000 1.18 @@ -1,5 +1,5 @@ USELIB("c:\tmp\compile\mockpp_34.lib"); -USELIB("c:\tmp\compile\cppunit_1_10.lib"); +USELIB("c:\tmp\compile\cppunit_1_10_bcb5.lib"); USEUNIT("..\mockpp\examples\tutorial\poormock.cpp"); USEUNIT("..\mockpp\examples\tutorial\consumer.cpp"); T//--------------------------------------------------------------------------- Index: verifying.bpf =================================================================== RCS file: /cvsroot/mockpp/mockpp/bcb5/verifying.bpf,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- verifying.bpf 31 Oct 2005 19:19:52 -0000 1.15 +++ verifying.bpf 19 Nov 2005 14:16:38 -0000 1.16 @@ -1,5 +1,5 @@ USELIB("c:\tmp\compile\mockpp_34.lib"); -USELIB("c:\tmp\compile\cppunit_1_10.lib"); +USELIB("c:\tmp\compile\cppunit_1_10_bcb5.lib"); USEUNIT("..\mockpp\examples\tutorial\verifying.cpp"); T//--------------------------------------------------------------------------- his file is used by the project manager only and should be treated like the project file Index: mock_greeter.bpf =================================================================== RCS file: /cvsroot/mockpp/mockpp/bcb5/mock_greeter.bpf,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- mock_greeter.bpf 31 Oct 2005 19:19:52 -0000 1.20 +++ mock_greeter.bpf 19 Nov 2005 14:16:38 -0000 1.21 @@ -1,5 +1,5 @@ USELIB("c:\tmp\compile\mockpp_34.lib"); -USELIB("c:\tmp\compile\cppunit_1_10.lib"); +USELIB("c:\tmp\compile\cppunit_1_10_bcb5.lib"); USEUNIT("..\mockpp\examples\mock_greeter.cpp"); //--------------------------------------------------------------------------- This file is used by the project manager only and should be treated like the project file Index: chainmock.bpf =================================================================== RCS file: /cvsroot/mockpp/mockpp/bcb5/chainmock.bpf,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- chainmock.bpf 31 Oct 2005 19:19:52 -0000 1.17 +++ chainmock.bpf 19 Nov 2005 14:16:38 -0000 1.18 @@ -1,5 +1,5 @@ USELIB("c:\tmp\compile\mockpp_34.lib"); -USELIB("c:\tmp\compile\cppunit_1_10.lib"); +USELIB("c:\tmp\compile\cppunit_1_10_bcb5.lib"); USEUNIT("..\mockpp\examples\tutorial\chainmock.cpp"); USEUNIT("..\mockpp\examples\tutorial\consumer.cpp"); //--------------------------------------------------------------------------- --- NEW FILE: run.bat --- c:\tmp\compile\mock_test_34.exe pause c:\tmp\compile\readability_34.exe pause c:\tmp\compile\jmock_test_34.exe pause c:\tmp\compile\mock_greeter_34.exe pause c:\tmp\compile\basicmock_34.exe pause c:\tmp\compile\visitmock_34.exe pause c:\tmp\compile\visitmock2_34.exe pause c:\tmp\compile\chainmock_34.exe pause c:\tmp\compile\chainmock2_34.exe pause c:\tmp\compile\poormock_34.exe pause c:\tmp\compile\poormock-se_34.exe pause c:\tmp\compile\verifying_34.exe pause c:\tmp\compile\cppunit_34.exe pause Index: poormock-se.bpr =================================================================== RCS file: /cvsroot/mockpp/mockpp/bcb5/poormock-se.bpr,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- poormock-se.bpr 31 Oct 2005 19:19:52 -0000 1.15 +++ poormock-se.bpr 19 Nov 2005 14:16:38 -0000 1.16 @@ -9,7 +9,7 @@ <RESFILES value=""/> <DEFFILE value=""/> <RESDEPEN value="$(RESFILES)"/> - <LIBFILES value="c:\tmp\compile\mockpp_34.lib c:\tmp\compile\cppunit_1_10.lib"/> + <LIBFILES value="c:\tmp\compile\mockpp_34.lib c:\tmp\compile\cppunit_1_10_bcb5.lib"/> <LIBRARIES value=""/> <SPARELIBS value=""/> <PACKAGES value="VCL50.bpi VCLX50.bpi bcbsmp50.bpi QRPT50.bpi VCLDB50.bpi VCLBDE50.bpi Index: basicmock.bpr =================================================================== RCS file: /cvsroot/mockpp/mockpp/bcb5/basicmock.bpr,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- basicmock.bpr 31 Oct 2005 19:19:52 -0000 1.21 +++ basicmock.bpr 19 Nov 2005 14:16:38 -0000 1.22 @@ -9,7 +9,7 @@ <RESFILES value=""/> <DEFFILE value=""/> <RESDEPEN value="$(RESFILES)"/> - <LIBFILES value="c:\tmp\compile\mockpp_34.lib c:\tmp\compile\cppunit_1_10.lib"/> + <LIBFILES value="c:\tmp\compile\mockpp_34.lib c:\tmp\compile\cppunit_1_10_bcb5.lib"/> <LIBRARIES value=""/> <SPARELIBS value=""/> <PACKAGES value="VCL50.bpi VCLX50.bpi bcbsmp50.bpi QRPT50.bpi VCLDB50.bpi VCLBDE50.bpi @@ -26,7 +26,7 @@ <USERDEFINES value="__DLL___"/> <SYSDEFINES value="NO_STRICT;_NO_VCL;_RTLDLL;USEPACKAGES"/> <MAINSOURCE value="basicmock.bpf"/> - <INCLUDEPATH value="..\mockpp\examples\tutorial;..;$(BCB)\include;"g:\data\src\cppunit-1.10.2\include\""/> + <INCLUDEPATH value="..\mockpp\examples\tutorial;..\..\mockpp;$(BCB)\include;"g:\data\src\cppunit-1.10.2\include\""/> <LIBPATH value="..\mockpp\examples\tutorial;..\mockpp_34\examples\tutorial;$(BCB)\lib\obj;$(BCB)\lib"/> <WARNINGS value="-w-par"/> </MACROS> @@ -73,36 +73,36 @@ [HistoryLists\hlIncludePath] Count=30 -Item0=..\mockpp\examples\tutorial;..;$(BCB)\include;g:\data\src\cppunit-1.10.2\include -Item1=..\mockpp\examples\tutorial;..;$(BCB)\include;X:\Documents\src\cppunit-1.10.2\include\ -Item2=..\.;$(BCB)\include;X:\Documents\src\cppunit-1.10.2\include -Item3=..\mockpp\examples\tutorial;..\mockpp_34\examples\tutorial;..\mockpp_34\examples;..\..\mockpp;$(BCB)\include;..\..\..\cppunit-1.10.2\include;..\..\cppunit-1.10\include -Item4=..\mockpp\examples\tutorial;..\mockpp_34\examples\tutorial;..\mockpp_34\examples;..\..\mockpp;$(BCB)\include;..\..\..\cppunit-1.10.2\include -Item5=..\mockpp_34\examples\tutorial;..\mockpp_34\examples;..;$(BCB)\include;..\..\..\cppunit-1.10.2\include -Item6=..\mockpp_34\examples\tutorial;..\mockpp_34\examples;..\mockpp_34\tests;..;$(BCB)\include;..\..\cppunit\include;..\..\..\cppunit-1.8.0\include -Item7=..\mockpp_34\examples;..\mockpp_34\tests;..\..\mockpp;$(BCB)\include;..\..\cppunit\include;..\..\..\cppunit-1.8.0\include -Item8=..\mockpp_34\tests;..;$(BCB)\include;..\..\cppunit\include;X:\src\cppunit-1.8.0\include -Item9=..\mockpp_34\tests;..;$(BCB)\include;..\..\cppunit\include -Item10=..\mockpp_34\tests;..;$(BCB)\include;B:\cvs\ups\src\3party\cppunit\include -Item11=..\mockpp_34\tests;..;$(BCB)\include;..\..\..\cppunit-1.8.0\include -Item12=..;$(BCB)\include;..\..\..\cppunit-1.8.0\include -Item13=..\mockpp_34\tests;\\SONNE\HOMES\src\mockpp_34\mockpp_19\mockpp_34\tests;..\..\mockpp;$(BCB)\include;..\..\..\cppunit-1.8.0\include -Item14=..;$(BCB)\include;X:\src\cppunit-1.8.0\include -Item15=\\SONNE\HOMES\src\mockpp_34\mockpp_19\mockpp_34\tests;..\..\mockpp;..\mockpp_34\tests;..\mockpp;..\expat;$(BCB)\include -Item16=..;..\mockpp_34\tests;..\mockpp;..\expat;$(BCB)\include -Item17=..\..\mockpp;..\mockpp_34\tests;..\mockpp;..\expat;$(BCB)\include -Item18=..\..\mockpp;..\mockpp_34\tests;..\mockpp;..\expat;$(BCB)\include;$(BCB)\include\vcl;C:\wx2\include\ -Item19=.. ;..\mockpp_34\tests;..\mockpp;..\expat;$(BCB)\include;$(BCB)\include\vcl;C:\wx2\include\ -Item20=.. ;..\mockpp_34\tests;..\expat;..\mockpp;$(BCB)\include;$(BCB)\include\vcl;C:\wx2\include -Item21=..\mockpp_34\tests;..\expat;..\mockpp;$(BCB)\include;$(BCB)\include\vcl -Item22=..\mockpp_34\tests;..\mockpp;$(BCB)\include;$(BCB)\include\vcl;expat -Item23=..\mockpp;$(BCB)\include;$(BCB)\include\vcl;expat -Item24=..\mockpp_34\tests;..\mockpp;$(BCB)\include;$(BCB)\include\vcl -Item25=..\mockpp_34\tests;..\mockpp;$(BCB)\include -Item26=..\mockpp_34\tests;..\mockpp;$(BCB)/include -Item27=..\mockpp_34\tests;..\mockpp -Item28=..\mockpp -Item29=..\mockpp_34\tests;..\mockpp_34\mockpp +Item0=..\mockpp\examples\tutorial;..;$(BCB)\include;g:\data\src\cppunit-1.10.2\include\ +Item1=..\mockpp\examples\tutorial;..;$(BCB)\include;g:\data\src\cppunit-1.10.2\include +Item2=..\mockpp\examples\tutorial;..;$(BCB)\include;X:\Documents\src\cppunit-1.10.2\include\ +Item3=..\.;$(BCB)\include;X:\Documents\src\cppunit-1.10.2\include +Item4=..\mockpp\examples\tutorial;..\mockpp_34\examples\tutorial;..\mockpp_34\examples;..\..\mockpp;$(BCB)\include;..\..\..\cppunit-1.10.2\include;..\..\cppunit-1.10\include +Item5=..\mockpp\examples\tutorial;..\mockpp_34\examples\tutorial;..\mockpp_34\examples;..\..\mockpp;$(BCB)\include;..\..\..\cppunit-1.10.2\include +Item6=..\mockpp_34\examples\tutorial;..\mockpp_34\examples;..;$(BCB)\include;..\..\..\cppunit-1.10.2\include +Item7=..\mockpp_34\examples\tutorial;..\mockpp_34\examples;..\mockpp_34\tests;..;$(BCB)\include;..\..\cppunit\include;..\..\..\cppunit-1.8.0\include +Item8=..\mockpp_34\examples;..\mockpp_34\tests;..\..\mockpp;$(BCB)\include;..\..\cppunit\include;..\..\..\cppunit-1.8.0\include +Item9=..\mockpp_34\tests;..;$(BCB)\include;..\..\cppunit\include;X:\src\cppunit-1.8.0\include +Item10=..\mockpp_34\tests;..;$(BCB)\include;..\..\cppunit\include +Item11=..\mockpp_34\tests;..;$(BCB)\include;B:\cvs\ups\src\3party\cppunit\include +Item12=..\mockpp_34\tests;..;$(BCB)\include;..\..\..\cppunit-1.8.0\include +Item13=..;$(BCB)\include;..\..\..\cppunit-1.8.0\include +Item14=..\mockpp_34\tests;\\SONNE\HOMES\src\mockpp_34\mockpp_19\mockpp_34\tests;..\..\mockpp;$(BCB)\include;..\..\..\cppunit-1.8.0\include +Item15=..;$(BCB)\include;X:\src\cppunit-1.8.0\include +Item16=\\SONNE\HOMES\src\mockpp_34\mockpp_19\mockpp_34\tests;..\..\mockpp;..\mockpp_34\tests;..\mockpp;..\expat;$(BCB)\include +Item17=..;..\mockpp_34\tests;..\mockpp;..\expat;$(BCB)\include +Item18=..\..\mockpp;..\mockpp_34\tests;..\mockpp;..\expat;$(BCB)\include +Item19=..\..\mockpp;..\mockpp_34\tests;..\mockpp;..\expat;$(BCB)\include;$(BCB)\include\vcl;C:\wx2\include\ +Item20=.. ;..\mockpp_34\tests;..\mockpp;..\expat;$(BCB)\include;$(BCB)\include\vcl;C:\wx2\include\ +Item21=.. ;..\mockpp_34\tests;..\expat;..\mockpp;$(BCB)\include;$(BCB)\include\vcl;C:\wx2\include +Item22=..\mockpp_34\tests;..\expat;..\mockpp;$(BCB)\include;$(BCB)\include\vcl +Item23=..\mockpp_34\tests;..\mockpp;$(BCB)\include;$(BCB)\include\vcl;expat +Item24=..\mockpp;$(BCB)\include;$(BCB)\include\vcl;expat +Item25=..\mockpp_34\tests;..\mockpp;$(BCB)\include;$(BCB)\include\vcl +Item26=..\mockpp_34\tests;..\mockpp;$(BCB)\include +Item27=..\mockpp_34\tests;..\mockpp;$(BCB)/include +Item28=..\mockpp_34\tests;..\mockpp +Item29=..\mockpp [HistoryLists\hlLibraryPath] Count=19 Index: chainmock2.bpr =================================================================== RCS file: /cvsroot/mockpp/mockpp/bcb5/chainmock2.bpr,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- chainmock2.bpr 18 Nov 2005 20:30:27 -0000 1.1 +++ chainmock2.bpr 19 Nov 2005 14:16:38 -0000 1.2 @@ -4,17 +4,17 @@ <MACROS> <VERSION value="BCB.05.03"/> <PROJECT value="c:\tmp\compile\chainmock2_34.exe"/> - <OBJFILES value="c:\tmp\compile\mockpp_34\\chainmock2.obj + <OBJFILES value="c:\tmp\compile\mockpp_34\\chainmock2.obj c:\tmp\compile\mockpp_34\\consumer.obj"/> <RESFILES value=""/> <DEFFILE value=""/> <RESDEPEN value="$(RESFILES)"/> - <LIBFILES value="c:\tmp\compile\mockpp_34.lib c:\tmp\compile\cppunit_1_10.lib"/> + <LIBFILES value="c:\tmp\compile\mockpp_34.lib c:\tmp\compile\cppunit_1_10_bcb5.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\examples\tutorial"/> <PATHPAS value=".;"/> @@ -26,13 +26,13 @@ <USERDEFINES value="__DLL___"/> <SYSDEFINES value="NO_STRICT;_NO_VCL;_RTLDLL;USEPACKAGES"/> <MAINSOURCE value="chainmock2.bpf"/> - <INCLUDEPATH value="..\mockpp\examples\tutorial;..;$(BCB)\include;X:\cppunit-1.10.2\include\;..\..\cppunit-1.10.2\include"/> + <INCLUDEPATH value="..\mockpp\examples\tutorial;..\..\mockpp;$(BCB)\include;X:\cppunit-1.10.2\include\;..\..\cppunit-1.10.2\include"/> <LIBPATH value="..\mockpp\examples\tutorial;..\mockpp_34\examples\tutorial;$(BCB)\lib\obj;$(BCB)\lib"/> <WARNINGS value="-w-par"/> </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_34\" -N0"c:\tmp\compile\mockpp_34\" -$YD -$W + <PFLAGS value="-N2"c:\tmp\compile\mockpp_34\" -N0"c:\tmp\compile\mockpp_34\" -$YD -$W -$O- -v -JPHNE -M"/> <RFLAGS value=""/> <AFLAGS value="/mx /w2 /zd"/> @@ -73,36 +73,36 @@ [HistoryLists\hlIncludePath] Count=30 -Item0=..\mockpp\examples\tutorial;..;$(BCB)\include;X:\cppunit-1.10.2\include\;c:\home\arnold\cppunit-1.10.2\include\ -Item1=..\mockpp\examples\tutorial;..;$(BCB)\include;X:\cppunit-1.10.2\include\ -Item2=..\.;$(BCB)\include;..\..\..\cppunit-1.10.2\include -Item3=..\mockpp\examples\tutorial;..\mockpp_34\examples\tutorial;..\mockpp_34\examples;..\mockpp_34\tests;..\..\mockpp;$(BCB)\include;..\..\..\cppunit-1.10.2\include;..\..\cppunit-1.10\include -Item4=..\mockpp\examples\tutorial;..\mockpp_34\examples\tutorial;..\mockpp_34\examples;..\mockpp_34\tests;..\..\mockpp;$(BCB)\include;..\..\..\cppunit-1.10.2\include -Item5=..\mockpp_34\examples\tutorial;..\mockpp_34\examples;..\mockpp_34\tests;..;$(BCB)\include;..\..\..\cppunit.ups\include -Item6=..\mockpp_34\examples\tutorial;..\mockpp_34\examples;..\mockpp_34\tests;..;$(BCB)\include;..\..\cppunit\include;..\..\..\cppunit-1.8.0\include -Item7=..\mockpp_34\examples;..\mockpp_34\tests;..\..\mockpp;$(BCB)\include;..\..\cppunit\include;..\..\..\cppunit-1.8.0\include -Item8=..\mockpp_34\tests;..;$(BCB)\include;..\..\cppunit\include;X:\src\cppunit-1.8.0\include -Item9=..\mockpp_34\tests;..;$(BCB)\include;..\..\cppunit\include -Item10=..\mockpp_34\tests;..;$(BCB)\include;B:\cvs\ups\src\3party\cppunit\include -Item11=..\mockpp_34\tests;..;$(BCB)\include;..\..\..\cppunit-1.8.0\include -Item12=..;$(BCB)\include;..\..\..\cppunit-1.8.0\include -Item13=..\mockpp_34\tests;\\SONNE\HOMES\src\mockpp_34\mockpp\mockpp_34\tests;..\..\mockpp;$(BCB)\include;..\..\..\cppunit-1.8.0\include -Item14=..;$(BCB)\include;X:\src\cppunit-1.8.0\include -Item15=\\SONNE\HOMES\src\mockpp_34\mockpp\mockpp_34\tests;..\..\mockpp;..\mockpp_34\tests;..\mockpp;..\expat;$(BCB)\include -Item16=..;..\mockpp_34\tests;..\mockpp;..\expat;$(BCB)\include -Item17=..\..\mockpp;..\mockpp_34\tests;..\mockpp;..\expat;$(BCB)\include -Item18=..\..\mockpp;..\mockpp_34\tests;..\mockpp;..\expat;$(BCB)\include;$(BCB)\include\vcl;C:\wx2\include\ -Item19=.. ;..\mockpp_34\tests;..\mockpp;..\expat;$(BCB)\include;$(BCB)\include\vcl;C:\wx2\include\ -Item20=.. ;..\mockpp_34\tests;..\expat;..\mockpp;$(BCB)\include;$(BCB)\include\vcl;C:\wx2\include -Item21=..\mockpp_34\tests;..\expat;..\mockpp;$(BCB)\include;$(BCB)\include\vcl -Item22=..\mockpp_34\tests;..\mockpp;$(BCB)\include;$(BCB)\include\vcl;expat -Item23=..\mockpp;$(BCB)\include;$(BCB)\include\vcl;expat -Item24=..\mockpp_34\tests;..\mockpp;$(BCB)\include;$(BCB)\include\vcl -Item25=..\mockpp_34\tests;..\mockpp;$(BCB)\include -Item26=..\mockpp_34\tests;..\mockpp;$(BCB)/include -Item27=..\mockpp_34\tests;..\mockpp -Item28=..\mockpp -Item29=..\mockpp_34\tests;..\mockpp_34\mockpp +Item0=..\mockpp\examples\tutorial;..;$(BCB)\include;X:\cppunit-1.10.2\include\;..\..\cppunit-1.10.2\include +Item1=..\mockpp\examples\tutorial;..;$(BCB)\include;X:\cppunit-1.10.2\include\;c:\home\arnold\cppunit-1.10.2\include\ +Item2=..\mockpp\examples\tutorial;..;$(BCB)\include;X:\cppunit-1.10.2\include\ +Item3=..\.;$(BCB)\include;..\..\..\cppunit-1.10.2\include +Item4=..\mockpp\examples\tutorial;..\mockpp_34\examples\tutorial;..\mockpp_34\examples;..\mockpp_34\tests;..\..\mockpp;$(BCB)\include;..\..\..\cppunit-1.10.2\include;..\..\cppunit-1.10\include +Item5=..\mockpp\examples\tutorial;..\mockpp_34\examples\tutorial;..\mockpp_34\examples;..\mockpp_34\tests;..\..\mockpp;$(BCB)\include;..\..\..\cppunit-1.10.2\include +Item6=..\mockpp_34\examples\tutorial;..\mockpp_34\examples;..\mockpp_34\tests;..;$(BCB)\include;..\..\..\cppunit.ups\include +Item7=..\mockpp_34\examples\tutorial;..\mockpp_34\examples;..\mockpp_34\tests;..;$(BCB)\include;..\..\cppunit\include;..\..\..\cppunit-1.8.0\include +Item8=..\mockpp_34\examples;..\mockpp_34\tests;..\..\mockpp;$(BCB)\include;..\..\cppunit\include;..\..\..\cppunit-1.8.0\include +Item9=..\mockpp_34\tests;..;$(BCB)\include;..\..\cppunit\include;X:\src\cppunit-1.8.0\include +Item10=..\mockpp_34\tests;..;$(BCB)\include;..\..\cppunit\include +Item11=..\mockpp_34\tests;..;$(BCB)\include;B:\cvs\ups\src\3party\cppunit\include +Item12=..\mockpp_34\tests;..;$(BCB)\include;..\..\..\cppunit-1.8.0\include +Item13=..;$(BCB)\include;..\..\..\cppunit-1.8.0\include +Item14=..\mockpp_34\tests;\\SONNE\HOMES\src\mockpp_34\mockpp\mockpp_34\tests;..\..\mockpp;$(BCB)\include;..\..\..\cppunit-1.8.0\include +Item15=..;$(BCB)\include;X:\src\cppunit-1.8.0\include +Item16=\\SONNE\HOMES\src\mockpp_34\mockpp\mockpp_34\tests;..\..\mockpp;..\mockpp_34\tests;..\mockpp;..\expat;$(BCB)\include +Item17=..;..\mockpp_34\tests;..\mockpp;..\expat;$(BCB)\include +Item18=..\..\mockpp;..\mockpp_34\tests;..\mockpp;..\expat;$(BCB)\include +Item19=..\..\mockpp;..\mockpp_34\tests;..\mockpp;..\expat;$(BCB)\include;$(BCB)\include\vcl;C:\wx2\include\ +Item20=.. ;..\mockpp_34\tests;..\mockpp;..\expat;$(BCB)\include;$(BCB)\include\vcl;C:\wx2\include\ +Item21=.. ;..\mockpp_34\tests;..\expat;..\mockpp;$(BCB)\include;$(BCB)\include\vcl;C:\wx2\include +Item22=..\mockpp_34\tests;..\expat;..\mockpp;$(BCB)\include;$(BCB)\include\vcl +Item23=..\mockpp_34\tests;..\mockpp;$(BCB)\include;$(BCB)\include\vcl;expat +Item24=..\mockpp;$(BCB)\include;$(BCB)\include\vcl;expat +Item25=..\mockpp_34\tests;..\mockpp;$(BCB)\include;$(BCB)\include\vcl +Item26=..\mockpp_34\tests;..\mockpp;$(BCB)\include +Item27=..\mockpp_34\tests;..\mockpp;$(BCB)/include +Item28=..\mockpp_34\tests;..\mockpp +Item29=..\mockpp [HistoryLists\hlLibraryPath] Count=19 Index: poormock-se.bpf =================================================================== RCS file: /cvsroot/mockpp/mockpp/bcb5/poormock-se.bpf,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- poormock-se.bpf 31 Oct 2005 19:19:52 -0000 1.11 +++ poormock-se.bpf 19 Nov 2005 14:16:38 -0000 1.12 @@ -1,5 +1,5 @@ USELIB("c:\tmp\compile\mockpp_34.lib"); -USELIB("c:\tmp\compile\cppunit_1_10.lib"); +USELIB("c:\tmp\compile\cppunit_1_10_bcb5.lib"); USEUNIT("..\mockpp\examples\tutorial\poormock-se.cpp"); USEUNIT("..\mockpp\examples\tutorial\consumer.cpp"); T//--------------------------------------------------------------------------- Index: basicmock.bpf =================================================================== RCS file: /cvsroot/mockpp/mockpp/bcb5/basicmock.bpf,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- basicmock.bpf 31 Oct 2005 19:19:52 -0000 1.17 +++ basicmock.bpf 19 Nov 2005 14:16:38 -0000 1.18 @@ -1,5 +1,5 @@ USELIB("c:\tmp\compile\mockpp_34.lib"); -USELIB("c:\tmp\compile\cppunit_1_10.lib"); +USELIB("c:\tmp\compile\cppunit_1_10_bcb5.lib"); USEUNIT("..\mockpp\examples\tutorial\basicmock.cpp"); USEUNIT("..\mockpp\examples\tutorial\consumer.cpp"); //--------------------------------------------------------------------------- Index: chainmock.bpr =================================================================== RCS file: /cvsroot/mockpp/mockpp/bcb5/chainmock.bpr,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- chainmock.bpr 31 Oct 2005 19:19:52 -0000 1.21 +++ chainmock.bpr 19 Nov 2005 14:16:38 -0000 1.22 @@ -9,7 +9,7 @@ <RESFILES value=""/> <DEFFILE value=""/> <RESDEPEN value="$(RESFILES)"/> - <LIBFILES value="c:\tmp\compile\mockpp_34.lib c:\tmp\compile\cppunit_1_10.lib"/> + <LIBFILES value="c:\tmp\compile\mockpp_34.lib c:\tmp\compile\cppunit_1_10_bcb5.lib"/> <LIBRARIES value=""/> <SPARELIBS value=""/> <PACKAGES value="VCL50.bpi VCLX50.bpi bcbsmp50.bpi QRPT50.bpi VCLDB50.bpi VCLBDE50.bpi Index: chainmock2.bpf =================================================================== RCS file: /cvsroot/mockpp/mockpp/bcb5/chainmock2.bpf,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- chainmock2.bpf 18 Nov 2005 20:30:27 -0000 1.1 +++ chainmock2.bpf 19 Nov 2005 14:16:38 -0000 1.2 @@ -1,5 +1,5 @@ USELIB("c:\tmp\compile\mockpp_34.lib"); -USELIB("c:\tmp\compile\cppunit_1_10.lib"); +USELIB("c:\tmp\compile\cppunit_1_10_bcb5.lib"); USEUNIT("..\mockpp\examples\tutorial\chainmock2.cpp"); USEUNIT("..\mockpp\examples\tutorial\consumer.cpp"); //--------------------------------------------------------------------------- |
From: Ewald A. <ewa...@us...> - 2005-11-19 14:16:47
|
Update of /cvsroot/mockpp/mockpp/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6085/mockpp Modified Files: VisitableMockMethod0.h VisitableMockMethod1.h VisitableMockMethod2.h VisitableMockMethod3.h VisitableMockMethod4.h VisitableMockMethod5.h VisitableMockMethod6.h gen_visitablemethod_N.pl Log Message: fixes for bcb5 Index: VisitableMockMethod6.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/VisitableMockMethod6.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- VisitableMockMethod6.h 14 Nov 2005 17:25:14 -0000 1.8 +++ VisitableMockMethod6.h 19 Nov 2005 14:16:38 -0000 1.9 @@ -211,7 +211,8 @@ { } - /** Actually verifies the mocked method. Must be called by the client code. + /** Actually verifies the mocked method. + * Must be called by the client code. * @param p1 mock method parameter 1 * @param p2 mock method parameter 2 * @param p3 mock method parameter 3 @@ -232,10 +233,25 @@ return this->determineReturnValue(); } else - return R(); // only dummy value + return R(); // only dummy value to make the compiler happy } +#if defined(__BORLANDC__) // ==> BCB5.5.1 ?? F1004 Internal compiler error at 0x12548c1 with base 0x1200000 + /** Set up expectations with constraints. + * @param p1 mock method parameter 1 + * @param p2 mock method parameter 2 + * @param p3 mock method parameter 3 + * @param p4 mock method parameter 4 + * @param p5 mock method parameter 5 + * @param p6 mock method parameter 6 + */ + void forward (const ConstraintHolder<P1> &p1, const ConstraintHolder<P2> &p2, const ConstraintHolder<P3> &p3, const ConstraintHolder<P4> &p4, const ConstraintHolder<P5> &p5, const ConstraintHolder<P6> &p6) const + { + VisitableMockMethod6Common<R, P1, P2, P3, P4, P5, P6>::forward(p1, p2, p3, p4, p5, p6); + } +#else using VisitableMockMethod6Common<R, P1, P2, P3, P4, P5, P6>::forward; +#endif /** Adds another response value. * Response values are determined on the parameters you pass. This way the @@ -298,7 +314,8 @@ { } - /** Actually verifies the mocked method. Must be called by the client code. + /** Actually verifies the mocked method. + * Must be called by the client code. * @param p1 mock method parameter 1 * @param p2 mock method parameter 2 * @param p3 mock method parameter 3 @@ -311,7 +328,22 @@ this->forward_param(p1, p2, p3, p4, p5, p6); } +#if defined(__BORLANDC__) // ==> BCB5.5.1 ?? F1004 Internal compiler error at 0x12548c1 with base 0x1200000 + /** Set up expectations with constraints. + * @param p1 mock method parameter 1 + * @param p2 mock method parameter 2 + * @param p3 mock method parameter 3 + * @param p4 mock method parameter 4 + * @param p5 mock method parameter 5 + * @param p6 mock method parameter 6 + */ + void forward (const ConstraintHolder<P1> &p1, const ConstraintHolder<P2> &p2, const ConstraintHolder<P3> &p3, const ConstraintHolder<P4> &p4, const ConstraintHolder<P5> &p5, const ConstraintHolder<P6> &p6) const + { + VisitableMockMethod6Common<void, P1, P2, P3, P4, P5, P6>::forward(p1, p2, p3, p4, p5, p6); + } +#else using VisitableMockMethod6Common<void, P1, P2, P3, P4, P5, P6>::forward; +#endif }; Index: VisitableMockMethod2.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/VisitableMockMethod2.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- VisitableMockMethod2.h 14 Nov 2005 17:25:14 -0000 1.10 +++ VisitableMockMethod2.h 19 Nov 2005 14:16:38 -0000 1.11 @@ -171,7 +171,8 @@ { } - /** Actually verifies the mocked method. Must be called by the client code. + /** Actually verifies the mocked method. + * Must be called by the client code. * @param p1 mock method parameter 1 * @param p2 mock method parameter 2 */ @@ -188,10 +189,21 @@ return this->determineReturnValue(); } else - return R(); // only dummy value + return R(); // only dummy value to make the compiler happy } +#if defined(__BORLANDC__) // ==> BCB5.5.1 ?? F1004 Internal compiler error at 0x12548c1 with base 0x1200000 + /** Set up expectations with constraints. + * @param p1 mock method parameter 1 + * @param p2 mock method parameter 2 + */ + void forward (const ConstraintHolder<P1> &p1, const ConstraintHolder<P2> &p2) const + { + VisitableMockMethod2Common<R, P1, P2>::forward(p1, p2); + } +#else using VisitableMockMethod2Common<R, P1, P2>::forward; +#endif /** Adds another response value. * Response values are determined on the parameters you pass. This way the @@ -246,7 +258,8 @@ { } - /** Actually verifies the mocked method. Must be called by the client code. + /** Actually verifies the mocked method. + * Must be called by the client code. * @param p1 mock method parameter 1 * @param p2 mock method parameter 2 */ @@ -255,7 +268,18 @@ this->forward_param(p1, p2); } +#if defined(__BORLANDC__) // ==> BCB5.5.1 ?? F1004 Internal compiler error at 0x12548c1 with base 0x1200000 + /** Set up expectations with constraints. + * @param p1 mock method parameter 1 + * @param p2 mock method parameter 2 + */ + void forward (const ConstraintHolder<P1> &p1, const ConstraintHolder<P2> &p2) const + { + VisitableMockMethod2Common<void, P1, P2>::forward(p1, p2); + } +#else using VisitableMockMethod2Common<void, P1, P2>::forward; +#endif }; Index: gen_visitablemethod_N.pl =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/gen_visitablemethod_N.pl,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- gen_visitablemethod_N.pl 14 Nov 2005 17:25:14 -0000 1.12 +++ gen_visitablemethod_N.pl 19 Nov 2005 14:16:38 -0000 1.13 @@ -381,7 +381,8 @@ { } - /** Actually verifies the mocked method. Must be called by the client code."; + /** Actually verifies the mocked method. + * Must be called by the client code."; for($p = 1; $p <= $numArgs; ++$p) { print OUT " * \@param p" . $p . " mock method parameter " . $p; } @@ -408,11 +409,30 @@ return this->determineReturnValue(); } else - return R(); // only dummy value - } + return R(); // only dummy value to make the compiler happy + }"; + +if ($numArgs > 0) +{ +print OUT " + +#if defined(__BORLANDC__) // ==> BCB5.5.1 ?? F1004 Internal compiler error at 0x12548c1 with base 0x1200000 + /** Set up expectations with constraints."; + +for($p = 1; $p <= $numArgs; ++$p) { print OUT " + * \@param p" . $p . " mock method parameter " . $p; } +print OUT " + */ + void forward (" . $holderParms . ") const + { + VisitableMockMethod" . $numArgs . "Common<R" . $templateArgs_colon . ">::forward(" . $args . "); + } +#else using VisitableMockMethod" . $numArgs . "Common<R" . $templateArgs_colon . ">::forward; +#endif "; +} if ($numArgs > 0) { @@ -484,7 +504,8 @@ { } - /** Actually verifies the mocked method. Must be called by the client code."; + /** Actually verifies the mocked method. + * Must be called by the client code."; for($p = 1; $p <= $numArgs; ++$p) { print OUT " * \@param p" . $p . " mock method parameter " . $p; } @@ -494,9 +515,30 @@ void forward(" . $parms . ") const { this->forward_param(" . $args . "); - } + }"; + +if ($numArgs > 0) +{ +print OUT " + +#if defined(__BORLANDC__) // ==> BCB5.5.1 ?? F1004 Internal compiler error at 0x12548c1 with base 0x1200000 + /** Set up expectations with constraints."; + +for($p = 1; $p <= $numArgs; ++$p) { print OUT " + * \@param p" . $p . " mock method parameter " . $p; } +print OUT " + */ + void forward (" . $holderParms . ") const + { + VisitableMockMethod" . $numArgs . "Common<void" . $templateArgs_colon . ">::forward(" . $args . "); + } +#else using VisitableMockMethod" . $numArgs . "Common<void" . $templateArgs_colon . ">::forward; +#endif"; +} + +print OUT " }; Index: VisitableMockMethod3.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/VisitableMockMethod3.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- VisitableMockMethod3.h 14 Nov 2005 17:25:14 -0000 1.10 +++ VisitableMockMethod3.h 19 Nov 2005 14:16:38 -0000 1.11 @@ -181,7 +181,8 @@ { } - /** Actually verifies the mocked method. Must be called by the client code. + /** Actually verifies the mocked method. + * Must be called by the client code. * @param p1 mock method parameter 1 * @param p2 mock method parameter 2 * @param p3 mock method parameter 3 @@ -199,10 +200,22 @@ return this->determineReturnValue(); } else - return R(); // only dummy value + return R(); // only dummy value to make the compiler happy } +#if defined(__BORLANDC__) // ==> BCB5.5.1 ?? F1004 Internal compiler error at 0x12548c1 with base 0x1200000 + /** Set up expectations with constraints. + * @param p1 mock method parameter 1 + * @param p2 mock method parameter 2 + * @param p3 mock method parameter 3 + */ + void forward (const ConstraintHolder<P1> &p1, const ConstraintHolder<P2> &p2, const ConstraintHolder<P3> &p3) const + { + VisitableMockMethod3Common<R, P1, P2, P3>::forward(p1, p2, p3); + } +#else using VisitableMockMethod3Common<R, P1, P2, P3>::forward; +#endif /** Adds another response value. * Response values are determined on the parameters you pass. This way the @@ -259,7 +272,8 @@ { } - /** Actually verifies the mocked method. Must be called by the client code. + /** Actually verifies the mocked method. + * Must be called by the client code. * @param p1 mock method parameter 1 * @param p2 mock method parameter 2 * @param p3 mock method parameter 3 @@ -269,7 +283,19 @@ this->forward_param(p1, p2, p3); } +#if defined(__BORLANDC__) // ==> BCB5.5.1 ?? F1004 Internal compiler error at 0x12548c1 with base 0x1200000 + /** Set up expectations with constraints. + * @param p1 mock method parameter 1 + * @param p2 mock method parameter 2 + * @param p3 mock method parameter 3 + */ + void forward (const ConstraintHolder<P1> &p1, const ConstraintHolder<P2> &p2, const ConstraintHolder<P3> &p3) const + { + VisitableMockMethod3Common<void, P1, P2, P3>::forward(p1, p2, p3); + } +#else using VisitableMockMethod3Common<void, P1, P2, P3>::forward; +#endif }; Index: VisitableMockMethod4.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/VisitableMockMethod4.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- VisitableMockMethod4.h 14 Nov 2005 17:25:14 -0000 1.10 +++ VisitableMockMethod4.h 19 Nov 2005 14:16:38 -0000 1.11 @@ -191,7 +191,8 @@ { } - /** Actually verifies the mocked method. Must be called by the client code. + /** Actually verifies the mocked method. + * Must be called by the client code. * @param p1 mock method parameter 1 * @param p2 mock method parameter 2 * @param p3 mock method parameter 3 @@ -210,10 +211,23 @@ return this->determineReturnValue(); } else - return R(); // only dummy value + return R(); // only dummy value to make the compiler happy } +#if defined(__BORLANDC__) // ==> BCB5.5.1 ?? F1004 Internal compiler error at 0x12548c1 with base 0x1200000 + /** Set up expectations with constraints. + * @param p1 mock method parameter 1 + * @param p2 mock method parameter 2 + * @param p3 mock method parameter 3 + * @param p4 mock method parameter 4 + */ + void forward (const ConstraintHolder<P1> &p1, const ConstraintHolder<P2> &p2, const ConstraintHolder<P3> &p3, const ConstraintHolder<P4> &p4) const + { + VisitableMockMethod4Common<R, P1, P2, P3, P4>::forward(p1, p2, p3, p4); + } +#else using VisitableMockMethod4Common<R, P1, P2, P3, P4>::forward; +#endif /** Adds another response value. * Response values are determined on the parameters you pass. This way the @@ -272,7 +286,8 @@ { } - /** Actually verifies the mocked method. Must be called by the client code. + /** Actually verifies the mocked method. + * Must be called by the client code. * @param p1 mock method parameter 1 * @param p2 mock method parameter 2 * @param p3 mock method parameter 3 @@ -283,7 +298,20 @@ this->forward_param(p1, p2, p3, p4); } +#if defined(__BORLANDC__) // ==> BCB5.5.1 ?? F1004 Internal compiler error at 0x12548c1 with base 0x1200000 + /** Set up expectations with constraints. + * @param p1 mock method parameter 1 + * @param p2 mock method parameter 2 + * @param p3 mock method parameter 3 + * @param p4 mock method parameter 4 + */ + void forward (const ConstraintHolder<P1> &p1, const ConstraintHolder<P2> &p2, const ConstraintHolder<P3> &p3, const ConstraintHolder<P4> &p4) const + { + VisitableMockMethod4Common<void, P1, P2, P3, P4>::forward(p1, p2, p3, p4); + } +#else using VisitableMockMethod4Common<void, P1, P2, P3, P4>::forward; +#endif }; Index: VisitableMockMethod0.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/VisitableMockMethod0.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- VisitableMockMethod0.h 14 Nov 2005 17:25:14 -0000 1.10 +++ VisitableMockMethod0.h 19 Nov 2005 14:16:38 -0000 1.11 @@ -104,7 +104,8 @@ { } - /** Actually verifies the mocked method. Must be called by the client code. + /** Actually verifies the mocked method. + * Must be called by the client code. */ R forward() const { @@ -115,11 +116,8 @@ return this->determineReturnValue(); } else - return R(); // only dummy value + return R(); // only dummy value to make the compiler happy } - - using VisitableMockMethod0Common<R>::forward; - }; @@ -142,14 +140,13 @@ { } - /** Actually verifies the mocked method. Must be called by the client code. + /** Actually verifies the mocked method. + * Must be called by the client code. */ void forward() const { this->forward_param(); } - - using VisitableMockMethod0Common<void>::forward; }; Index: VisitableMockMethod5.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/VisitableMockMethod5.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- VisitableMockMethod5.h 14 Nov 2005 17:25:14 -0000 1.10 +++ VisitableMockMethod5.h 19 Nov 2005 14:16:38 -0000 1.11 @@ -201,7 +201,8 @@ { } - /** Actually verifies the mocked method. Must be called by the client code. + /** Actually verifies the mocked method. + * Must be called by the client code. * @param p1 mock method parameter 1 * @param p2 mock method parameter 2 * @param p3 mock method parameter 3 @@ -221,10 +222,24 @@ return this->determineReturnValue(); } else - return R(); // only dummy value + return R(); // only dummy value to make the compiler happy } +#if defined(__BORLANDC__) // ==> BCB5.5.1 ?? F1004 Internal compiler error at 0x12548c1 with base 0x1200000 + /** Set up expectations with constraints. + * @param p1 mock method parameter 1 + * @param p2 mock method parameter 2 + * @param p3 mock method parameter 3 + * @param p4 mock method parameter 4 + * @param p5 mock method parameter 5 + */ + void forward (const ConstraintHolder<P1> &p1, const ConstraintHolder<P2> &p2, const ConstraintHolder<P3> &p3, const ConstraintHolder<P4> &p4, const ConstraintHolder<P5> &p5) const + { + VisitableMockMethod5Common<R, P1, P2, P3, P4, P5>::forward(p1, p2, p3, p4, p5); + } +#else using VisitableMockMethod5Common<R, P1, P2, P3, P4, P5>::forward; +#endif /** Adds another response value. * Response values are determined on the parameters you pass. This way the @@ -285,7 +300,8 @@ { } - /** Actually verifies the mocked method. Must be called by the client code. + /** Actually verifies the mocked method. + * Must be called by the client code. * @param p1 mock method parameter 1 * @param p2 mock method parameter 2 * @param p3 mock method parameter 3 @@ -297,7 +313,21 @@ this->forward_param(p1, p2, p3, p4, p5); } +#if defined(__BORLANDC__) // ==> BCB5.5.1 ?? F1004 Internal compiler error at 0x12548c1 with base 0x1200000 + /** Set up expectations with constraints. + * @param p1 mock method parameter 1 + * @param p2 mock method parameter 2 + * @param p3 mock method parameter 3 + * @param p4 mock method parameter 4 + * @param p5 mock method parameter 5 + */ + void forward (const ConstraintHolder<P1> &p1, const ConstraintHolder<P2> &p2, const ConstraintHolder<P3> &p3, const ConstraintHolder<P4> &p4, const ConstraintHolder<P5> &p5) const + { + VisitableMockMethod5Common<void, P1, P2, P3, P4, P5>::forward(p1, p2, p3, p4, p5); + } +#else using VisitableMockMethod5Common<void, P1, P2, P3, P4, P5>::forward; +#endif }; Index: VisitableMockMethod1.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/VisitableMockMethod1.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- VisitableMockMethod1.h 14 Nov 2005 17:25:14 -0000 1.10 +++ VisitableMockMethod1.h 19 Nov 2005 14:16:38 -0000 1.11 @@ -161,7 +161,8 @@ { } - /** Actually verifies the mocked method. Must be called by the client code. + /** Actually verifies the mocked method. + * Must be called by the client code. * @param p1 mock method parameter 1 */ R forward(const P1 &p1) const @@ -177,10 +178,20 @@ return this->determineReturnValue(); } else - return R(); // only dummy value + return R(); // only dummy value to make the compiler happy } +#if defined(__BORLANDC__) // ==> BCB5.5.1 ?? F1004 Internal compiler error at 0x12548c1 with base 0x1200000 + /** Set up expectations with constraints. + * @param p1 mock method parameter 1 + */ + void forward (const ConstraintHolder<P1> &p1) const + { + VisitableMockMethod1Common<R, P1>::forward(p1); + } +#else using VisitableMockMethod1Common<R, P1>::forward; +#endif /** Adds another response value. * Response values are determined on the parameters you pass. This way the @@ -233,7 +244,8 @@ { } - /** Actually verifies the mocked method. Must be called by the client code. + /** Actually verifies the mocked method. + * Must be called by the client code. * @param p1 mock method parameter 1 */ void forward(const P1 &p1) const @@ -241,7 +253,17 @@ this->forward_param(p1); } +#if defined(__BORLANDC__) // ==> BCB5.5.1 ?? F1004 Internal compiler error at 0x12548c1 with base 0x1200000 + /** Set up expectations with constraints. + * @param p1 mock method parameter 1 + */ + void forward (const ConstraintHolder<P1> &p1) const + { + VisitableMockMethod1Common<void, P1>::forward(p1); + } +#else using VisitableMockMethod1Common<void, P1>::forward; +#endif }; |
From: Ewald A. <ewa...@us...> - 2005-11-19 14:16:47
|
Update of /cvsroot/mockpp/mockpp/bcb6 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6085/bcb6 Modified Files: jmock_test.bpr mock_test.bpr mockpp.bpr Log Message: fixes for bcb5 Index: mockpp.bpr =================================================================== RCS file: /cvsroot/mockpp/mockpp/bcb6/mockpp.bpr,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- mockpp.bpr 15 Oct 2005 15:12:00 -0000 1.3 +++ mockpp.bpr 19 Nov 2005 14:16:38 -0000 1.4 @@ -4,59 +4,59 @@ <MACROS> <VERSION value="BCB.06.00"/> <PROJECT value="c:\tmp\compile\mockpp.dll"/> - <OBJFILES value="c:\tmp\compile\mockpp_33\\NotImplementedException.obj - c:\tmp\compile\mockpp_33\\AssertMo.obj - c:\tmp\compile\mockpp_33\\AssertionFailedError.obj - c:\tmp\compile\mockpp_33\\Exception.obj - c:\tmp\compile\mockpp_33\\Formatter.obj - c:\tmp\compile\mockpp_33\\Assert.obj - c:\tmp\compile\mockpp_33\\ChainingMockObjectSupport.obj - c:\tmp\compile\mockpp_33\\ExpectationCounter.obj - c:\tmp\compile\mockpp_33\\ThrowableList.obj - c:\tmp\compile\mockpp_33\\Verifiable.obj - c:\tmp\compile\mockpp_33\\VerifiableList.obj - c:\tmp\compile\mockpp_33\\VisitableMockObject.obj - c:\tmp\compile\mockpp_33\\VisitableMockMethod.obj - c:\tmp\compile\mockpp_33\\MixedMockObject.obj - c:\tmp\compile\mockpp_33\\Throwable.obj - c:\tmp\compile\mockpp_33\\TrackingCounter.obj - c:\tmp\compile\mockpp_33\\mockpp.obj - c:\tmp\compile\mockpp_33\\MockObject.obj - c:\tmp\compile\mockpp_33\\VerifyingTestCase.obj - c:\tmp\compile\mockpp_33\\SelfDescribing.obj - c:\tmp\compile\mockpp_33\\ChainableMockObject.obj - c:\tmp\compile\mockpp_33\\BuilderNamespace.obj - c:\tmp\compile\mockpp_33\\VoidStub.obj - c:\tmp\compile\mockpp_33\\Invocation.obj - c:\tmp\compile\mockpp_33\\IsNothing.obj - c:\tmp\compile\mockpp_33\\IsAnything.obj - c:\tmp\compile\mockpp_33\\TypelessMatcher.obj - c:\tmp\compile\mockpp_33\\InvokeAtMostMatcher.obj - c:\tmp\compile\mockpp_33\\InvokeAtLeastOnceMatcher.obj - c:\tmp\compile\mockpp_33\\UnlimitedMatcher.obj - c:\tmp\compile\mockpp_33\\InvokeCountMatcher.obj - c:\tmp\compile\mockpp_33\\InvokedRecorder.obj - c:\tmp\compile\mockpp_33\\InvokeOnceMatcher.obj - c:\tmp\compile\mockpp_33\\TestFailureMatcher.obj - c:\tmp\compile\mockpp_33\\InvokeAtLeastMatcher.obj - c:\tmp\compile\mockpp_33\\IdentityBuilder.obj - c:\tmp\compile\mockpp_33\\TypelessConstraint.obj - c:\tmp\compile\mockpp_33\\ConstraintSet.obj + <OBJFILES value="c:\tmp\compile\mockpp_33\\NotImplementedException.obj + c:\tmp\compile\mockpp_33\\AssertMo.obj + c:\tmp\compile\mockpp_33\\AssertionFailedError.obj + c:\tmp\compile\mockpp_33\\Exception.obj + c:\tmp\compile\mockpp_33\\Formatter.obj + c:\tmp\compile\mockpp_33\\Assert.obj + c:\tmp\compile\mockpp_33\\ChainingMockObjectSupport.obj + c:\tmp\compile\mockpp_33\\ExpectationCounter.obj + c:\tmp\compile\mockpp_33\\ThrowableList.obj + c:\tmp\compile\mockpp_33\\Verifiable.obj + c:\tmp\compile\mockpp_33\\VerifiableList.obj + c:\tmp\compile\mockpp_33\\VisitableMockObject.obj + c:\tmp\compile\mockpp_33\\VisitableMockMethod.obj + c:\tmp\compile\mockpp_33\\MixedMockObject.obj + c:\tmp\compile\mockpp_33\\Throwable.obj + c:\tmp\compile\mockpp_33\\TrackingCounter.obj + c:\tmp\compile\mockpp_33\\mockpp.obj + c:\tmp\compile\mockpp_33\\MockObject.obj + c:\tmp\compile\mockpp_33\\VerifyingTestCase.obj + c:\tmp\compile\mockpp_33\\SelfDescribing.obj + c:\tmp\compile\mockpp_33\\ChainableMockObject.obj + c:\tmp\compile\mockpp_33\\BuilderNamespace.obj + c:\tmp\compile\mockpp_33\\VoidStub.obj + c:\tmp\compile\mockpp_33\\Invocation.obj + c:\tmp\compile\mockpp_33\\IsNothing.obj + c:\tmp\compile\mockpp_33\\IsAnything.obj + c:\tmp\compile\mockpp_33\\TypelessMatcher.obj + c:\tmp\compile\mockpp_33\\InvokeAtMostMatcher.obj + c:\tmp\compile\mockpp_33\\InvokeAtLeastOnceMatcher.obj + c:\tmp\compile\mockpp_33\\UnlimitedMatcher.obj + c:\tmp\compile\mockpp_33\\InvokeCountMatcher.obj + c:\tmp\compile\mockpp_33\\InvokedRecorder.obj + c:\tmp\compile\mockpp_33\\InvokeOnceMatcher.obj + c:\tmp\compile\mockpp_33\\TestFailureMatcher.obj + c:\tmp\compile\mockpp_33\\InvokeAtLeastMatcher.obj + c:\tmp\compile\mockpp_33\\IdentityBuilder.obj + c:\tmp\compile\mockpp_33\\TypelessConstraint.obj + c:\tmp\compile\mockpp_33\\ConstraintSet.obj c:\tmp\compile\mockpp_33\\MockTimeServer.obj"/> <RESFILES value=""/> <IDLFILES value=""/> <IDLGENFILES value=""/> <DEFFILE value=""/> <RESDEPEN value="$(RESFILES)"/> - <LIBFILES value="c:\tmp\compile\cppunit_1_10_bcb6.lib c:\tmp\compile\mockpp_production.lib + <LIBFILES value="c:\tmp\compile\cppunit_1_10_bcb6.lib c:\tmp\compile\mockpp_production.lib C:\Programme\Borland\CBuilder6\Lib\stlpmt.lib"/> <LIBRARIES value=""/> <SPARELIBS value="rtl.lib vcl.lib"/> - <PACKAGES value="rtl.bpi vcl.bpi vclx.bpi bcbsmp.bpi qrpt.bpi dbrtl.bpi vcldb.bpi - bdertl.bpi ibsmp.bpi vcldbx.bpi teeui.bpi teedb.bpi tee.bpi teeqr.bpi - ibxpress.bpi bcbie.bpi vclie.bpi inetdb.bpi inet.bpi nmfast.bpi dclocx.bpi + <PACKAGES value="rtl.bpi vcl.bpi vclx.bpi bcbsmp.bpi qrpt.bpi dbrtl.bpi vcldb.bpi + bdertl.bpi ibsmp.bpi vcldbx.bpi teeui.bpi teedb.bpi tee.bpi teeqr.bpi + ibxpress.bpi bcbie.bpi vclie.bpi inetdb.bpi inet.bpi nmfast.bpi dclocx.bpi bcb2kaxserver.bpi"/> - <PATHCPP value=".;..\mockpp\util;..\mockpp\util;..\mockpp\compat;..\mockpp\compat;..\mockpp\compat;..\mockpp\compat;..\mockpp\chaining;..\mockpp;..\mockpp;..\mockpp;..\mockpp;..\mockpp;..\mockpp;..\mockpp;..\mockpp;..\mockpp;..\mockpp;..\mockpp;..\mockpp;..\mockpp;..\mockpp\builder;..\mockpp\stub;..\mockpp\chaining;..\mockpp\constraint;..\mockpp\constraint;..\mockpp\matcher;..\mockpp\matcher;..\mockpp\matcher;..\mockpp\matcher;..\mockpp\matcher;..\mockpp\matcher;..\mockpp\matcher;..\mockpp\matcher;..\mockpp\matcher;..\mockpp\builder;..\mockpp\constraint;..\mockpp\constraint;..\mockpp"/> + <PATHCPP value=".;..\mockpp\util;..\mockpp\util;..\mockpp\compat;..\mockpp\compat;..\mockpp\compat;..\mockpp\compat;..\mockpp\chaining;..\mockpp;..\mockpp;..\mockpp;..\mockpp;..\mockpp;..\mockpp;..\mockpp;..\mockpp;..\mockpp;..\mockpp;..\mockpp;..\mockpp;..\mockpp;..\mockpp;..\mockpp\builder;..\mockpp\stub;..\mockpp\chaining;..\mockpp\constraint;..\mockpp\constraint;..\mockpp\matcher;..\mockpp\matcher;..\mockpp\matcher;..\mockpp\matcher;..\mockpp\matcher;..\mockpp\matcher;..\mockpp\matcher;..\mockpp\matcher;..\mockpp\matcher;..\mockpp\builder;..\mockpp\constraint;..\mockpp\constraint;..\mockpp"/> <PATHPAS value=".;"/> <PATHRC value=".;"/> <PATHASM value=".;"/> @@ -68,22 +68,22 @@ <MAINSOURCE value="mockpp.bpf"/> <INCLUDEPATH value="..\mockpp\constraint;..\mockpp\stub;..\mockpp\builder;..\mockpp\matcher;..\..\mockpp;..\mockpp;..\mockpp\chaining;..\mockpp\compat;..\mockpp\util;$(BCB)\include;g:\data\src\cppunit-1.10.2\include\;..\..\cppunit-1.10.2\include"/> <LIBPATH value="mockpp;\\SONNE\HOMES\Documents\src\mockpp\mockpp\mockpp;..\mockpp\production;..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\matcher;..\mockpp\constraint;..\mockpp\builder;..\mockpp;..\mockpp\chaining;..\mockpp\compat;..\mockpp\util;..\..\mockpp;$(BCB)\lib\obj;$(BCB)\lib"/> - <WARNINGS value="-w8092 -w8091 -w8090 -w8089 -w8087 -wprc -wuse -wucp -wstv -wstu -wpin + <WARNINGS value="-w8092 -w8091 -w8090 -w8089 -w8087 -wprc -wuse -wucp -wstv -wstu -wpin -wnod -wnak -wdef -wcln -wbbf -wasm -wamp -wamb"/> <OTHERFILES value=""/> </MACROS> <OPTIONS> - <IDLCFLAGS value="-src_suffix cpp -D__DLL___ -D_DEBUG -I..\mockpp\constraint - -I..\mockpp\stub -I..\mockpp\builder -I..\mockpp\matcher -I..\..\mockpp - -I..\mockpp -I..\mockpp\chaining -I..\mockpp\compat -I..\mockpp\util - -I$(BCB)\include -Ig:\data\src\cppunit-1.10.2\include\. + <IDLCFLAGS value="-src_suffix cpp -D__DLL___ -D_DEBUG -I..\mockpp\constraint + -I..\mockpp\stub -I..\mockpp\builder -I..\mockpp\matcher -I..\..\mockpp + -I..\mockpp -I..\mockpp\chaining -I..\mockpp\compat -I..\mockpp\util + -I$(BCB)\include -Ig:\data\src\cppunit-1.10.2\include\. -I..\..\cppunit-1.10.2\include -boa"/> <CFLAG1 value="-WD -vGc -vGt -vGd -Od -Vx -Ve -X- -r- -a8 -b- -k -y -v -vi- -tWD -tWM -c"/> - <PFLAGS value="-N2"c:\tmp\compile\mockpp\" -N0"c:\tmp\compile\mockpp_33\" -$YD -$W - -$O- -$A8 -v -JPHNE -M"/> + <PFLAGS value="-N2"c:\tmp\compile\mockpp\" -N0"c:\tmp\compile\mockpp_33\" -$YD -$W -$O- + -$A8 -v -JPHNE -M"/> <RFLAGS value=""/> <AFLAGS value="/mx /w2 /zi"/> - <LFLAGS value="-l"c:\tmp\compile\" -I"c:\tmp\compile\mockpp_33\" -D"" -aa -Tpd -x -Gn -Gi + <LFLAGS value="-l"c:\tmp\compile\" -I"c:\tmp\compile\mockpp_33\" -D"" -aa -Tpd -x -Gn -Gi -v"/> <OTHERFILES value=""/> </OPTIONS> Index: mock_test.bpr =================================================================== RCS file: /cvsroot/mockpp/mockpp/bcb6/mock_test.bpr,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- mock_test.bpr 15 Oct 2005 15:12:00 -0000 1.3 +++ mock_test.bpr 19 Nov 2005 14:16:38 -0000 1.4 @@ -4,62 +4,62 @@ <MACROS> <VERSION value="BCB.06.00"/> <PROJECT value="c:\tmp\compile\mock_test.exe"/> - <OBJFILES value="c:\tmp\compile\mockpp_33\AssertMo_test.obj - c:\tmp\compile\mockpp_33\ExpectationCounter_test.obj - c:\tmp\compile\mockpp_33\ExpectationCounterRange_test.obj - c:\tmp\compile\mockpp_33\ExpectationList_test.obj - c:\tmp\compile\mockpp_33\ExpectationMap_test.obj - c:\tmp\compile\mockpp_33\ExpectationSegment_test.obj - c:\tmp\compile\mockpp_33\ExpectationSet_test.obj - c:\tmp\compile\mockpp_33\ExpectationValue_test.obj - c:\tmp\compile\mockpp_33\Formatter_test.obj - c:\tmp\compile\mockpp_33\mock_test.obj - c:\tmp\compile\mockpp_33\VerifyingTestCase_test.obj - c:\tmp\compile\mockpp_33\Assert_test.obj - c:\tmp\compile\mockpp_33\MockObject_test.obj - c:\tmp\compile\mockpp_33\mockpp_test.obj - c:\tmp\compile\mockpp_33\ReturnObjectList_test.obj - c:\tmp\compile\mockpp_33\Verifiable_test.obj - c:\tmp\compile\mockpp_33\TrackingCounter_test.obj - c:\tmp\compile\mockpp_33\VisitableMockObject_void_test.obj - c:\tmp\compile\mockpp_33\Exception_test.obj - c:\tmp\compile\mockpp_33\ExpectationBoundary_test.obj - c:\tmp\compile\mockpp_33\Throwable_test.obj - c:\tmp\compile\mockpp_33\ThrowableList_test.obj - c:\tmp\compile\mockpp_33\VisitableMockObject_1_test.obj - c:\tmp\compile\mockpp_33\VisitableMockObject_1_void_test.obj - c:\tmp\compile\mockpp_33\VisitableMockObject_2_test.obj - c:\tmp\compile\mockpp_33\VisitableMockObject_2_void_test.obj - c:\tmp\compile\mockpp_33\VisitableMockObject_3_test.obj - c:\tmp\compile\mockpp_33\VisitableMockObject_3_void_test.obj - c:\tmp\compile\mockpp_33\VisitableMockObject_4_test.obj - c:\tmp\compile\mockpp_33\VisitableMockObject_4_void_test.obj - c:\tmp\compile\mockpp_33\VisitableMockObject_5_test.obj - c:\tmp\compile\mockpp_33\VisitableMockObject_5_void_test.obj - c:\tmp\compile\mockpp_33\MixedMockObject_5_test.obj - c:\tmp\compile\mockpp_33\VisitableMockObject_template_test.obj - c:\tmp\compile\mockpp_33\VisitableMockObject_test.obj - c:\tmp\compile\mockpp_33\ExpectationConglomeration_test.obj - c:\tmp\compile\mockpp_33\TimeServer_test.obj - c:\tmp\compile\mockpp_33\classes_ABCDE.obj - c:\tmp\compile\mockpp_33\VisitableMockMethod_test.obj - c:\tmp\compile\mockpp_33\VisitableMockMethod_1_test.obj + <OBJFILES value="c:\tmp\compile\mockpp_33\AssertMo_test.obj + c:\tmp\compile\mockpp_33\ExpectationCounter_test.obj + c:\tmp\compile\mockpp_33\ExpectationCounterRange_test.obj + c:\tmp\compile\mockpp_33\ExpectationList_test.obj + c:\tmp\compile\mockpp_33\ExpectationMap_test.obj + c:\tmp\compile\mockpp_33\ExpectationSegment_test.obj + c:\tmp\compile\mockpp_33\ExpectationSet_test.obj + c:\tmp\compile\mockpp_33\ExpectationValue_test.obj + c:\tmp\compile\mockpp_33\Formatter_test.obj + c:\tmp\compile\mockpp_33\mock_test.obj + c:\tmp\compile\mockpp_33\VerifyingTestCase_test.obj + c:\tmp\compile\mockpp_33\Assert_test.obj + c:\tmp\compile\mockpp_33\MockObject_test.obj + c:\tmp\compile\mockpp_33\mockpp_test.obj + c:\tmp\compile\mockpp_33\ReturnObjectList_test.obj + c:\tmp\compile\mockpp_33\Verifiable_test.obj + c:\tmp\compile\mockpp_33\TrackingCounter_test.obj + c:\tmp\compile\mockpp_33\VisitableMockObject_void_test.obj + c:\tmp\compile\mockpp_33\Exception_test.obj + c:\tmp\compile\mockpp_33\ExpectationBoundary_test.obj + c:\tmp\compile\mockpp_33\Throwable_test.obj + c:\tmp\compile\mockpp_33\ThrowableList_test.obj + c:\tmp\compile\mockpp_33\VisitableMockObject_1_test.obj + c:\tmp\compile\mockpp_33\VisitableMockObject_1_void_test.obj + c:\tmp\compile\mockpp_33\VisitableMockObject_2_test.obj + c:\tmp\compile\mockpp_33\VisitableMockObject_2_void_test.obj + c:\tmp\compile\mockpp_33\VisitableMockObject_3_test.obj + c:\tmp\compile\mockpp_33\VisitableMockObject_3_void_test.obj + c:\tmp\compile\mockpp_33\VisitableMockObject_4_test.obj + c:\tmp\compile\mockpp_33\VisitableMockObject_4_void_test.obj + c:\tmp\compile\mockpp_33\VisitableMockObject_5_test.obj + c:\tmp\compile\mockpp_33\VisitableMockObject_5_void_test.obj + c:\tmp\compile\mockpp_33\MixedMockObject_5_test.obj + c:\tmp\compile\mockpp_33\VisitableMockObject_template_test.obj + c:\tmp\compile\mockpp_33\VisitableMockObject_test.obj + c:\tmp\compile\mockpp_33\ExpectationConglomeration_test.obj + c:\tmp\compile\mockpp_33\TimeServer_test.obj + c:\tmp\compile\mockpp_33\classes_ABCDE.obj + c:\tmp\compile\mockpp_33\VisitableMockMethod_test.obj + c:\tmp\compile\mockpp_33\VisitableMockMethod_1_test.obj c:\tmp\compile\mockpp_33\VisitableMockMethod_2_test.obj"/> <RESFILES value=""/> <IDLFILES value=""/> <IDLGENFILES value=""/> <DEFFILE value=""/> <RESDEPEN value="$(RESFILES)"/> - <LIBFILES value="c:\tmp\compile\mockpp.lib c:\tmp\compile\mockpp_production.lib - c:\tmp\compile\cppunit_1_10_bcb6.lib + <LIBFILES value="c:\tmp\compile\mockpp.lib c:\tmp\compile\mockpp_production.lib + c:\tmp\compile\cppunit_1_10_bcb6.lib C:\Programme\Borland\CBuilder6\Lib\stlpmt.lib"/> <LIBRARIES value=""/> <SPARELIBS value=""/> - <PACKAGES value="rtl.bpi vcl.bpi vclx.bpi bcbsmp.bpi qrpt.bpi dbrtl.bpi vcldb.bpi - bdertl.bpi ibsmp.bpi vcldbx.bpi teeui.bpi teedb.bpi tee.bpi teeqr.bpi - ibxpress.bpi bcbie.bpi vclie.bpi inetdb.bpi inet.bpi nmfast.bpi dclocx.bpi + <PACKAGES value="rtl.bpi vcl.bpi vclx.bpi bcbsmp.bpi qrpt.bpi dbrtl.bpi vcldb.bpi + bdertl.bpi ibsmp.bpi vcldbx.bpi teeui.bpi teedb.bpi tee.bpi teeqr.bpi + ibxpress.bpi bcbie.bpi vclie.bpi inetdb.bpi inet.bpi nmfast.bpi dclocx.bpi bcb2kaxserver.bpi"/> - <PATHCPP value=".;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests"/> + <PATHCPP value=".;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests"/> <PATHPAS value=".;"/> <PATHRC value=".;"/> <PATHASM value=".;"/> @@ -71,15 +71,15 @@ <MAINSOURCE value="mock_test.bpf"/> <INCLUDEPATH value="..\mockpp\tests;..\..\mockpp;$(BCB)\include;g:\data\src\cppunit-1.10.2\include"/> <LIBPATH value="..\mockpp\tests;$(BCB)\lib\obj;$(BCB)\lib"/> - <WARNINGS value="-w8092 -w8091 -w8090 -w8089 -w8087 -wprc -wuse -wucp -wstv -wstu -wpin + <WARNINGS value="-w8092 -w8091 -w8090 -w8089 -w8087 -wprc -wuse -wucp -wstv -wstu -wpin -wnod -wnak -wdef -wcln -wbbf -wasm -wamp -wamb"/> <OTHERFILES value=""/> </MACROS> <OPTIONS> - <IDLCFLAGS value="-I..\mockpp\tests -I..\..\mockpp -I$(BCB)\include + <IDLCFLAGS value="-I..\mockpp\tests -I..\..\mockpp -I$(BCB)\include -Ig:\data\src\cppunit-1.10.2\include -src_suffix cpp -D__DLL___ -boa"/> <CFLAG1 value="-vGc -vGt -vGd -Od -Vx -Ve -X- -r- -a8 -b- -k -y -v -vi- -tWC -tWM -c"/> - <PFLAGS value="-N2c:\tmp\compile\mockpp_33 -N0c:\tmp\compile\mockpp_33 -$YD -$W -$O- -$A8 + <PFLAGS value="-N2c:\tmp\compile\mockpp_33 -N0c:\tmp\compile\mockpp_33 -$YD -$W -$O- -$A8 -v -JPHNE -M"/> <RFLAGS value=""/> <AFLAGS value="/mx /w2 /zd"/> Index: jmock_test.bpr =================================================================== RCS file: /cvsroot/mockpp/mockpp/bcb6/jmock_test.bpr,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- jmock_test.bpr 15 Oct 2005 15:12:00 -0000 1.3 +++ jmock_test.bpr 19 Nov 2005 14:16:38 -0000 1.4 @@ -4,93 +4,93 @@ <MACROS> <VERSION value="BCB.06.00"/> <PROJECT value="c:\tmp\compile\jmock_test.exe"/> - <OBJFILES value="c:\tmp\compile\mockpp_33\\AbstractInvocationDispatcher_test.obj - c:\tmp\compile\mockpp_33\\ChainingMockBuilder_test.obj - c:\tmp\compile\mockpp_33\\ChainableMockObject_void_test.obj - c:\tmp\compile\mockpp_33\\classes_ABCDE.obj - c:\tmp\compile\mockpp_33\\And_test.obj - c:\tmp\compile\mockpp_33\\IsAnything_test.obj - c:\tmp\compile\mockpp_33\\IsCloseTo_test.obj - c:\tmp\compile\mockpp_33\\IsEqual_test.obj - c:\tmp\compile\mockpp_33\\IsGreaterOrEqual_test.obj - c:\tmp\compile\mockpp_33\\IsGreaterThan_test.obj - c:\tmp\compile\mockpp_33\\IsInstanceOf_test.obj - c:\tmp\compile\mockpp_33\\IsLessOrEqual_test.obj - c:\tmp\compile\mockpp_33\\IsLessThan_test.obj - c:\tmp\compile\mockpp_33\\IsNot_test.obj - c:\tmp\compile\mockpp_33\\IsNothing_test.obj - c:\tmp\compile\mockpp_33\\IsSame_test.obj - c:\tmp\compile\mockpp_33\\Or_test.obj - c:\tmp\compile\mockpp_33\\ReturnStub_test.obj - c:\tmp\compile\mockpp_33\\StringContains_test.obj - c:\tmp\compile\mockpp_33\\StringStartsWith_test.obj - c:\tmp\compile\mockpp_33\\StringEndsWith_test.obj - c:\tmp\compile\mockpp_33\\StubSequence_test.obj - c:\tmp\compile\mockpp_33\\TestFailureStub_test.obj - c:\tmp\compile\mockpp_33\\ThrowStub_test.obj - c:\tmp\compile\mockpp_33\\VoidStub_test.obj - c:\tmp\compile\mockpp_33\\CustomStub_test.obj - c:\tmp\compile\mockpp_33\\DefaultResultStub_test.obj - c:\tmp\compile\mockpp_33\\mock_test.obj - c:\tmp\compile\mockpp_33\\Invocation_test.obj - c:\tmp\compile\mockpp_33\\AnyArgumentsMatcher_test.obj - c:\tmp\compile\mockpp_33\\InvokedRecorder_test.obj - c:\tmp\compile\mockpp_33\\InvokeAtLeastOnceMatcher_test.obj - c:\tmp\compile\mockpp_33\\UnlimitedMatcher_test.obj - c:\tmp\compile\mockpp_33\\InvokeOnceMatcher_test.obj - c:\tmp\compile\mockpp_33\\InvokeCountMatcher_test.obj - c:\tmp\compile\mockpp_33\\InvokedAfterMatcher_test.obj - c:\tmp\compile\mockpp_33\\TestFailureMatcher_test.obj - c:\tmp\compile\mockpp_33\\NoArgumentsMatcher_test.obj - c:\tmp\compile\mockpp_33\\ArgumentsMatcher_test.obj - c:\tmp\compile\mockpp_33\\ConstraintSet_test.obj - c:\tmp\compile\mockpp_33\\ConstraintList_test.obj - c:\tmp\compile\mockpp_33\\ArgumentsMatchBuilder_test.obj - c:\tmp\compile\mockpp_33\\InvocationMockerBuilder_test.obj - c:\tmp\compile\mockpp_33\\AbstractDynamicChainingMock_test.obj - c:\tmp\compile\mockpp_33\\CoreMock_test.obj - c:\tmp\compile\mockpp_33\\DynamicChainingMockError_test.obj - c:\tmp\compile\mockpp_33\\FIFOInvocationDispatcher_test.obj - c:\tmp\compile\mockpp_33\\InvocationMocker_test.obj - c:\tmp\compile\mockpp_33\\LIFOInvocationDispatcher_test.obj - c:\tmp\compile\mockpp_33\\InvokeAtMostMatcher_test.obj - c:\tmp\compile\mockpp_33\\InvokedBeforeMatcher_test.obj - c:\tmp\compile\mockpp_33\\ChainableMockObject_1_void_test.obj - c:\tmp\compile\mockpp_33\\ChainableMockObject_2_test.obj - c:\tmp\compile\mockpp_33\\ChainableMockObject_2_void_test.obj - c:\tmp\compile\mockpp_33\\ChainableMockObject_3_test.obj - c:\tmp\compile\mockpp_33\\ChainableMockObject_3_void_test.obj - c:\tmp\compile\mockpp_33\\ChainableMockObject_4_test.obj - c:\tmp\compile\mockpp_33\\ChainableMockObject_4_void_test.obj - c:\tmp\compile\mockpp_33\\ChainableMockObject_5_test.obj - c:\tmp\compile\mockpp_33\\ChainableMockObject_5_void_test.obj - c:\tmp\compile\mockpp_33\\ChainableMockObjectPolymorphism_test.obj - c:\tmp\compile\mockpp_33\\ChainableMockObject_test.obj - c:\tmp\compile\mockpp_33\\ChainableMockObject_1_test.obj - c:\tmp\compile\mockpp_33\\MatchBuilder_test.obj - c:\tmp\compile\mockpp_33\\MockObject_test.obj - c:\tmp\compile\mockpp_33\\StubBuilder_test.obj - c:\tmp\compile\mockpp_33\\TypelessStubSequence_test.obj - c:\tmp\compile\mockpp_33\\ChainingMockObjectSupport_test.obj - c:\tmp\compile\mockpp_33\\mockpp_pti_test.obj - c:\tmp\compile\mockpp_33\\OutBound_test.obj - c:\tmp\compile\mockpp_33\\ChainableMockMethod_test.obj - c:\tmp\compile\mockpp_33\\ChainableMockMethod_1_test.obj + <OBJFILES value="c:\tmp\compile\mockpp_33\\AbstractInvocationDispatcher_test.obj + c:\tmp\compile\mockpp_33\\ChainingMockBuilder_test.obj + c:\tmp\compile\mockpp_33\\ChainableMockObject_void_test.obj + c:\tmp\compile\mockpp_33\\classes_ABCDE.obj + c:\tmp\compile\mockpp_33\\And_test.obj + c:\tmp\compile\mockpp_33\\IsAnything_test.obj + c:\tmp\compile\mockpp_33\\IsCloseTo_test.obj + c:\tmp\compile\mockpp_33\\IsEqual_test.obj + c:\tmp\compile\mockpp_33\\IsGreaterOrEqual_test.obj + c:\tmp\compile\mockpp_33\\IsGreaterThan_test.obj + c:\tmp\compile\mockpp_33\\IsInstanceOf_test.obj + c:\tmp\compile\mockpp_33\\IsLessOrEqual_test.obj + c:\tmp\compile\mockpp_33\\IsLessThan_test.obj + c:\tmp\compile\mockpp_33\\IsNot_test.obj + c:\tmp\compile\mockpp_33\\IsNothing_test.obj + c:\tmp\compile\mockpp_33\\IsSame_test.obj + c:\tmp\compile\mockpp_33\\Or_test.obj + c:\tmp\compile\mockpp_33\\ReturnStub_test.obj + c:\tmp\compile\mockpp_33\\StringContains_test.obj + c:\tmp\compile\mockpp_33\\StringStartsWith_test.obj + c:\tmp\compile\mockpp_33\\StringEndsWith_test.obj + c:\tmp\compile\mockpp_33\\StubSequence_test.obj + c:\tmp\compile\mockpp_33\\TestFailureStub_test.obj + c:\tmp\compile\mockpp_33\\ThrowStub_test.obj + c:\tmp\compile\mockpp_33\\VoidStub_test.obj + c:\tmp\compile\mockpp_33\\CustomStub_test.obj + c:\tmp\compile\mockpp_33\\DefaultResultStub_test.obj + c:\tmp\compile\mockpp_33\\mock_test.obj + c:\tmp\compile\mockpp_33\\Invocation_test.obj + c:\tmp\compile\mockpp_33\\AnyArgumentsMatcher_test.obj + c:\tmp\compile\mockpp_33\\InvokedRecorder_test.obj + c:\tmp\compile\mockpp_33\\InvokeAtLeastOnceMatcher_test.obj + c:\tmp\compile\mockpp_33\\UnlimitedMatcher_test.obj + c:\tmp\compile\mockpp_33\\InvokeOnceMatcher_test.obj + c:\tmp\compile\mockpp_33\\InvokeCountMatcher_test.obj + c:\tmp\compile\mockpp_33\\InvokedAfterMatcher_test.obj + c:\tmp\compile\mockpp_33\\TestFailureMatcher_test.obj + c:\tmp\compile\mockpp_33\\NoArgumentsMatcher_test.obj + c:\tmp\compile\mockpp_33\\ArgumentsMatcher_test.obj + c:\tmp\compile\mockpp_33\\ConstraintSet_test.obj + c:\tmp\compile\mockpp_33\\ConstraintList_test.obj + c:\tmp\compile\mockpp_33\\ArgumentsMatchBuilder_test.obj + c:\tmp\compile\mockpp_33\\InvocationMockerBuilder_test.obj + c:\tmp\compile\mockpp_33\\AbstractDynamicChainingMock_test.obj + c:\tmp\compile\mockpp_33\\CoreMock_test.obj + c:\tmp\compile\mockpp_33\\DynamicChainingMockError_test.obj + c:\tmp\compile\mockpp_33\\FIFOInvocationDispatcher_test.obj + c:\tmp\compile\mockpp_33\\InvocationMocker_test.obj + c:\tmp\compile\mockpp_33\\LIFOInvocationDispatcher_test.obj + c:\tmp\compile\mockpp_33\\InvokeAtMostMatcher_test.obj + c:\tmp\compile\mockpp_33\\InvokedBeforeMatcher_test.obj + c:\tmp\compile\mockpp_33\\ChainableMockObject_1_void_test.obj + c:\tmp\compile\mockpp_33\\ChainableMockObject_2_test.obj + c:\tmp\compile\mockpp_33\\ChainableMockObject_2_void_test.obj + c:\tmp\compile\mockpp_33\\ChainableMockObject_3_test.obj + c:\tmp\compile\mockpp_33\\ChainableMockObject_3_void_test.obj + c:\tmp\compile\mockpp_33\\ChainableMockObject_4_test.obj + c:\tmp\compile\mockpp_33\\ChainableMockObject_4_void_test.obj + c:\tmp\compile\mockpp_33\\ChainableMockObject_5_test.obj + c:\tmp\compile\mockpp_33\\ChainableMockObject_5_void_test.obj + c:\tmp\compile\mockpp_33\\ChainableMockObjectPolymorphism_test.obj + c:\tmp\compile\mockpp_33\\ChainableMockObject_test.obj + c:\tmp\compile\mockpp_33\\ChainableMockObject_1_test.obj + c:\tmp\compile\mockpp_33\\MatchBuilder_test.obj + c:\tmp\compile\mockpp_33\\MockObject_test.obj + c:\tmp\compile\mockpp_33\\StubBuilder_test.obj + c:\tmp\compile\mockpp_33\\TypelessStubSequence_test.obj + c:\tmp\compile\mockpp_33\\ChainingMockObjectSupport_test.obj + c:\tmp\compile\mockpp_33\\mockpp_pti_test.obj + c:\tmp\compile\mockpp_33\\OutBound_test.obj + c:\tmp\compile\mockpp_33\\ChainableMockMethod_test.obj + c:\tmp\compile\mockpp_33\\ChainableMockMethod_1_test.obj c:\tmp\compile\mockpp_33\\ChainableMockMethod_2_test.obj"/> <RESFILES value=""/> <IDLFILES value=""/> <IDLGENFILES value=""/> <DEFFILE value=""/> <RESDEPEN value="$(RESFILES)"/> - <LIBFILES value="c:\tmp\compile\mockpp.lib c:\tmp\compile\cppunit_1_10_bcb6.lib + <LIBFILES value="c:\tmp\compile\mockpp.lib c:\tmp\compile\cppunit_1_10_bcb6.lib C:\Programme\Borland\CBuilder6\Lib\stlpmt.lib"/> <LIBRARIES value=""/> <SPARELIBS value=""/> - <PACKAGES value="rtl.bpi vcl.bpi vclx.bpi bcbsmp.bpi qrpt.bpi dbrtl.bpi vcldb.bpi - bdertl.bpi ibsmp.bpi vcldbx.bpi teeui.bpi teedb.bpi tee.bpi teeqr.bpi - ibxpress.bpi bcbie.bpi vclie.bpi inetdb.bpi inet.bpi nmfast.bpi dclocx.bpi + <PACKAGES value="rtl.bpi vcl.bpi vclx.bpi bcbsmp.bpi qrpt.bpi dbrtl.bpi vcldb.bpi + bdertl.bpi ibsmp.bpi vcldbx.bpi teeui.bpi teedb.bpi tee.bpi teeqr.bpi + ibxpress.bpi bcbie.bpi vclie.bpi inetdb.bpi inet.bpi nmfast.bpi dclocx.bpi bcb2kaxserver.bpi"/> - <PATHCPP value=".;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests"/> + <PATHCPP value=".;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests;..\mockpp\tests"/> <PATHPAS value=".;"/> <PATHRC value=".;"/> <PATHASM value=".;"/> @@ -102,18 +102,18 @@ <MAINSOURCE value="jmock_test.bpf"/> <INCLUDEPATH value="..\tests;tests;C:\tests\;\\192.168.2.1\ewald\Documents\src\mockpp\mockpp\mockpp\tests;..\mockpp\tests;..\..\mockpp;$(BCB)\include;..\..\..\cppunit-1.10.2\include;"g:\data\src\cppunit-1.10.2\include\""/> <LIBPATH value="..\tests;tests;C:\tests\;\\192.168.2.1\ewald\Documents\src\mockpp\mockpp\mockpp\tests;..\mockpp\tests;..\mockpp\tests;$(BCB)\lib\obj;$(BCB)\lib"/> - <WARNINGS value="-w8092 -w8091 -w8090 -w8089 -w8087 -wprc -wuse -wucp -wstv -wstu -wsig + <WARNINGS value="-w8092 -w8091 -w8090 -w8089 -w8087 -wprc -wuse -wucp -wstv -wstu -wsig -wpin -wnod -wnak -wdef -wcln -wbbf -wasm -wamp -wamb"/> <OTHERFILES value=""/> </MACROS> <OPTIONS> - <IDLCFLAGS value="-src_suffix cpp -D__DLL___ -I..\tests -Itests -IC:\tests\. - -I\\192.168.2.1\ewald\Documents\src\mockpp\mockpp\mockpp\tests - -I..\mockpp\tests -I..\..\mockpp -I$(BCB)\include - -I..\..\..\cppunit-1.10.2\include -I"g:\data\src\cppunit-1.10.2\include\." + <IDLCFLAGS value="-src_suffix cpp -D__DLL___ -I..\tests -Itests -IC:\tests\. + -I\\192.168.2.1\ewald\Documents\src\mockpp\mockpp\mockpp\tests + -I..\mockpp\tests -I..\..\mockpp -I$(BCB)\include + -I..\..\..\cppunit-1.10.2\include -I"g:\data\src\cppunit-1.10.2\include\." -boa"/> <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_33\" -N0"c:\tmp\compile\mockpp_33\" -$YD -$W + <PFLAGS value="-N2"c:\tmp\compile\mockpp_33\" -N0"c:\tmp\compile\mockpp_33\" -$YD -$W -$O- -$A8 -v -JPHNE -M"/> <RFLAGS value=""/> <AFLAGS value="/mx /w2 /zd"/> |
From: Ewald A. <ewa...@us...> - 2005-11-19 14:16:46
|
Update of /cvsroot/mockpp/mockpp/mockpp/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6085/mockpp/tests Modified Files: VisitableMockMethod_test.cpp Log Message: fixes for bcb5 Index: VisitableMockMethod_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/VisitableMockMethod_test.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- VisitableMockMethod_test.cpp 15 Nov 2005 19:19:48 -0000 1.14 +++ VisitableMockMethod_test.cpp 19 Nov 2005 14:16:38 -0000 1.15 @@ -159,7 +159,14 @@ : mockpp::VisitableMockMethodBase(name, parent) {} +#if defined(__BORLANDC__) // ==> BCB5.5.1 ?? F1004 Internal compiler error at 0x12548c1 with base 0x1200000 + void throwAvailableException() const + { + mockpp::VisitableMockMethodBase::throwAvailableException(); + } +#else using mockpp::VisitableMockMethodBase::throwAvailableException; +#endif }; @@ -234,8 +241,20 @@ : mockpp::VisitableMockReturningMethodBase<T>(name, parent) {} +#if defined(__BORLANDC__) // ==> BCB5.5.1 ?? F1004 Internal compiler error at 0x12548c1 with base 0x1200000 + void throwAvailableException() const + { + mockpp::VisitableMockReturningMethodBase<T>::throwAvailableException(); + } + + T determineReturnValue() const + { + return mockpp::VisitableMockReturningMethodBase<T>::determineReturnValue(); + } +#else using mockpp::VisitableMockReturningMethodBase<T>::throwAvailableException; using mockpp::VisitableMockReturningMethodBase<T>::determineReturnValue; +#endif }; |
From: Ewald A. <ewa...@us...> - 2005-11-19 14:16:46
|
Update of /cvsroot/mockpp/mockpp/mockpp/production In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6085/mockpp/production Modified Files: TimeServer.cpp Log Message: fixes for bcb5 Index: TimeServer.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/production/TimeServer.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- TimeServer.cpp 30 Oct 2005 20:42:29 -0000 1.5 +++ TimeServer.cpp 19 Nov 2005 14:16:38 -0000 1.6 @@ -55,3 +55,4 @@ + |
From: Ewald A. <ewa...@us...> - 2005-11-19 14:16:45
|
Update of /cvsroot/mockpp/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6085 Modified Files: mockpp.kdevelop Log Message: fixes for bcb5 Index: mockpp.kdevelop =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp.kdevelop,v retrieving revision 1.79 retrieving revision 1.80 diff -u -d -r1.79 -r1.80 --- mockpp.kdevelop 13 Nov 2005 11:53:18 -0000 1.79 +++ mockpp.kdevelop 19 Nov 2005 14:16:38 -0000 1.80 @@ -212,7 +212,7 @@ <hidenonlocation>true</hidenonlocation> </groups> <tree> - <hidepatterns>*.o,*.lo,CVS,*~*,*.bak</hidepatterns> + <hidepatterns>*.o,*.lo,CVS,*~*,*.bak,*.BAK</hidepatterns> <hidenonprojectfiles>false</hidenonprojectfiles> <showvcsfields>false</showvcsfields> </tree> |
From: Ewald A. <ewa...@us...> - 2005-11-19 14:15:14
|
Update of /cvsroot/mockpp/mockpp/mockpp/docs/en In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5881/mockpp/docs/en Modified Files: dev_advanced_intro.docbook Log Message: update Index: dev_advanced_intro.docbook =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/docs/en/dev_advanced_intro.docbook,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- dev_advanced_intro.docbook 18 Nov 2005 21:43:45 -0000 1.6 +++ dev_advanced_intro.docbook 19 Nov 2005 14:15:07 -0000 1.7 @@ -142,8 +142,7 @@ <itemizedlist> <listitem>Derive from the interface class and the according mock object class.</listitem> - <listitem>Add the methods and their internal variables with one of the predefined - pair of macros.</listitem> + <listitem>Add the methods and their potential internal variables.</listitem> <listitem>Use one of the available methods to construct a helper object to set up the detailed behaviour.</listitem> </itemizedlist> @@ -170,7 +169,7 @@ <listitem><para>The newer and recommended approach with the help of mock methods. The methods are templates which wrap the method under test. Since they are fully - accessible in constrast to a macro they are easier to use and better to debug.</para> + accessible in constrast to an obscure macro they are easier to use and better to debug.</para> <para>For both the Visitable and the Chainable types there are sets of templates for mock methods according to the number of parameters the method under test takes. @@ -195,6 +194,15 @@ </listitem> </itemizedlist> + <para>There is another point to keep in mind when choosing either the macros or the + templates. There are only macros available for up to five parameters. Extending this + number probably results + in a lot of coding and debugging. The templates on the other hand are generated by several + scripts. The standard distribution supports up to 6 parameters. If you need more you only + have to invoke <filename>gen_files_N.sh</filename> in the top level directory of the + source distribution. Supply the maximal number of parameters you need and all the header + files are generated.</para> + </sect3> <sect3 id="choosing_macro"> |
From: Ewald A. <ewa...@us...> - 2005-11-19 09:18:49
|
Update of /cvsroot/mockpp/mockpp/mockpp/chaining In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11576/mockpp/chaining Modified Files: gen_chainablemethod_N.pl ChainableMockMethod6.h ChainableMockMethod5.h ChainableMockMethod4.h ChainableMockMethod3.h ChainableMockMethod2.h ChainableMockMethod1.h ChainableMockMethod0.h Log Message: fix warnings with gcc-3.3 Index: ChainableMockMethod6.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/ChainableMockMethod6.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- ChainableMockMethod6.h 18 Nov 2005 08:49:17 -0000 1.7 +++ ChainableMockMethod6.h 19 Nov 2005 09:18:40 -0000 1.8 @@ -44,26 +44,26 @@ * @ingroup grp_chainer * @internal */ -template <typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6> +template <typename RT, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6> class ChainableMockMethod6Common - : public ChainableMockMethodCommon<R> - , public ChainingMockBuilder <ArgumentsMatchBuilder6<R, Invocation6<P1, P2, P3, P4, P5, P6> > > + : public ChainableMockMethodCommon<RT> + , public ChainingMockBuilder <ArgumentsMatchBuilder6<RT, Invocation6<P1, P2, P3, P4, P5, P6> > > { public: typedef Invocation6<P1, P2, P3, P4, P5, P6> InvocationType; - typedef CoreMock<R, InvocationType> CoreMockType; - typedef R ReturnType; + typedef CoreMock<RT, InvocationType> CoreMockType; + typedef RT ReturnType; typedef ChainingMockBuilder <ArgumentsMatchBuilder6<ReturnType, InvocationType> > Builder; - /** Constructs the mock object. + /** Constructs the mock object. * @param name human readable description about the expectation * @param parent parent chainable mock object */ ChainableMockMethod6Common(const String &name, ChainableMockObject *parent ) - : ChainableMockMethodCommon<R>(name, parent) + : ChainableMockMethodCommon<RT>(name, parent) , Builder(&coremock, this->getChainableMockObject(), this->getMethodName()) , coremock(name + MOCKPP_PCHAR("/coreMock"), this) { @@ -88,32 +88,34 @@ /** Set up a chainable mock method expectations with 6 parameters. * @ingroup grp_chainer */ -template <typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6> +template <typename RT, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6> class ChainableMockMethod6 - : public ChainableMockMethod6Common<R, P1, P2, P3, P4, P5, P6> + : public ChainableMockMethod6Common<RT, P1, P2, P3, P4, P5, P6> { public: - typedef typename ChainableMockMethod6Common<R, P1, P2, P3, P4, P5, P6>::InvocationType InvocationType; + typedef typename ChainableMockMethod6Common<RT, P1, P2, P3, P4, P5, P6>::InvocationType InvocationType; /** Constructs the mock object. * @param name human readable description about the expectation * @param parent parent chainable mock object */ ChainableMockMethod6(const String &name, ChainableMockObject *parent ) - : ChainableMockMethod6Common<R, P1, P2, P3, P4, P5, P6>(name, parent) + : ChainableMockMethod6Common<RT, P1, P2, P3, P4, P5, P6>(name, parent) { } - /** Actually verifies the mocked method. Must be called by the client code. + /** Actually verifies the mocked method. + * Must be called by the client code. * @param p1 mock method parameter 1 * @param p2 mock method parameter 2 * @param p3 mock method parameter 3 * @param p4 mock method parameter 4 * @param p5 mock method parameter 5 * @param p6 mock method parameter 6 + * @return the calculated value */ - R forward(const P1 &p1, const P2 &p2, const P3 &p3, const P4 &p4, const P5 &p5, const P6 &p6) const + RT forward(const P1 &p1, const P2 &p2, const P3 &p3, const P4 &p4, const P5 &p5, const P6 &p6) const { InvocationType inv(this->getMethodName(), p1, p2, p3, p4, p5, p6); return this->getCoreMock().invoke(inv); @@ -142,7 +144,8 @@ { } - /** Actually verifies the mocked method. Must be called by the client code. + /** Actually verifies the mocked method. + * Must be called by the client code. * @param p1 mock method parameter 1 * @param p2 mock method parameter 2 * @param p3 mock method parameter 3 Index: ChainableMockMethod2.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/ChainableMockMethod2.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- ChainableMockMethod2.h 18 Nov 2005 08:49:17 -0000 1.9 +++ ChainableMockMethod2.h 19 Nov 2005 09:18:40 -0000 1.10 @@ -44,26 +44,26 @@ * @ingroup grp_chainer * @internal */ -template <typename R, typename P1, typename P2> +template <typename RT, typename P1, typename P2> class ChainableMockMethod2Common - : public ChainableMockMethodCommon<R> - , public ChainingMockBuilder <ArgumentsMatchBuilder2<R, Invocation2<P1, P2> > > + : public ChainableMockMethodCommon<RT> + , public ChainingMockBuilder <ArgumentsMatchBuilder2<RT, Invocation2<P1, P2> > > { public: typedef Invocation2<P1, P2> InvocationType; - typedef CoreMock<R, InvocationType> CoreMockType; - typedef R ReturnType; + typedef CoreMock<RT, InvocationType> CoreMockType; + typedef RT ReturnType; typedef ChainingMockBuilder <ArgumentsMatchBuilder2<ReturnType, InvocationType> > Builder; - /** Constructs the mock object. + /** Constructs the mock object. * @param name human readable description about the expectation * @param parent parent chainable mock object */ ChainableMockMethod2Common(const String &name, ChainableMockObject *parent ) - : ChainableMockMethodCommon<R>(name, parent) + : ChainableMockMethodCommon<RT>(name, parent) , Builder(&coremock, this->getChainableMockObject(), this->getMethodName()) , coremock(name + MOCKPP_PCHAR("/coreMock"), this) { @@ -88,28 +88,30 @@ /** Set up a chainable mock method expectations with 2 parameters. * @ingroup grp_chainer */ -template <typename R, typename P1, typename P2> +template <typename RT, typename P1, typename P2> class ChainableMockMethod2 - : public ChainableMockMethod2Common<R, P1, P2> + : public ChainableMockMethod2Common<RT, P1, P2> { public: - typedef typename ChainableMockMethod2Common<R, P1, P2>::InvocationType InvocationType; + typedef typename ChainableMockMethod2Common<RT, P1, P2>::InvocationType InvocationType; /** Constructs the mock object. * @param name human readable description about the expectation * @param parent parent chainable mock object */ ChainableMockMethod2(const String &name, ChainableMockObject *parent ) - : ChainableMockMethod2Common<R, P1, P2>(name, parent) + : ChainableMockMethod2Common<RT, P1, P2>(name, parent) { } - /** Actually verifies the mocked method. Must be called by the client code. + /** Actually verifies the mocked method. + * Must be called by the client code. * @param p1 mock method parameter 1 * @param p2 mock method parameter 2 + * @return the calculated value */ - R forward(const P1 &p1, const P2 &p2) const + RT forward(const P1 &p1, const P2 &p2) const { InvocationType inv(this->getMethodName(), p1, p2); return this->getCoreMock().invoke(inv); @@ -138,7 +140,8 @@ { } - /** Actually verifies the mocked method. Must be called by the client code. + /** Actually verifies the mocked method. + * Must be called by the client code. * @param p1 mock method parameter 1 * @param p2 mock method parameter 2 */ Index: ChainableMockMethod3.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/ChainableMockMethod3.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- ChainableMockMethod3.h 18 Nov 2005 08:49:17 -0000 1.9 +++ ChainableMockMethod3.h 19 Nov 2005 09:18:40 -0000 1.10 @@ -44,26 +44,26 @@ * @ingroup grp_chainer * @internal */ -template <typename R, typename P1, typename P2, typename P3> +template <typename RT, typename P1, typename P2, typename P3> class ChainableMockMethod3Common - : public ChainableMockMethodCommon<R> - , public ChainingMockBuilder <ArgumentsMatchBuilder3<R, Invocation3<P1, P2, P3> > > + : public ChainableMockMethodCommon<RT> + , public ChainingMockBuilder <ArgumentsMatchBuilder3<RT, Invocation3<P1, P2, P3> > > { public: typedef Invocation3<P1, P2, P3> InvocationType; - typedef CoreMock<R, InvocationType> CoreMockType; - typedef R ReturnType; + typedef CoreMock<RT, InvocationType> CoreMockType; + typedef RT ReturnType; typedef ChainingMockBuilder <ArgumentsMatchBuilder3<ReturnType, InvocationType> > Builder; - /** Constructs the mock object. + /** Constructs the mock object. * @param name human readable description about the expectation * @param parent parent chainable mock object */ ChainableMockMethod3Common(const String &name, ChainableMockObject *parent ) - : ChainableMockMethodCommon<R>(name, parent) + : ChainableMockMethodCommon<RT>(name, parent) , Builder(&coremock, this->getChainableMockObject(), this->getMethodName()) , coremock(name + MOCKPP_PCHAR("/coreMock"), this) { @@ -88,29 +88,31 @@ /** Set up a chainable mock method expectations with 3 parameters. * @ingroup grp_chainer */ -template <typename R, typename P1, typename P2, typename P3> +template <typename RT, typename P1, typename P2, typename P3> class ChainableMockMethod3 - : public ChainableMockMethod3Common<R, P1, P2, P3> + : public ChainableMockMethod3Common<RT, P1, P2, P3> { public: - typedef typename ChainableMockMethod3Common<R, P1, P2, P3>::InvocationType InvocationType; + typedef typename ChainableMockMethod3Common<RT, P1, P2, P3>::InvocationType InvocationType; /** Constructs the mock object. * @param name human readable description about the expectation * @param parent parent chainable mock object */ ChainableMockMethod3(const String &name, ChainableMockObject *parent ) - : ChainableMockMethod3Common<R, P1, P2, P3>(name, parent) + : ChainableMockMethod3Common<RT, P1, P2, P3>(name, parent) { } - /** Actually verifies the mocked method. Must be called by the client code. + /** Actually verifies the mocked method. + * Must be called by the client code. * @param p1 mock method parameter 1 * @param p2 mock method parameter 2 * @param p3 mock method parameter 3 + * @return the calculated value */ - R forward(const P1 &p1, const P2 &p2, const P3 &p3) const + RT forward(const P1 &p1, const P2 &p2, const P3 &p3) const { InvocationType inv(this->getMethodName(), p1, p2, p3); return this->getCoreMock().invoke(inv); @@ -139,7 +141,8 @@ { } - /** Actually verifies the mocked method. Must be called by the client code. + /** Actually verifies the mocked method. + * Must be called by the client code. * @param p1 mock method parameter 1 * @param p2 mock method parameter 2 * @param p3 mock method parameter 3 Index: ChainableMockMethod4.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/ChainableMockMethod4.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- ChainableMockMethod4.h 18 Nov 2005 08:49:17 -0000 1.9 +++ ChainableMockMethod4.h 19 Nov 2005 09:18:40 -0000 1.10 @@ -44,26 +44,26 @@ * @ingroup grp_chainer * @internal */ -template <typename R, typename P1, typename P2, typename P3, typename P4> +template <typename RT, typename P1, typename P2, typename P3, typename P4> class ChainableMockMethod4Common - : public ChainableMockMethodCommon<R> - , public ChainingMockBuilder <ArgumentsMatchBuilder4<R, Invocation4<P1, P2, P3, P4> > > + : public ChainableMockMethodCommon<RT> + , public ChainingMockBuilder <ArgumentsMatchBuilder4<RT, Invocation4<P1, P2, P3, P4> > > { public: typedef Invocation4<P1, P2, P3, P4> InvocationType; - typedef CoreMock<R, InvocationType> CoreMockType; - typedef R ReturnType; + typedef CoreMock<RT, InvocationType> CoreMockType; + typedef RT ReturnType; typedef ChainingMockBuilder <ArgumentsMatchBuilder4<ReturnType, InvocationType> > Builder; - /** Constructs the mock object. + /** Constructs the mock object. * @param name human readable description about the expectation * @param parent parent chainable mock object */ ChainableMockMethod4Common(const String &name, ChainableMockObject *parent ) - : ChainableMockMethodCommon<R>(name, parent) + : ChainableMockMethodCommon<RT>(name, parent) , Builder(&coremock, this->getChainableMockObject(), this->getMethodName()) , coremock(name + MOCKPP_PCHAR("/coreMock"), this) { @@ -88,30 +88,32 @@ /** Set up a chainable mock method expectations with 4 parameters. * @ingroup grp_chainer */ -template <typename R, typename P1, typename P2, typename P3, typename P4> +template <typename RT, typename P1, typename P2, typename P3, typename P4> class ChainableMockMethod4 - : public ChainableMockMethod4Common<R, P1, P2, P3, P4> + : public ChainableMockMethod4Common<RT, P1, P2, P3, P4> { public: - typedef typename ChainableMockMethod4Common<R, P1, P2, P3, P4>::InvocationType InvocationType; + typedef typename ChainableMockMethod4Common<RT, P1, P2, P3, P4>::InvocationType InvocationType; /** Constructs the mock object. * @param name human readable description about the expectation * @param parent parent chainable mock object */ ChainableMockMethod4(const String &name, ChainableMockObject *parent ) - : ChainableMockMethod4Common<R, P1, P2, P3, P4>(name, parent) + : ChainableMockMethod4Common<RT, P1, P2, P3, P4>(name, parent) { } - /** Actually verifies the mocked method. Must be called by the client code. + /** Actually verifies the mocked method. + * Must be called by the client code. * @param p1 mock method parameter 1 * @param p2 mock method parameter 2 * @param p3 mock method parameter 3 * @param p4 mock method parameter 4 + * @return the calculated value */ - R forward(const P1 &p1, const P2 &p2, const P3 &p3, const P4 &p4) const + RT forward(const P1 &p1, const P2 &p2, const P3 &p3, const P4 &p4) const { InvocationType inv(this->getMethodName(), p1, p2, p3, p4); return this->getCoreMock().invoke(inv); @@ -140,7 +142,8 @@ { } - /** Actually verifies the mocked method. Must be called by the client code. + /** Actually verifies the mocked method. + * Must be called by the client code. * @param p1 mock method parameter 1 * @param p2 mock method parameter 2 * @param p3 mock method parameter 3 Index: ChainableMockMethod0.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/ChainableMockMethod0.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- ChainableMockMethod0.h 18 Nov 2005 08:49:17 -0000 1.9 +++ ChainableMockMethod0.h 19 Nov 2005 09:18:40 -0000 1.10 @@ -44,26 +44,26 @@ * @ingroup grp_chainer * @internal */ -template <typename R> +template <typename RT> class ChainableMockMethod0Common - : public ChainableMockMethodCommon<R> - , public ChainingMockBuilder <ArgumentsMatchBuilder0<R, Invocation0> > + : public ChainableMockMethodCommon<RT> + , public ChainingMockBuilder <ArgumentsMatchBuilder0<RT, Invocation0> > { public: typedef Invocation0 InvocationType; - typedef CoreMock<R, InvocationType> CoreMockType; - typedef R ReturnType; + typedef CoreMock<RT, InvocationType> CoreMockType; + typedef RT ReturnType; typedef ChainingMockBuilder <ArgumentsMatchBuilder0<ReturnType, InvocationType> > Builder; - /** Constructs the mock object. + /** Constructs the mock object. * @param name human readable description about the expectation * @param parent parent chainable mock object */ ChainableMockMethod0Common(const String &name, ChainableMockObject *parent ) - : ChainableMockMethodCommon<R>(name, parent) + : ChainableMockMethodCommon<RT>(name, parent) , Builder(&coremock, this->getChainableMockObject(), this->getMethodName()) , coremock(name + MOCKPP_PCHAR("/coreMock"), this) { @@ -88,26 +88,28 @@ /** Set up a chainable mock method expectations with 0 parameters. * @ingroup grp_chainer */ -template <typename R> +template <typename RT> class ChainableMockMethod0 - : public ChainableMockMethod0Common<R> + : public ChainableMockMethod0Common<RT> { public: - typedef typename ChainableMockMethod0Common<R>::InvocationType InvocationType; + typedef typename ChainableMockMethod0Common<RT>::InvocationType InvocationType; /** Constructs the mock object. * @param name human readable description about the expectation * @param parent parent chainable mock object */ ChainableMockMethod0(const String &name, ChainableMockObject *parent ) - : ChainableMockMethod0Common<R>(name, parent) + : ChainableMockMethod0Common<RT>(name, parent) { } - /** Actually verifies the mocked method. Must be called by the client code. + /** Actually verifies the mocked method. + * Must be called by the client code. + * @return the calculated value */ - R forward() const + RT forward() const { InvocationType inv(this->getMethodName()); return this->getCoreMock().invoke(inv); @@ -136,7 +138,8 @@ { } - /** Actually verifies the mocked method. Must be called by the client code. + /** Actually verifies the mocked method. + * Must be called by the client code. */ void forward() const { Index: ChainableMockMethod5.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/ChainableMockMethod5.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- ChainableMockMethod5.h 18 Nov 2005 08:49:17 -0000 1.9 +++ ChainableMockMethod5.h 19 Nov 2005 09:18:40 -0000 1.10 @@ -44,26 +44,26 @@ * @ingroup grp_chainer * @internal */ -template <typename R, typename P1, typename P2, typename P3, typename P4, typename P5> +template <typename RT, typename P1, typename P2, typename P3, typename P4, typename P5> class ChainableMockMethod5Common - : public ChainableMockMethodCommon<R> - , public ChainingMockBuilder <ArgumentsMatchBuilder5<R, Invocation5<P1, P2, P3, P4, P5> > > + : public ChainableMockMethodCommon<RT> + , public ChainingMockBuilder <ArgumentsMatchBuilder5<RT, Invocation5<P1, P2, P3, P4, P5> > > { public: typedef Invocation5<P1, P2, P3, P4, P5> InvocationType; - typedef CoreMock<R, InvocationType> CoreMockType; - typedef R ReturnType; + typedef CoreMock<RT, InvocationType> CoreMockType; + typedef RT ReturnType; typedef ChainingMockBuilder <ArgumentsMatchBuilder5<ReturnType, InvocationType> > Builder; - /** Constructs the mock object. + /** Constructs the mock object. * @param name human readable description about the expectation * @param parent parent chainable mock object */ ChainableMockMethod5Common(const String &name, ChainableMockObject *parent ) - : ChainableMockMethodCommon<R>(name, parent) + : ChainableMockMethodCommon<RT>(name, parent) , Builder(&coremock, this->getChainableMockObject(), this->getMethodName()) , coremock(name + MOCKPP_PCHAR("/coreMock"), this) { @@ -88,31 +88,33 @@ /** Set up a chainable mock method expectations with 5 parameters. * @ingroup grp_chainer */ -template <typename R, typename P1, typename P2, typename P3, typename P4, typename P5> +template <typename RT, typename P1, typename P2, typename P3, typename P4, typename P5> class ChainableMockMethod5 - : public ChainableMockMethod5Common<R, P1, P2, P3, P4, P5> + : public ChainableMockMethod5Common<RT, P1, P2, P3, P4, P5> { public: - typedef typename ChainableMockMethod5Common<R, P1, P2, P3, P4, P5>::InvocationType InvocationType; + typedef typename ChainableMockMethod5Common<RT, P1, P2, P3, P4, P5>::InvocationType InvocationType; /** Constructs the mock object. * @param name human readable description about the expectation * @param parent parent chainable mock object */ ChainableMockMethod5(const String &name, ChainableMockObject *parent ) - : ChainableMockMethod5Common<R, P1, P2, P3, P4, P5>(name, parent) + : ChainableMockMethod5Common<RT, P1, P2, P3, P4, P5>(name, parent) { } - /** Actually verifies the mocked method. Must be called by the client code. + /** Actually verifies the mocked method. + * Must be called by the client code. * @param p1 mock method parameter 1 * @param p2 mock method parameter 2 * @param p3 mock method parameter 3 * @param p4 mock method parameter 4 * @param p5 mock method parameter 5 + * @return the calculated value */ - R forward(const P1 &p1, const P2 &p2, const P3 &p3, const P4 &p4, const P5 &p5) const + RT forward(const P1 &p1, const P2 &p2, const P3 &p3, const P4 &p4, const P5 &p5) const { InvocationType inv(this->getMethodName(), p1, p2, p3, p4, p5); return this->getCoreMock().invoke(inv); @@ -141,7 +143,8 @@ { } - /** Actually verifies the mocked method. Must be called by the client code. + /** Actually verifies the mocked method. + * Must be called by the client code. * @param p1 mock method parameter 1 * @param p2 mock method parameter 2 * @param p3 mock method parameter 3 Index: gen_chainablemethod_N.pl =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/gen_chainablemethod_N.pl,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- gen_chainablemethod_N.pl 18 Nov 2005 08:49:17 -0000 1.6 +++ gen_chainablemethod_N.pl 19 Nov 2005 09:18:39 -0000 1.7 @@ -170,19 +170,19 @@ * \@ingroup grp_chainer * \@internal */ -template <typename R" . $templateParms_colon . "> +template <typename RT" . $templateParms_colon . "> class ChainableMockMethod" . $numArgs . "Common - : public ChainableMockMethodCommon<R>"; + : public ChainableMockMethodCommon<RT>"; if ($numArgs > 0) { print OUT " - , public ChainingMockBuilder <ArgumentsMatchBuilder" . $numArgs . "<R, Invocation" . $numArgs . "<" . $templateArgs . "> > >"; + , public ChainingMockBuilder <ArgumentsMatchBuilder" . $numArgs . "<RT, Invocation" . $numArgs . "<" . $templateArgs . "> > >"; } else { print OUT " - , public ChainingMockBuilder <ArgumentsMatchBuilder0<R, Invocation0> >"; + , public ChainingMockBuilder <ArgumentsMatchBuilder0<RT, Invocation0> >"; } print OUT " @@ -203,17 +203,17 @@ print OUT " - typedef CoreMock<R, InvocationType> CoreMockType; - typedef R ReturnType; + typedef CoreMock<RT, InvocationType> CoreMockType; + typedef RT ReturnType; typedef ChainingMockBuilder <ArgumentsMatchBuilder" . $numArgs . "<ReturnType, InvocationType> > Builder; - /** Constructs the mock object. + /** Constructs the mock object. * \@param name human readable description about the expectation * \@param parent parent chainable mock object */ ChainableMockMethod" . $numArgs . "Common(const String &name, ChainableMockObject *parent ) - : ChainableMockMethodCommon<R>(name, parent) + : ChainableMockMethodCommon<RT>(name, parent) , Builder(&coremock, this->getChainableMockObject(), this->getMethodName()) , coremock(name + MOCKPP_PCHAR(\"/coreMock\"), this) { @@ -238,31 +238,33 @@ /** Set up a chainable mock method expectations with " . $numArgs . " parameters. * \@ingroup grp_chainer */ -template <typename R" . $templateParms_colon . "> +template <typename RT" . $templateParms_colon . "> class ChainableMockMethod" . $numArgs . " - : public ChainableMockMethod" . $numArgs . "Common<R" . $templateArgs_colon . "> + : public ChainableMockMethod" . $numArgs . "Common<RT" . $templateArgs_colon . "> { public: - typedef typename ChainableMockMethod" . $numArgs . "Common<R" . $templateArgs_colon . ">::InvocationType InvocationType; + typedef typename ChainableMockMethod" . $numArgs . "Common<RT" . $templateArgs_colon . ">::InvocationType InvocationType; /** Constructs the mock object. * \@param name human readable description about the expectation * \@param parent parent chainable mock object */ ChainableMockMethod" . $numArgs . "(const String &name, ChainableMockObject *parent ) - : ChainableMockMethod" . $numArgs . "Common<R" . $templateArgs_colon . ">(name, parent) + : ChainableMockMethod" . $numArgs . "Common<RT" . $templateArgs_colon . ">(name, parent) { } - /** Actually verifies the mocked method. Must be called by the client code."; + /** Actually verifies the mocked method. + * Must be called by the client code."; for($p = 1; $p <= $numArgs; ++$p) { print OUT " * \@param p" . $p . " mock method parameter " . $p; } print OUT " + * \@return the calculated value */ - R forward(" . $parms . ") const + RT forward(" . $parms . ") const { InvocationType inv(this->getMethodName()" . $args_colon . "); return this->getCoreMock().invoke(inv); @@ -303,7 +305,8 @@ { } - /** Actually verifies the mocked method. Must be called by the client code."; + /** Actually verifies the mocked method. + * Must be called by the client code."; for($p = 1; $p <= $numArgs; ++$p) { print OUT " * \@param p" . $p . " mock method parameter " . $p; } Index: ChainableMockMethod1.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/ChainableMockMethod1.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- ChainableMockMethod1.h 18 Nov 2005 08:49:17 -0000 1.9 +++ ChainableMockMethod1.h 19 Nov 2005 09:18:40 -0000 1.10 @@ -44,26 +44,26 @@ * @ingroup grp_chainer * @internal */ -template <typename R, typename P1> +template <typename RT, typename P1> class ChainableMockMethod1Common - : public ChainableMockMethodCommon<R> - , public ChainingMockBuilder <ArgumentsMatchBuilder1<R, Invocation1<P1> > > + : public ChainableMockMethodCommon<RT> + , public ChainingMockBuilder <ArgumentsMatchBuilder1<RT, Invocation1<P1> > > { public: typedef Invocation1<P1> InvocationType; - typedef CoreMock<R, InvocationType> CoreMockType; - typedef R ReturnType; + typedef CoreMock<RT, InvocationType> CoreMockType; + typedef RT ReturnType; typedef ChainingMockBuilder <ArgumentsMatchBuilder1<ReturnType, InvocationType> > Builder; - /** Constructs the mock object. + /** Constructs the mock object. * @param name human readable description about the expectation * @param parent parent chainable mock object */ ChainableMockMethod1Common(const String &name, ChainableMockObject *parent ) - : ChainableMockMethodCommon<R>(name, parent) + : ChainableMockMethodCommon<RT>(name, parent) , Builder(&coremock, this->getChainableMockObject(), this->getMethodName()) , coremock(name + MOCKPP_PCHAR("/coreMock"), this) { @@ -88,27 +88,29 @@ /** Set up a chainable mock method expectations with 1 parameters. * @ingroup grp_chainer */ -template <typename R, typename P1> +template <typename RT, typename P1> class ChainableMockMethod1 - : public ChainableMockMethod1Common<R, P1> + : public ChainableMockMethod1Common<RT, P1> { public: - typedef typename ChainableMockMethod1Common<R, P1>::InvocationType InvocationType; + typedef typename ChainableMockMethod1Common<RT, P1>::InvocationType InvocationType; /** Constructs the mock object. * @param name human readable description about the expectation * @param parent parent chainable mock object */ ChainableMockMethod1(const String &name, ChainableMockObject *parent ) - : ChainableMockMethod1Common<R, P1>(name, parent) + : ChainableMockMethod1Common<RT, P1>(name, parent) { } - /** Actually verifies the mocked method. Must be called by the client code. + /** Actually verifies the mocked method. + * Must be called by the client code. * @param p1 mock method parameter 1 + * @return the calculated value */ - R forward(const P1 &p1) const + RT forward(const P1 &p1) const { InvocationType inv(this->getMethodName(), p1); return this->getCoreMock().invoke(inv); @@ -137,7 +139,8 @@ { } - /** Actually verifies the mocked method. Must be called by the client code. + /** Actually verifies the mocked method. + * Must be called by the client code. * @param p1 mock method parameter 1 */ void forward(const P1 &p1) const |
From: Ewald A. <ewa...@us...> - 2005-11-18 21:44:41
|
Update of /cvsroot/mockpp/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv402 Modified Files: mockpp.doxygen.in Log Message: update Index: mockpp.doxygen.in =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp.doxygen.in,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- mockpp.doxygen.in 30 Oct 2005 19:35:58 -0000 1.18 +++ mockpp.doxygen.in 18 Nov 2005 21:44:33 -0000 1.19 @@ -270,7 +270,7 @@ # to NO (the default) then the documentation will be excluded. # Set it to YES to include the internal documentation. -INTERNAL_DOCS = YES +INTERNAL_DOCS = NO # If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate # file names in lower-case letters. If set to YES upper-case letters are also |
From: Ewald A. <ewa...@us...> - 2005-11-18 21:43:53
|
Update of /cvsroot/mockpp/mockpp/mockpp/docs/en In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32719/mockpp/docs/en Modified Files: dev_advanced_intro.docbook Log Message: update Index: dev_advanced_intro.docbook =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/docs/en/dev_advanced_intro.docbook,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- dev_advanced_intro.docbook 3 Jan 2005 11:10:14 -0000 1.5 +++ dev_advanced_intro.docbook 18 Nov 2005 21:43:45 -0000 1.6 @@ -133,42 +133,68 @@ <para>More detailed explanations follow in later chapters.</para> +</sect3> + +<sect3 id="setup_behaviour"> +<title>How To Set Up Behaviour</title> + <para>The basic principle for the use of these classes is the same for both methods: <itemizedlist> <listitem>Derive from the interface class and the according mock object class.</listitem> <listitem>Add the methods and their internal variables with one of the predefined pair of macros.</listitem> - <listitem>Use one of the according macros to construct a helperobject + <listitem>Use one of the available methods to construct a helper object to set up the detailed behaviour.</listitem> </itemizedlist> </para> -<para> -<warning> - <title>But let me warn you:</title> - <para> - If you take the wrong macro or maybe just have a small typo you will get loads - of error messages all pointing to the same line. You might have no idea where to start - and search the problem. I strongly recommend to take little steps when setting - up such objects: add one single method and compile. - Continue only if it compiled flawlessly. - </para> +There are two standard ways to set up the behaviour of advanced mock objects. - <para>This warning shouldn't scare you away. It isn't really that complicated and - once you have - understood the working method of the macros you may have understood half - of &mockpp;. To get started I recommend to use the "recipies" below.</para> -</warning> +<itemizedlist> + <listitem><para>The traditional way using macros which implement everything behind the + scenes and an additional helper object which controls these helper objects.</para> -<para>If you want to have an overview what is created behind the scenes, look at -<filename>chainable-template.h</filename> and -<filename>visitable-template.h</filename> which contain example classes with some methods. -They were preprocessed, automatically indented and are quite readable. -This knowledge might become useful when you need to find out more about the referenced objects -and their internal helper variables when runtime errors occur.</para> + <para>But caution: if you take the wrong macro or maybe just have a small typo you will get loads + of error messages all pointing to the same line. I strongly recommend to take little steps when setting + up such objects: add one single method and compile. To get started I recommend to + use the "recipies" below.</para> + + <para>If you want to have an overview what is created behind the scenes, look at + <filename>chainable-template.h</filename> and + <filename>visitable-template.h</filename> which contain example classes with some methods. + They were preprocessed, automatically indented and are quite readable. + This knowledge might become useful when you need to find out more about the referenced objects + and their internal helper variables when runtime errors occur.</para> + </listitem> + + <listitem><para>The newer and recommended approach with the help of mock methods. + The methods are templates which wrap the method under test. Since they are fully + accessible in constrast to a macro they are easier to use and better to debug.</para> + + <para>For both the Visitable and the Chainable types there are sets of templates + for mock methods according to the number of parameters the method under test takes. + But most of + the current compilers support a short hand version which selects the needed + template automatically.</para> + + <para>So the following lines are equivalent: + + <programlisting> + + mockpp::VisitableMockMethod0<void> mmv0(MOCKPP_PCHAR("mm0"), 0); + mockpp::VisitableMockMethod1<void, int> mmv1(MOCKPP_PCHAR("mm1"), 0); + mockpp::VisitableMockMethod2<void, int, int> mmv2(MOCKPP_PCHAR("mm2"), 0); + + mockpp::VisitableMockMethod<void> mmvd0(MOCKPP_PCHAR("mm0"), 0); + mockpp::VisitableMockMethod<void, int> mmvd1(MOCKPP_PCHAR("mm1"), 0); + mockpp::VisitableMockMethod<void, int, int> mmvd2(MOCKPP_PCHAR("mm2"), 0); + </programlisting> + + </para> + </listitem> +</itemizedlist> -</para> </sect3> <sect3 id="choosing_macro"> |
From: Ewald A. <ewa...@us...> - 2005-11-18 20:32:44
|
Update of /cvsroot/mockpp/mockpp/mockpp/docs/en In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17414/mockpp/docs/en Modified Files: Makefile.am Log Message: conditional generation of the docs Index: Makefile.am =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/docs/en/Makefile.am,v retrieving revision 1.37 retrieving revision 1.38 diff -u -d -r1.37 -r1.38 --- Makefile.am 17 Nov 2005 21:08:52 -0000 1.37 +++ Makefile.am 18 Nov 2005 20:32:36 -0000 1.38 @@ -73,6 +73,8 @@ htmldir = $(pkgdatadir)/html +if DOCBOOK_DOC + install-data-hook: doc $(mkdir_p) $(DESTDIR)$(htmldir)/handbook/common $(mkdir_p) $(DESTDIR)$(htmldir)/handbook/images/callouts @@ -81,6 +83,18 @@ $(INSTALL) $(srcdir)/images/*.png $(DESTDIR)$(htmldir)/handbook/images $(INSTALL) $(srcdir)/images/callouts/*.png $(DESTDIR)$(htmldir)/handbook/images/callouts +else + +install-data-hook: + @echo "" + @echo "***********************************************************" + @echo "* Installation of the handbook is disabled. *" + @echo "* Use --enable-docbook to turn this on. *" + @echo "***********************************************************" + @echo "" + +endif + # Automake's "distcheck" is sensitive to having files left over # after "make uninstall", so we have to clean up the install hook. uninstall-local: |
From: Ewald A. <ewa...@us...> - 2005-11-18 20:32:44
|
Update of /cvsroot/mockpp/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17414 Modified Files: ChangeLog configure.in run-configure-unicode.sh Log Message: conditional generation of the docs Index: run-configure-unicode.sh =================================================================== RCS file: /cvsroot/mockpp/mockpp/run-configure-unicode.sh,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- run-configure-unicode.sh 25 Oct 2005 19:11:21 -0000 1.5 +++ run-configure-unicode.sh 18 Nov 2005 20:32:36 -0000 1.6 @@ -3,9 +3,11 @@ if which "gcc-4.0"; then MYCC="ccache g++-4.0"; -else +else MYCC="ccache g++"; fi echo mycc: $MYCC -CFLAGS="$MYFLAGS" CXXFLAGS="$MYFLAGS" CXX=$MYCC CC=$MYCC ${0%/*}/configure --enable-unicode --enable-debug=full --prefix=/tmp/mockpp-install +OPTS="--enable-doxygen --enable-docbook" + +CFLAGS="$MYFLAGS" CXXFLAGS="$MYFLAGS" CXX=$MYCC CC=$MYCC ${0%/*}/configure --enable-unicode --enable-debug=full $OPTS --prefix=/tmp/mockpp-install Index: ChangeLog =================================================================== RCS file: /cvsroot/mockpp/mockpp/ChangeLog,v retrieving revision 1.75 retrieving revision 1.76 diff -u -d -r1.75 -r1.76 --- ChangeLog 14 Nov 2005 17:26:11 -0000 1.75 +++ ChangeLog 18 Nov 2005 20:32:36 -0000 1.76 @@ -6,7 +6,7 @@ 2005-11-13 1.10.0: - fixes for g++ 4.0 - - format boolean as "true" istead "1" + - format boolean as "true" instead "1" - created generator scripts to build classes based on increasing numbers of parameters to enable methods with more than 5 parameters - added template based classes to mock methods (chainable and visitable) Index: configure.in =================================================================== RCS file: /cvsroot/mockpp/mockpp/configure.in,v retrieving revision 1.94 retrieving revision 1.95 diff -u -d -r1.94 -r1.95 --- configure.in 14 Nov 2005 19:42:39 -0000 1.94 +++ configure.in 18 Nov 2005 20:32:36 -0000 1.95 @@ -195,6 +195,15 @@ # ---------------------------------------------------------------------------- AC_DEFUN([EA_ENABLE_DOXYGEN],[ + +AC_ARG_ENABLE(doxygen, [ --enable-doxygen enable documentation generation with doxygen (no)], [], [ enable_doxygen=no]) +if test "x$enable_doxygen" = xno; then + enable_doxy=no +else + enable_doxy=yes +fi +AM_CONDITIONAL(DOXYGEN_DOC, test x$enable_doxy = xyes) + AC_PATH_PROG(DOXYGEN, doxygen, , $PATH) if test x$DOXYGEN = x; then DOXYGEN=doxygen @@ -225,6 +234,15 @@ dnl ------------------------------------------------------------------------ AC_DEFUN([EA_ENABLE_DOCBOOK],[ + +AC_ARG_ENABLE(docbook, [ --enable-docbook enable documentation generation with docbook (no)], [], [ enable_docbook=no]) +if test "x$enable_docbook" = xno; then + enable_docbook=no +else + enable_docbook=yes +fi +AM_CONDITIONAL(DOCBOOK_DOC, test x$enable_docbook = xyes) + possible_paths="/usr/bin /usr/local/bin" EA_FIND_FILE("xsltproc xmlto", $possible_paths, xsltproc_path, xsltproc_bin) if test x$xsltproc_path != xNO; then @@ -238,34 +256,6 @@ fi AC_SUBST(XSLTPROC) - -possible_paths="/usr/share/xml/docbook/stylesheet/nwalsh/current/html /usr/share/docbook-xsl/html" -EA_FIND_FILE("chunk.xsl", $possible_paths, chunk_path, chunk_xsl) -if test x$chunk_path != xNO; then - CHUNK_XSL=$chunk_path/$chunk_xsl - echo "** $CHUNK_XSL" -else - CHUNK_XSL=/usr/share/xml/docbook/stylesheet/nwalsh/current/html - echo "*******************************************************" - echo "*** html/chunk.xsl not found." - echo "********************************************************" -fi - -AC_SUBST(CHUNK_XSL) - -possible_paths="/usr/share/xml/docbook/stylesheet/nwalsh/current/fo /usr/share/docbook-xsl/fo" -EA_FIND_FILE("docbook.xsl", $possible_paths, make_fo_path, make_fo_xsl) -if test x$make_fo_path != xNO; then - MAKE_FO_XSL=$make_fo_path/$make_fo_xsl - echo "** $MAKE_FO_XSL" -else - MAKE_FO_XSL=/usr/share/xml/docbook/stylesheet/nwalsh/current/html - echo "*******************************************************" - echo "*** fo/docbook.xsl not found." - echo "********************************************************" -fi - -AC_SUBST(MAKE_FO_XSL) ]) dnl ------------------------------------------------------------------------ |
From: Ewald A. <ewa...@us...> - 2005-11-18 20:32:44
|
Update of /cvsroot/mockpp/mockpp/mockpp/docs/api In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17414/mockpp/docs/api Modified Files: Makefile.am Log Message: conditional generation of the docs Index: Makefile.am =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/docs/api/Makefile.am,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- Makefile.am 2 Nov 2005 19:36:18 -0000 1.21 +++ Makefile.am 18 Nov 2005 20:32:36 -0000 1.22 @@ -49,11 +49,25 @@ htmldir = $(pkgdatadir)/html +if DOXYGEN_DOC + install-data-hook: doc $(mkdir_p) $(DESTDIR)$(htmldir)/api-doc -find html | xargs -n 1 cp -v -t $(DESTDIR)$(htmldir)/api-doc # $(INSTALL) html/* $(DESTDIR)$(htmldir)/api-doc +else + +install-data-hook: + @echo "" + @echo "***********************************************************" + @echo "* Installation of then api documentation is disabled. *" + @echo "* Use --enable-doxygen to turn this on. *" + @echo "***********************************************************" + @echo "" + +endif + # Automake's "distcheck" is sensitive to having files left over # after "make uninstall", so we have to clean up the install hook. uninstall-local: |
From: Ewald A. <ewa...@us...> - 2005-11-18 20:32:44
|
Update of /cvsroot/mockpp/mockpp/mockpp/examples/tutorial In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17414/mockpp/examples/tutorial Modified Files: Makefile.am Log Message: conditional generation of the docs Index: Makefile.am =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/examples/tutorial/Makefile.am,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- Makefile.am 18 Nov 2005 10:31:53 -0000 1.26 +++ Makefile.am 18 Nov 2005 20:32:36 -0000 1.27 @@ -85,10 +85,24 @@ htmldir = $(pkgdatadir)/html +if DOXYGEN_DOC + install-data-hook: $(mkdir_p) $(htmldir)/tutorial $(INSTALL) html/* $(htmldir)/tutorial +else + +install-data-hook: + @echo "" + @echo "***********************************************************" + @echo "* Installation of the tutorial is disabled. *" + @echo "* Use --enable-doxygen to turn this on. *" + @echo "***********************************************************" + @echo "" + +endif + # Automake's "distcheck" is sensitive to having files left over # after "make uninstall", so we have to clean up the install hook. uninstall-local: |
From: Ewald A. <ewa...@us...> - 2005-11-18 20:30:38
|
Update of /cvsroot/mockpp/mockpp/bcb5 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16939/bcb5 Modified Files: Makefile.am gen-mak.bat mockpp.bpg Added Files: chainmock2.bpf chainmock2.bpr visitmock2.bpf visitmock2.bpr Log Message: new project files --- NEW FILE: visitmock2.bpr --- <?xml version='1.0' encoding='utf-8' ?> <!-- C++Builder XML Project --> <PROJECT> <MACROS> <VERSION value="BCB.05.03"/> <PROJECT value="c:\tmp\compile\visitmock2_34.exe"/> <OBJFILES value="c:\tmp\compile\mockpp_34\\visitmock2.obj c:\tmp\compile\mockpp_34\\consumer.obj"/> <RESFILES value=""/> <DEFFILE value=""/> <RESDEPEN value="$(RESFILES)"/> <LIBFILES value="c:\tmp\compile\mockpp_34.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 dclocx50.bpi bcb2kaxserver50.bpi"/> <PATHCPP value=".;..\mockpp\examples\tutorial"/> <PATHPAS value=".;"/> <PATHRC value=".;"/> <PATHASM value=".;"/> <DEBUGLIBPATH value="$(BCB)\lib\debug"/> <RELEASELIBPATH value="$(BCB)\lib\release"/> <LINKER value="tlink32"/> <USERDEFINES value="__DLL___"/> <SYSDEFINES value="NO_STRICT;_NO_VCL;_RTLDLL;USEPACKAGES"/> <MAINSOURCE value="visitmock2.bpf"/> <INCLUDEPATH value="..\mockpp\examples\tutorial;..;$(BCB)\include;"X:\Documents\src\cppunit-1.10.2\include\""/> <LIBPATH value="..\mockpp\examples\tutorial;..\mockpp_34\examples\tutorial;$(BCB)\lib\obj;$(BCB)\lib"/> <WARNINGS value="-w-par"/> </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_34\" -N0"c:\tmp\compile\mockpp_34\" -$YD -$W -$O- -v -JPHNE -M"/> <RFLAGS value=""/> <AFLAGS value="/mx /w2 /zd"/> <LFLAGS value="-l"c:\tmp\compile\" -I"c:\tmp\compile\mockpp_34\" -D"" -ap -Tpe -x -Gn -v"/> </OPTIONS> <LINKER> <ALLOBJ value="c0x32.obj $(PACKAGES) $(OBJFILES)"/> <ALLRES value="$(RESFILES)"/> <ALLLIB value="cg32.lib $(LIBFILES) $(LIBRARIES) import32.lib cw32mti.lib"/> </LINKER> <IDEOPTIONS> [Version Info] IncludeVerInfo=0 AutoIncBuild=0 MajorVer=1 MinorVer=0 Release=0 Build=0 Debug=0 PreRelease=0 Special=0 Private=0 DLL=0 Locale=1031 CodePage=1252 [Version Info Keys] CompanyName= FileDescription= FileVersion=1.0.0.0 InternalName= LegalCopyright= LegalTrademarks= OriginalFilename= ProductName= ProductVersion=1.0.0.0 Comments= [HistoryLists\hlIncludePath] Count=30 Item0=..\.;$(BCB)\include;X:\Documents\src\cppunit-1.10.2\include Item1=..\mockpp\examples\tutorial;..\mockpp_34\examples\tutorial;..\mockpp_34\examples;..\..\mockpp;$(BCB)\include;..\..\..\cppunit-1.10.2\include;..\..\cppunit-1.10\include Item2=..\mockpp\examples\tutorial;..\mockpp_34\examples\tutorial;..\mockpp_34\examples;..\..\mockpp;$(BCB)\include;..\..\..\cppunit-1.10.2\include Item3=..\mockpp_34\examples\tutorial;..\mockpp_34\examples;..;$(BCB)\include;..\..\..\cppunit.ups\include Item4=..\mockpp_34\examples\tutorial;..\mockpp_34\examples;..\mockpp_34\tests;..;$(BCB)\include;..\..\cppunit\include;..\..\..\cppunit-1.8.0\include Item5=..\mockpp_34\examples;..\mockpp_34\tests;..\..\mockpp;$(BCB)\include;..\..\cppunit\include;..\..\..\cppunit-1.8.0\include Item6=..\mockpp_34\tests;..;$(BCB)\include;..\..\cppunit\include;X:\src\cppunit-1.8.0\include Item7=..\mockpp_34\tests;..;$(BCB)\include;..\..\cppunit\include Item8=..\mockpp_34\tests;..;$(BCB)\include;B:\cvs\ups\src\3party\cppunit\include Item9=..\mockpp_34\tests;..;$(BCB)\include;..\..\..\cppunit-1.8.0\include Item10=..;$(BCB)\include;..\..\..\cppunit-1.8.0\include Item11=..\mockpp_34\tests;\\SONNE\HOMES\src\mockpp_34\mockpp\mockpp_34\tests;..\..\mockpp;$(BCB)\include;..\..\..\cppunit-1.8.0\include Item12=..;$(BCB)\include;X:\src\cppunit-1.8.0\include Item13=\\SONNE\HOMES\src\mockpp_34\mockpp\mockpp_34\tests;..\..\mockpp;..\mockpp_34\tests;..\mockpp;..\expat;$(BCB)\include Item14=..;..\mockpp_34\tests;..\mockpp;..\expat;$(BCB)\include Item15=..\..\mockpp;..\mockpp_34\tests;..\mockpp;..\expat;$(BCB)\include Item16=..\..\mockpp;..\mockpp_34\tests;..\mockpp;..\expat;$(BCB)\include;$(BCB)\include\vcl;C:\wx2\include\ Item17=.. ;..\mockpp_34\tests;..\mockpp;..\expat;$(BCB)\include;$(BCB)\include\vcl;C:\wx2\include\ Item18=.. ;..\mockpp_34\tests;..\expat;..\mockpp;$(BCB)\include;$(BCB)\include\vcl;C:\wx2\include Item19=..\mockpp_34\tests;..\expat;..\mockpp;$(BCB)\include;$(BCB)\include\vcl Item20=..\mockpp_34\tests;..\mockpp;$(BCB)\include;$(BCB)\include\vcl;expat Item21=..\mockpp;$(BCB)\include;$(BCB)\include\vcl;expat Item22=..\mockpp_34\tests;..\mockpp;$(BCB)\include;$(BCB)\include\vcl Item23=..\mockpp_34\tests;..\mockpp;$(BCB)\include Item24=..\mockpp_34\tests;..\mockpp;$(BCB)/include Item25=..\mockpp_34\tests;..\mockpp Item26=..\mockpp Item27=..\mockpp_34\tests;..\mockpp_34\mockpp Item28=..\mockpp_34\mockpp Item29=..\mockpp_34\tests;..\mockpp_34\mockpp;$(BCB)\include;$(BCB)\include\vcl [HistoryLists\hlLibraryPath] Count=19 Item0=..\mockpp\examples\tutorial;..\mockpp_34\examples\tutorial;$(BCB)\lib\obj;$(BCB)\lib Item1=$(BCB)\lib\obj;$(BCB)\lib Item2=..\mockpp_34\examples\tutorial;..\mockpp_34\examples;..\mockpp_34\tests;..\expat;$(BCB)\lib\obj;$(BCB)\lib Item3=..\mockpp_34\examples;..\mockpp_34\tests;..\expat;$(BCB)\lib\obj;$(BCB)\lib Item4=..\mockpp_34\examples;\\SONNE\HOMES\src\mockpp_34\mockpp\mockpp_34\tests;..\mockpp_34\tests;..\expat;$(BCB)\lib\obj;$(BCB)\lib Item5=\\SONNE\HOMES\src\mockpp_34\mockpp\mockpp_34\tests;..\mockpp_34\tests;..\expat;$(BCB)\lib\obj;$(BCB)\lib Item6=..\mockpp_34\tests;..\expat;$(BCB)\lib\obj;$(BCB)\lib Item7=..\mockpp_34\tests;$(BCB)\lib\obj;$(BCB)\lib;output;expat Item8=..\mockpp_34\tests;$(BCB)\lib\obj;$(BCB)\lib;output;bin Item9=..\mockpp_34\apps;$(BCB)\lib\obj;$(BCB)\lib;output;bin Item10=..\mockpp_34\apps;$(BCB)\lib\obj;$(BCB)\lib;output Item11=..\mockpp_34\apps;$(BCB)\lib\obj;$(BCB)\lib;E:\Eigene Dateien\c++\mockpp_34\bcb5\output Item12=..\mockpp_34\apps;$(BCB)\lib\obj;$(BCB)\lib;..\output Item13=..\mockpp_34\apps;$(BCB)\lib\obj;$(BCB)\lib Item14=..\mockpp_34\apps;D:\CBuilder5\mockpp_34\;$(BCB)\lib\obj;$(BCB)\lib Item15=e:\Eigene Dateien\c++\mockpp_34\mockpp\apps\;..\mockpp;$(BCB)\lib\obj;$(BCB)\lib Item16=e:\Eigene Dateien\c++\mockpp_34\mockpp\apps;..\mockpp;$(BCB)\lib\obj;$(BCB)\lib Item17=..\mockpp;$(BCB)\lib\obj;$(BCB)\lib Item18=e:\Eigene Dateien\c++\mockpp_34\mockpp\apps;$(BCB)\lib\obj;$(BCB)\lib [HistoryLists\hlDebugSourcePath] Count=1 Item0=$(BCB)\source\vcl [HistoryLists\hlConditionals] Count=3 Item0=__DLL___ Item1=_DEBUG;ULXR_SHOW_CONTENT;ULXR_SHOW_HTTP;ULXR_SHOW_WRTIE;ULXR_SHOW_READ;ULXR_SHOW_XML;DEBUG;__DLL___ Item2=_DEBUG [HistoryLists\hlIntOutputDir] Count=7 Item0=c:\tmp\compile\mockpp_34\ Item1=c:\tmp\compile\mockpp_34\ulxr_bcb5\ Item2=c:\temp Item3=output Item4=E:\Eigene Dateien\c++\mockpp_34\bcb5\output\ Item5=E:\Eigene Dateien\c++\mockpp_34\bcb5\output Item6=D:\CBuilder5\Projects\output\ [HistoryLists\hlFinalOutputDir] Count=8 Item0=c:\tmp\compile\ Item1=c:\tmp\compile Item2=c:\tmp\compile\mockpp_34\ Item3=c:\temp Item4=output\ Item5=E:\Eigene Dateien\c++\mockpp_34\bcb5\output\ Item6=E:\Eigene Dateien\c++\mockpp_34\bcb5\output Item7=output [HistoryLists\hIBPIOutputDir] Count=10 Item0=c:\tmp\compile\ Item1=c:\tmp\compile Item2=c:\tmp\compile\mockpp_34\ Item3=c:\tmp\compile\mockpp_34\ulxr_bcb5\ Item4=c:\temp Item5=e:\Eigene Dateien\c++\mockpp_34\bcb5\output\ Item6=output\ Item7=E:\Eigene Dateien\c++\mockpp_34\bcb5\output Item8=D:\CBuilder5\Projects\output\ Item9=output [Debugging] DebugSourceDirs=$(BCB)\source\vcl [Parameters] RunParams=localhost/rpc2 HostApplication= RemoteHost= RemotePath= RemoteDebug=0 [Compiler] ShowInfoMsgs=0 LinkDebugVcl=0 LinkCGLIB=1 [Language] ActiveLang= ProjectLang= RootDir= </IDEOPTIONS> </PROJECT> --- NEW FILE: visitmock2.bpf --- USELIB("c:\tmp\compile\mockpp_34.lib"); USELIB("c:\tmp\compile\cppunit_1_10.lib"); USEUNIT("..\mockpp\examples\tutorial\visitmock2.cpp"); USEUNIT("..\mockpp\examples\tutorial\consumer.cpp"); //--------------------------------------------------------------------------- This file is used by the project manager only and should be treated like the project file main Index: Makefile.am =================================================================== RCS file: /cvsroot/mockpp/mockpp/bcb5/Makefile.am,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- Makefile.am 6 May 2005 16:14:28 -0000 1.11 +++ Makefile.am 18 Nov 2005 20:30:27 -0000 1.12 @@ -15,8 +15,12 @@ basicmock.bpr \ visitmock.bpf \ visitmock.bpr \ + visitmock2.bpf \ + visitmock2.bpr \ chainmock.bpf \ chainmock.bpr \ + chainmock2.bpf \ + chainmock2.bpr \ poormock.bpf \ poormock.bpr \ poormock-se.bpf \ --- NEW FILE: chainmock2.bpr --- <?xml version='1.0' encoding='utf-8' ?> <!-- C++Builder XML Project --> <PROJECT> <MACROS> <VERSION value="BCB.05.03"/> <PROJECT value="c:\tmp\compile\chainmock2_34.exe"/> <OBJFILES value="c:\tmp\compile\mockpp_34\\chainmock2.obj c:\tmp\compile\mockpp_34\\consumer.obj"/> <RESFILES value=""/> <DEFFILE value=""/> <RESDEPEN value="$(RESFILES)"/> <LIBFILES value="c:\tmp\compile\mockpp_34.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 dclocx50.bpi bcb2kaxserver50.bpi"/> <PATHCPP value=".;..\mockpp\examples\tutorial"/> <PATHPAS value=".;"/> <PATHRC value=".;"/> <PATHASM value=".;"/> <DEBUGLIBPATH value="$(BCB)\lib\debug"/> <RELEASELIBPATH value="$(BCB)\lib\release"/> <LINKER value="tlink32"/> <USERDEFINES value="__DLL___"/> <SYSDEFINES value="NO_STRICT;_NO_VCL;_RTLDLL;USEPACKAGES"/> <MAINSOURCE value="chainmock2.bpf"/> <INCLUDEPATH value="..\mockpp\examples\tutorial;..;$(BCB)\include;X:\cppunit-1.10.2\include\;..\..\cppunit-1.10.2\include"/> <LIBPATH value="..\mockpp\examples\tutorial;..\mockpp_34\examples\tutorial;$(BCB)\lib\obj;$(BCB)\lib"/> <WARNINGS value="-w-par"/> </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_34\" -N0"c:\tmp\compile\mockpp_34\" -$YD -$W -$O- -v -JPHNE -M"/> <RFLAGS value=""/> <AFLAGS value="/mx /w2 /zd"/> <LFLAGS value="-l"c:\tmp\compile\" -I"c:\tmp\compile\mockpp_34\" -D"" -ap -Tpe -x -Gn -v"/> </OPTIONS> <LINKER> <ALLOBJ value="c0x32.obj $(PACKAGES) $(OBJFILES)"/> <ALLRES value="$(RESFILES)"/> <ALLLIB value="cg32.lib $(LIBFILES) $(LIBRARIES) import32.lib cw32mti.lib"/> </LINKER> <IDEOPTIONS> [Version Info] IncludeVerInfo=0 AutoIncBuild=0 MajorVer=1 MinorVer=0 Release=0 Build=0 Debug=0 PreRelease=0 Special=0 Private=0 DLL=0 Locale=1031 CodePage=1252 [Version Info Keys] CompanyName= FileDescription= FileVersion=1.0.0.0 InternalName= LegalCopyright= LegalTrademarks= OriginalFilename= ProductName= ProductVersion=1.0.0.0 Comments= [HistoryLists\hlIncludePath] Count=30 Item0=..\mockpp\examples\tutorial;..;$(BCB)\include;X:\cppunit-1.10.2\include\;c:\home\arnold\cppunit-1.10.2\include\ Item1=..\mockpp\examples\tutorial;..;$(BCB)\include;X:\cppunit-1.10.2\include\ Item2=..\.;$(BCB)\include;..\..\..\cppunit-1.10.2\include Item3=..\mockpp\examples\tutorial;..\mockpp_34\examples\tutorial;..\mockpp_34\examples;..\mockpp_34\tests;..\..\mockpp;$(BCB)\include;..\..\..\cppunit-1.10.2\include;..\..\cppunit-1.10\include Item4=..\mockpp\examples\tutorial;..\mockpp_34\examples\tutorial;..\mockpp_34\examples;..\mockpp_34\tests;..\..\mockpp;$(BCB)\include;..\..\..\cppunit-1.10.2\include Item5=..\mockpp_34\examples\tutorial;..\mockpp_34\examples;..\mockpp_34\tests;..;$(BCB)\include;..\..\..\cppunit.ups\include Item6=..\mockpp_34\examples\tutorial;..\mockpp_34\examples;..\mockpp_34\tests;..;$(BCB)\include;..\..\cppunit\include;..\..\..\cppunit-1.8.0\include Item7=..\mockpp_34\examples;..\mockpp_34\tests;..\..\mockpp;$(BCB)\include;..\..\cppunit\include;..\..\..\cppunit-1.8.0\include Item8=..\mockpp_34\tests;..;$(BCB)\include;..\..\cppunit\include;X:\src\cppunit-1.8.0\include Item9=..\mockpp_34\tests;..;$(BCB)\include;..\..\cppunit\include Item10=..\mockpp_34\tests;..;$(BCB)\include;B:\cvs\ups\src\3party\cppunit\include Item11=..\mockpp_34\tests;..;$(BCB)\include;..\..\..\cppunit-1.8.0\include Item12=..;$(BCB)\include;..\..\..\cppunit-1.8.0\include Item13=..\mockpp_34\tests;\\SONNE\HOMES\src\mockpp_34\mockpp\mockpp_34\tests;..\..\mockpp;$(BCB)\include;..\..\..\cppunit-1.8.0\include Item14=..;$(BCB)\include;X:\src\cppunit-1.8.0\include Item15=\\SONNE\HOMES\src\mockpp_34\mockpp\mockpp_34\tests;..\..\mockpp;..\mockpp_34\tests;..\mockpp;..\expat;$(BCB)\include Item16=..;..\mockpp_34\tests;..\mockpp;..\expat;$(BCB)\include Item17=..\..\mockpp;..\mockpp_34\tests;..\mockpp;..\expat;$(BCB)\include Item18=..\..\mockpp;..\mockpp_34\tests;..\mockpp;..\expat;$(BCB)\include;$(BCB)\include\vcl;C:\wx2\include\ Item19=.. ;..\mockpp_34\tests;..\mockpp;..\expat;$(BCB)\include;$(BCB)\include\vcl;C:\wx2\include\ Item20=.. ;..\mockpp_34\tests;..\expat;..\mockpp;$(BCB)\include;$(BCB)\include\vcl;C:\wx2\include Item21=..\mockpp_34\tests;..\expat;..\mockpp;$(BCB)\include;$(BCB)\include\vcl Item22=..\mockpp_34\tests;..\mockpp;$(BCB)\include;$(BCB)\include\vcl;expat Item23=..\mockpp;$(BCB)\include;$(BCB)\include\vcl;expat Item24=..\mockpp_34\tests;..\mockpp;$(BCB)\include;$(BCB)\include\vcl Item25=..\mockpp_34\tests;..\mockpp;$(BCB)\include Item26=..\mockpp_34\tests;..\mockpp;$(BCB)/include Item27=..\mockpp_34\tests;..\mockpp Item28=..\mockpp Item29=..\mockpp_34\tests;..\mockpp_34\mockpp [HistoryLists\hlLibraryPath] Count=19 Item0=..\mockpp\examples\tutorial;..\mockpp_34\examples\tutorial;$(BCB)\lib\obj;$(BCB)\lib Item1=$(BCB)\lib\obj;$(BCB)\lib Item2=..\mockpp_34\examples\tutorial;..\mockpp_34\examples;..\mockpp_34\tests;..\expat;$(BCB)\lib\obj;$(BCB)\lib Item3=..\mockpp_34\examples;..\mockpp_34\tests;..\expat;$(BCB)\lib\obj;$(BCB)\lib Item4=..\mockpp_34\examples;\\SONNE\HOMES\src\mockpp_34\mockpp\mockpp_34\tests;..\mockpp_34\tests;..\expat;$(BCB)\lib\obj;$(BCB)\lib Item5=\\SONNE\HOMES\src\mockpp_34\mockpp\mockpp_34\tests;..\mockpp_34\tests;..\expat;$(BCB)\lib\obj;$(BCB)\lib Item6=..\mockpp_34\tests;..\expat;$(BCB)\lib\obj;$(BCB)\lib Item7=..\mockpp_34\tests;$(BCB)\lib\obj;$(BCB)\lib;output;expat Item8=..\mockpp_34\tests;$(BCB)\lib\obj;$(BCB)\lib;output;bin Item9=..\mockpp_34\apps;$(BCB)\lib\obj;$(BCB)\lib;output;bin Item10=..\mockpp_34\apps;$(BCB)\lib\obj;$(BCB)\lib;output Item11=..\mockpp_34\apps;$(BCB)\lib\obj;$(BCB)\lib;E:\Eigene Dateien\c++\mockpp_34\bcb5\output Item12=..\mockpp_34\apps;$(BCB)\lib\obj;$(BCB)\lib;..\output Item13=..\mockpp_34\apps;$(BCB)\lib\obj;$(BCB)\lib Item14=..\mockpp_34\apps;D:\CBuilder5\mockpp_34\;$(BCB)\lib\obj;$(BCB)\lib Item15=e:\Eigene Dateien\c++\mockpp_34\mockpp\apps\;..\mockpp;$(BCB)\lib\obj;$(BCB)\lib Item16=e:\Eigene Dateien\c++\mockpp_34\mockpp\apps;..\mockpp;$(BCB)\lib\obj;$(BCB)\lib Item17=..\mockpp;$(BCB)\lib\obj;$(BCB)\lib Item18=e:\Eigene Dateien\c++\mockpp_34\mockpp\apps;$(BCB)\lib\obj;$(BCB)\lib [HistoryLists\hlDebugSourcePath] Count=1 Item0=$(BCB)\source\vcl [HistoryLists\hlConditionals] Count=3 Item0=__DLL___ Item1=_DEBUG;ULXR_SHOW_CONTENT;ULXR_SHOW_HTTP;ULXR_SHOW_WRTIE;ULXR_SHOW_READ;ULXR_SHOW_XML;DEBUG;__DLL___ Item2=_DEBUG [HistoryLists\hlIntOutputDir] Count=7 Item0=c:\tmp\compile\mockpp_34\ Item1=c:\tmp\compile\mockpp_34\ulxr_bcb5\ Item2=c:\temp Item3=output Item4=E:\Eigene Dateien\c++\mockpp_34\bcb5\output\ Item5=E:\Eigene Dateien\c++\mockpp_34\bcb5\output Item6=D:\CBuilder5\Projects\output\ [HistoryLists\hlFinalOutputDir] Count=8 Item0=c:\tmp\compile\ Item1=c:\tmp\compile Item2=c:\tmp\compile\mockpp_34\ Item3=c:\temp Item4=output\ Item5=E:\Eigene Dateien\c++\mockpp_34\bcb5\output\ Item6=E:\Eigene Dateien\c++\mockpp_34\bcb5\output Item7=output [HistoryLists\hIBPIOutputDir] Count=10 Item0=c:\tmp\compile\ Item1=c:\tmp\compile Item2=c:\tmp\compile\mockpp_34\ Item3=c:\tmp\compile\mockpp_34\ulxr_bcb5\ Item4=c:\temp Item5=e:\Eigene Dateien\c++\mockpp_34\bcb5\output\ Item6=output\ Item7=E:\Eigene Dateien\c++\mockpp_34\bcb5\output Item8=D:\CBuilder5\Projects\output\ Item9=output [Debugging] DebugSourceDirs=$(BCB)\source\vcl [Parameters] RunParams=localhost/rpc2 HostApplication= RemoteHost= RemotePath= RemoteDebug=0 [Compiler] ShowInfoMsgs=0 LinkDebugVcl=0 LinkCGLIB=1 [Language] ActiveLang= ProjectLang= RootDir= </IDEOPTIONS> </PROJECT> Index: gen-mak.bat =================================================================== RCS file: /cvsroot/mockpp/mockpp/bcb5/gen-mak.bat,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- gen-mak.bat 31 Oct 2005 19:19:52 -0000 1.16 +++ gen-mak.bat 18 Nov 2005 20:30:27 -0000 1.17 @@ -16,7 +16,9 @@ %BCB_BIN%\bpr2mak mock_greeter.bpr %BCB_BIN%\bpr2mak basicmock.bpr %BCB_BIN%\bpr2mak visitmock.bpr +%BCB_BIN%\bpr2mak visitmock2.bpr %BCB_BIN%\bpr2mak chainmock.bpr +%BCB_BIN%\bpr2mak chainmock2.bpr %BCB_BIN%\bpr2mak poormock.bpr %BCB_BIN%\bpr2mak poormock-se.bpr %BCB_BIN%\bpr2mak verifying.bpr --- NEW FILE: chainmock2.bpf --- USELIB("c:\tmp\compile\mockpp_34.lib"); USELIB("c:\tmp\compile\cppunit_1_10.lib"); USEUNIT("..\mockpp\examples\tutorial\chainmock2.cpp"); USEUNIT("..\mockpp\examples\tutorial\consumer.cpp"); //--------------------------------------------------------------------------- This file is used by the project manager only and should be treated like the project file main Index: mockpp.bpg =================================================================== RCS file: /cvsroot/mockpp/mockpp/bcb5/mockpp.bpg,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- mockpp.bpg 31 Oct 2005 19:19:52 -0000 1.26 +++ mockpp.bpg 18 Nov 2005 20:30:27 -0000 1.27 @@ -9,10 +9,10 @@ DCC = $(ROOT)\bin\dcc32.exe $** BRCC = $(ROOT)\bin\brcc32.exe $** #------------------------------------------------------------------------------ -PROJECTS = mockpp_production_34.dll mockpp_34.dll jmock_test_20.exe \ - mock_test_20.exe mock_greeter_20.exe basicmock_20.exe visitmock_20.exe \ - chainmock_20.exe poormock_20.exe poormock_se_20.exe verifying_20.exe \ - cppunit_20.exe readability_test_25.exe +PROJECTS = mockpp_production_34.dll mockpp_34.dll jmock_test_34.exe \ + mock_test_34.exe mock_greeter_34.exe basicmock_34.exe visitmock_34.exe \ + chainmock_34.exe poormock_34.exe poormock_se_34.exe verifying_34.exe \ + cppunit_34.exe readability_test_25.exe visitmock2_34.exe chainmock2_34.exe #------------------------------------------------------------------------------ default: $(PROJECTS) #------------------------------------------------------------------------------ @@ -25,43 +25,51 @@ $(ROOT)\bin\bpr2mak $** $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak -mock_greeter_20.exe: mock_greeter.bpr +mock_greeter_34.exe: mock_greeter.bpr $(ROOT)\bin\bpr2mak $** $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak -verifying_20.exe: verifying.bpr +verifying_34.exe: verifying.bpr $(ROOT)\bin\bpr2mak $** $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak -poormock_20.exe: poormock.bpr +poormock_34.exe: poormock.bpr $(ROOT)\bin\bpr2mak $** $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak -poormock_se_20.exe: poormock-se.bpr +poormock_se_34.exe: poormock-se.bpr $(ROOT)\bin\bpr2mak $** $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak -chainmock_20.exe: chainmock.bpr +chainmock_34.exe: chainmock.bpr $(ROOT)\bin\bpr2mak $** $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak -visitmock_20.exe: visitmock.bpr +chainmock2_34.exe: chainmock2.bpr $(ROOT)\bin\bpr2mak $** $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak -basicmock_20.exe: basicmock.bpr +visitmock_34.exe: visitmock.bpr $(ROOT)\bin\bpr2mak $** $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak -mock_test_20.exe: mock_test.bpr +visitmock2_34.exe: visitmock2.bpr $(ROOT)\bin\bpr2mak $** $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak -jmock_test_20.exe: jmock_test.bpr +basicmock_34.exe: basicmock.bpr $(ROOT)\bin\bpr2mak $** $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak -cppunit_20.exe: cppunit.bpr +mock_test_34.exe: mock_test.bpr + $(ROOT)\bin\bpr2mak $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + +jmock_test_34.exe: jmock_test.bpr + $(ROOT)\bin\bpr2mak $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + +cppunit_34.exe: cppunit.bpr $(ROOT)\bin\bpr2mak $** $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak |
From: Ewald A. <ewa...@us...> - 2005-11-18 18:07:51
|
Update of /cvsroot/mockpp/mockpp/mockpp/examples/tutorial In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7520/mockpp/examples/tutorial Modified Files: tut-chain2.dox tut-visit2.dox tutorial.doxygen.in Log Message: update Index: tut-visit2.dox =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/examples/tutorial/tut-visit2.dox,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- tut-visit2.dox 18 Nov 2005 10:58:55 -0000 1.2 +++ tut-visit2.dox 18 Nov 2005 18:07:38 -0000 1.3 @@ -1,185 +1,124 @@ /*************************************************************************** - tut-visit2.dox - visitable mock objects, template version - - ------------------- - begin : Fri 18 Nov 2005 - copyright : (C) 2002-2005 by Ewald Arnold - email : mockpp at ewald-arnold dot de - - $Id$ - + * tut-visit2.dox - visitable mock objects, template version + * + * ------------------- + * begin : Fri 18 Nov 2005 + * copyright : (C) 2002-2005 by Ewald Arnold + * email : mockpp at ewald-arnold dot de + * + * $Id$ + * ***************************************************************************/ /*! \page tut_visit2 \section visit2_mo Solution 2b: Visitable Mock Methods -In the previous example each sub-expectation was created and adjusted manually. -To reduce the code needed to set up the desired behaviour \c mockpp provides advanced -mock objects. One of them uses the <em>visitable</em> approach. The name is derived -from the fact that the behaviour is set up using some king of recording machanism, -or by <em>visting</em> the mock object. - -First the a container mock object must be implemeneted. Similar to the first solution -is must inherit from \c Interface and from \c mockpp::VisitableMockObject . -All the functionality is hidden in internal variables and helper methods. There is a set -of variables for each method which must be initialized in the constructor. This work -is done with a macro. The macro name depends on the type of method and the number of -parameters it takes. You can read more about the details in the -<a href="../handbook/ch01s03.html#choosing_macro" >handbook</a>. - -\code -class VisitMock : public Interface - , public mockpp::VisitableMockObject -{ - public: - - VisitMock() - : mockpp::VisitableMockObject("VisitMock", 0) - , MOCKPP_CONSTRUCT_MEMBERS_FOR_VOID_VISITABLE_EXT1(open, ext) - , MOCKPP_CONSTRUCT_MEMBERS_FOR_VISITABLE0(read) - , MOCKPP_CONSTRUCT_MEMBERS_FOR_VOID_VISITABLE_EXT1(write, ext) - , MOCKPP_CONSTRUCT_MEMBERS_FOR_VOID_VISITABLE0(close) - {} -\endcode +The former approach to set up a visitable mock objects with macros +needs few lines of code and works fine if you do everything right. -Then the methods are implemented. The according code for the variables and -helper methods is also hidden in macros. In the simplest case you only have to -pick the according macro and add the name of the class and the method. -So the definition for method \c close() is easy: +But a big disadvantage is the fact that it is really hard to find +compiler errors as all messages refer to the same line. For the same +reason it is almost impossible to use a debugger and step through the +code and follow the execution path. -\code - MOCKPP_VOID_VISITABLE0(VisitMock, close); -\endcode +A better solution is the use of mock methods. They act similar to the code +behind the macros but are based on templates. There are only little +changes. Most of the work is it to provide some forwarder +methods. -If the method has a non standard type (according to the definition of \c mockpp) -you need an extended set of macros. The same applies to overloaded methods. -This is necessary because the internal variables and names are derived from -the methods name and parameters but need special handling. -This is also explained in the according section of the -<a href="../handbook/ch01s03.html#choosing_macro" >handbook</a>. +Include the additonal top level header: \code - MOCKPP_VOID_VISITABLE_EXT1(VisitMock, open, const std::string &, - With Macros ext, std::string); +#include <mockpp/CountedVisitableMethod.h> \endcode -Once the class is finished and ready to use the desired behaviour must be set up. -This is done by invoking the expected methods with the expected parameters. -In the example the file is opened, three lines are read and the file is closed. +Instead of providing the members wrapped in macros add the mock method +objects. \code - VisitMock mock; +class VisitMock : public Interface + , public VisitableMockObject +{ + public: - mock.open("file1.lst"); - mock.read(); - mock.read(); - mock.read(); - mock.close(); + VisitMock() + : VisitableMockObject(MOCKPP_PCHAR("VisitMock"), 0) + , open_mocker(MOCKPP_PCHAR("open"), this) + , read_mocker(MOCKPP_PCHAR("read"), this) + , write_mocker(MOCKPP_PCHAR("write"), this) + , close_mocker(MOCKPP_PCHAR("close"), this) + , calculate_mocker(MOCKPP_PCHAR("calculate"), this) + {} \endcode -When you want to prepare the return values for the method \c read() you -use a helper object which passes the values via helper methods in the desired -order into the mock object. +Implementing the methods within the mock object is easy as they only +forward to their mock method object. \code - MOCKPP_CONTROLLER_FOR(VisitMock, read) read_controller (&mock); + void open(const std::string &filename) + { + open_mocker.forward(filename); + } - read_controller.addReturnValue("record-1"); - read_controller.addReturnValue("record-2"); - read_controller.addReturnValue("record-3"); + std::string read() + { + return read_mocker.forward(); + } \endcode -After all the behaviour is added you have to switch the mock object -into test mode by invoking \c activate() . Then you run the methods -under test. Similar to the first example you should call \c verify() at the -end to check for pending expectations. +If you intend to use constraints to make your tests less strict you need +to add an overloaded method which forwards the constraint object. Note that +this method may only be called in record mode and never returns a value. \code - mock.activate(); - - Consumer consumer(&mock); - consumer.load(); - consumer.process(); - consumer.save(); + unsigned calculate(unsigned input) + { + return calculate_mocker.forward(input); + } - mock.verify(); - } - catch(std::exception &ex) - { - std::cout << std::endl - << "Error occured.\n" << ex.what() << std::endl - << std::endl; - } + void calculate(const ConstraintHolder<unsigned> &ch) + { + calculate_mocker.forward(ch); + } \endcode -<a href="visitmock2_8cpp-source.html">visitmock2.cpp</a> contains the -complete source code. - - -\section visit2_enh Enhanced functionality - -Visitable mock objects offer some more functionality. Suppose you have a method -\c add() which receives two parameters and returns the sum.You could emulate this behaviour -for some expected values by using the following statements. Additionally the method shall -return -1 as error indicator for all other parameters. As an alternative -you could have it throw an exception by using \c setDefaultThrowable(). +To finally complete the class definition you have to declare the mock +methods. \code - MOCKPP_CONTROLLER_FOR(VisitMock, add) add_controller (&mock); - - add_controller.addResponseValue(3, 1, 2); // 1 and 2 are expected - add_controller.addResponseValue(110, 99, 11); // 99 and 11 are expected - add_controller.setDefaultReturnValue(-1); + VisitableMockMethod<void, std::string> open_mocker; + VisitableMockMethod<std::string> read_mocker; + VisitableMockMethod<void, std::string> write_mocker; + VisitableMockMethod<void> close_mocker; + VisitableMockMethod<unsigned, unsigned> calculate_mocker; \endcode -Another rather common problem is the simulation of runtime errors. Such errors happen -usually when you don't expect them but you hardly can reproduce them. To address such -testing problems you might use a \c mockpp::Throwable . The following code could -be used to emulate a method that returns bytes from a network connection. The first 10 -calls return 0, but the next call throws a \c NetworkError . All the following -calls return 1. +Now as everything is prepared you set up the behaviour. This happens +almost exactly as before when using macros. Instead of using a controller +object you use the mock methods directly. For convenience, in case you +have rather long names as in the example, you can use a reference as well. \code - class NetworkError {}; - - MOCKPP_CONTROLLER_FOR(VisitMock, network_read) read_controller (&mock); - - read_controller.addReturnValue(0, 10); - read_controller.addThrowable(mockpp::make_throwable(NetworkError())); - read_controller.setDefaultValue(1); -\endcode - -When generating such behaviour you should keep in mind that there is a determined -dispatching order which is explained in the -<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. + VisitMock mock; -\code - mock.calculate(eq<unsigned>(5,5)); - mock.calculate(eq<unsigned>(5,5)); - mock.calculate(eq<unsigned>(5,5)); + VisitableMockMethod<std::string> &reader (mock.read_mocker); + VisitableMockMethod<unsigned, unsigned> &calcer (mock.calculate_mocker); \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: +The actual setup is done with exactly the same methods as before with +the macros. \code - mock.write(stringContains(std::string("processed"))); - mock.write(stringContains(std::string("processed"))); -\endcode - -In a similar manner the return value can be influenced by passing the controller object -according constraints instead of exact values. + mock.open("file1.lst"); + mock.read(); + mock.read(); + mock.read(); + mock.close(); -\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)); + reader.addReturnValue("record-1"); + reader.addReturnValue("record-2"); + reader.addReturnValue("record-3"); \endcode <a href="visitmock2_8cpp-source.html">visitmock2.cpp</a> contains the complete source code. @@ -189,4 +128,3 @@ \ref content */ - Index: tut-chain2.dox =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/examples/tutorial/tut-chain2.dox,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- tut-chain2.dox 18 Nov 2005 10:58:55 -0000 1.2 +++ tut-chain2.dox 18 Nov 2005 18:07:38 -0000 1.3 @@ -16,155 +16,60 @@ \section chain2_mo Solution 3b: Chainable Mock Methods -After including the the \c mockpp header files some elements from the \c mockpp namespace -which will be needed later -are imported to omit the prefix and enhance readability. - -\code -using mockpp::eq; -using mockpp::exactly; -using mockpp::returnValue; -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 -method calls to a temporary object that moves the sub-expectations into the -container mock object. +Similar to the steps taken from the macro version of the visitable +mock object to the one with mock methods you have to replace the macro code +with the according method template members. -The class is implemented similar to the previous example. -Only the names differ slightly. Every \c VISITABLE is replaced by -\c CHAINABLE . +And in the same manner you must add the forwarder methods. Due to the +different working method there is no need to provide an overloaded +method for constraints. \code class ChainMock : public Interface - , public mockpp::ChainableMockObject + , public ChainableMockObject { public: ChainMock() - : mockpp::ChainableMockObject(MOCKPP_PCHAR("ChainMock"), 0) - , MOCKPP_CONSTRUCT_MEMBERS_FOR_VOID_CHAINABLE_EXT1(open, ext) - , MOCKPP_CONSTRUCT_MEMBERS_FOR_CHAINABLE0(read) - , MOCKPP_CONSTRUCT_MEMBERS_FOR_VOID_CHAINABLE_EXT1(write, ext) - , MOCKPP_CONSTRUCT_MEMBERS_FOR_VOID_CHAINABLE0(close) + : ChainableMockObject(MOCKPP_PCHAR("ChainMock"), 0) + , open_mocker(MOCKPP_PCHAR("open"), this) + , read_mocker(MOCKPP_PCHAR("read"), this) + , write_mocker(MOCKPP_PCHAR("write"), this) + , close_mocker(MOCKPP_PCHAR("close"), this) + , calculate_mocker(MOCKPP_PCHAR("calculate"), this) {} -\endcode - -The next step after implementing the mock object is similar to the previous -example, too. To -create expectations you have to use a helper object as well. In this case -a \c Chainer instead of the former \c Controller . -\code - ChainMock mock; - MOCKPP_CHAINER_FOR_EXT(ChainMock, open, ext) open_chainer (&mock); -\endcode - -This chainer is then used to create a temporary object which helps to -pass all desired sub-expectations into the mock object. Usually you -will create one or more of the following types: - - - a number indicating how often the ecpectation is used - - a constraint for each parameter of the call - - a return value or an exception to throw - - a unique label to reference the expectation - -When a method is invoked on a mock object, the mock object searches -through its expectations from first to last (in the order of your source code) -to find one that matches the -invocation. An expectation matches an invocation if all of its -matching rules match the invocation. After the invocation, the matching expectation -might stop matching -further invocations. For example, an \c expects(once()) -expectation only matches once and will be ignored on future invocations while an -\c expects(atLeastOnce()) -expectation will always be matched against invocations. - -At the end of the test cycle all expectations have to be "consumed" for a successful -result. - -So he following code is quite easy to read: the method is expected to -be invoked exactly once with a parameter equal to "file1.lst". And the the call -must happen before another call labelled "reader". - -\code - open_chainer.expects(once()) - .with(eq(std::string("file1.lst"))) - .before("reader"); -\endcode - -Chainable mock objects provide a method \c stubs() as well as a method \c expects(). Internally both do -exactly the same. The main difference is more of a syntactical nature. Expectations expressed -with \c stubs -should be used when the main intent is to return values. Whereas \c expects() is prefered when the -focus lies on checking parameters. Another difference is the optional parameter to \c stubs() . -If this parameter is missing the expecation is optional and has unlimited lifetime. Therefor it is -no error of the stub is not called at all. - -To set up a method to return a value you might choose one of the patterns below. -The first call passes only one argument and the second creates a sequence of three values -which will be returned one after the other. - -\code - read_chainer.stubs() - .will(new ReturnStub<std::string>("record-1")); + void open(const std::string &filename) + { + open_mocker.forward(filename); + } - read_chainer.stubs() - .will(onConsecutiveCalls(new ReturnStub<std::string>("record-1"), - new ReturnStub<std::string>("record-2"), - new ReturnStub<std::string>("record-3"))); + ChainableMockMethod<void, std::string> open_mocker; + ChainableMockMethod<std::string> read_mocker; + ChainableMockMethod<void, std::string> write_mocker; + ChainableMockMethod<void> close_mocker; + ChainableMockMethod<unsigned, unsigned> calculate_mocker; +}; \endcode -<a href="chainmock2_8cpp-source.html">chainmock2.cpp</a> contains the -complete source code. - -\section chain2_examples More elaborate examples - -It is possible to re-write the examples from the previous section. - -First the \c add() method is replaced. Two expected calls with parameters are -prepared together with the correct return value: - - - \c add(1,2) ==> 3 - - \c add(99,11) ==> 110 - -The last statement sets the default return value -1. +Now create the mock object and a reference to the mock method you intend to use. \code - add_chainer.stubs() - .with(eq(1), eq(2)) - .will(returnValue(3)); - - add_chainer.stubs() - .with(eq(99), eq(11)) - .will(returnValue(110)); - - add_chainer.stubs() - .will(returnValue(-1)); + ChainMock mock; + ChainableMockMethod<std::string> &reader(mock.read_mocker); \endcode -The next example rewrites the \c network_read() method. As before the method shall return 10 times -with a 0, then an NetworkError shall be thrown and all later calls shall return 1: +The only action left is to set up the behaviour. This is done with exactly the +same method invocations as in the example with the macros. \code - read_chainer.stubs(exactly(10)) - .will(returnValue(0)); - - read_chainer.stubs(once()) - .will(throwException<int>(NetworkError())); + reader.stubs() + .will(new ReturnStub<std::string>("record-1")); - read_chainer.stubs() - .will(returnValue(1)); + reader.stubs() + .will(onConsecutiveCalls(new ReturnStub<std::string>("record-1"), + new ReturnStub<std::string>("record-2"), + new ReturnStub<std::string>("record-3"))); \endcode <a href="chainmock2_8cpp-source.html">chainmock2.cpp</a> contains the Index: tutorial.doxygen.in =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/examples/tutorial/tutorial.doxygen.in,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- tutorial.doxygen.in 24 Apr 2005 11:35:17 -0000 1.6 +++ tutorial.doxygen.in 18 Nov 2005 18:07:38 -0000 1.7 @@ -16,7 +16,7 @@ ALWAYS_DETAILED_SEC = NO INLINE_INHERITED_MEMB = NO FULL_PATH_NAMES = NO -STRIP_FROM_PATH = +STRIP_FROM_PATH = SRCDIR/ INTERNAL_DOCS = NO STRIP_CODE_COMMENTS = YES CASE_SENSE_NAMES = NO @@ -48,7 +48,7 @@ WARNINGS = YES WARN_IF_UNDOCUMENTED = NO WARN_FORMAT = -WARN_LOGFILE = +WARN_LOGFILE = warnfile.txt #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- |
From: Ewald A. <ewa...@us...> - 2005-11-18 10:59:03
|
Update of /cvsroot/mockpp/mockpp/mockpp/examples/tutorial In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2132/mockpp/examples/tutorial Modified Files: tut-chain.dox tut-chain2.dox tut-visit.dox tut-visit2.dox tutorial.dox Log Message: update Index: tutorial.dox =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/examples/tutorial/tutorial.dox,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- tutorial.dox 4 Mar 2005 23:37:00 -0000 1.12 +++ tutorial.dox 18 Nov 2005 10:58:55 -0000 1.13 @@ -19,7 +19,9 @@ - \ref problem <br> - \ref basic_mo <br> - \ref visit_mo <br> + - \ref visit2_mo <br> - \ref chain_mo <br> + - \ref chain2_mo <br> - \ref poor_mo <br> - \ref poor_se_mo <br> - \ref cppunit <br> @@ -66,7 +68,7 @@ developing different solutions. All files are present as working source code to start playing with them under -\c mockpp/examples/tutorial/listings . +\c mockpp/examples/tutorial . Next: \ref basic_mo Index: tut-chain2.dox =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/examples/tutorial/tut-chain2.dox,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- tut-chain2.dox 18 Nov 2005 10:24:30 -0000 1.1 +++ tut-chain2.dox 18 Nov 2005 10:58:55 -0000 1.2 @@ -125,7 +125,7 @@ new ReturnStub<std::string>("record-3"))); \endcode -<a href="chainmock_8cpp-source.html">chainmock.cpp</a> contains the +<a href="chainmock2_8cpp-source.html">chainmock2.cpp</a> contains the complete source code. \section chain2_examples More elaborate examples @@ -167,7 +167,7 @@ .will(returnValue(1)); \endcode -<a href="chainmock_8cpp-source.html">chainmock.cpp</a> contains the +<a href="chainmock2_8cpp-source.html">chainmock2.cpp</a> contains the complete source code. Next: \ref poor_mo Index: tut-visit2.dox =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/examples/tutorial/tut-visit2.dox,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- tut-visit2.dox 18 Nov 2005 10:24:30 -0000 1.1 +++ tut-visit2.dox 18 Nov 2005 10:58:55 -0000 1.2 @@ -113,7 +113,7 @@ } \endcode -<a href="visitmock_8cpp-source.html">visitmock.cpp</a> contains the +<a href="visitmock2_8cpp-source.html">visitmock2.cpp</a> contains the complete source code. @@ -182,7 +182,7 @@ calculate_controller.addResponseValue(30, eq<unsigned>(6,2)); \endcode -<a href="visitmock_8cpp-source.html">visitmock.cpp</a> contains the complete source code. +<a href="visitmock2_8cpp-source.html">visitmock2.cpp</a> contains the complete source code. Next: \ref chain_mo Index: tut-chain.dox =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/examples/tutorial/tut-chain.dox,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- tut-chain.dox 18 Nov 2005 10:24:12 -0000 1.9 +++ tut-chain.dox 18 Nov 2005 10:58:55 -0000 1.10 @@ -170,7 +170,7 @@ <a href="chainmock_8cpp-source.html">chainmock.cpp</a> contains the complete source code. -Next: \ref tut_chain2 +Next: \ref chain2_mo \ref content Index: tut-visit.dox =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/examples/tutorial/tut-visit.dox,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- tut-visit.dox 18 Nov 2005 10:24:12 -0000 1.8 +++ tut-visit.dox 18 Nov 2005 10:58:55 -0000 1.9 @@ -12,7 +12,7 @@ /*! \page tut_visit -\section visit_mo Solution 2: Visitable Mock Objects With Macros +\section visit_mo Solution 2a: Visitable Mock Objects With Macros In the previous example each sub-expectation was created and adjusted manually. To reduce the code needed to set up the desired behaviour \c mockpp provides advanced @@ -184,7 +184,7 @@ <a href="visitmock_8cpp-source.html">visitmock.cpp</a> contains the complete source code. -Next: \ref tut_visit2 +Next: \ref visit2_mo \ref content |
From: Ewald A. <ewa...@us...> - 2005-11-18 10:49:44
|
Update of /cvsroot/mockpp/mockpp/mockpp/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32643/mockpp/tests Modified Files: ChainableMockMethod_2_test.cpp VisitableMockMethod_2_test.cpp Log Message: more tests Index: VisitableMockMethod_2_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/VisitableMockMethod_2_test.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- VisitableMockMethod_2_test.cpp 14 Nov 2005 19:20:35 -0000 1.8 +++ VisitableMockMethod_2_test.cpp 18 Nov 2005 10:49:31 -0000 1.9 @@ -109,6 +109,8 @@ { MyVisitableMockObject_2 vmo(MOCKPP_PCHAR("Visitable-object")); mockpp::VisitableMockMethod2<int, unsigned, unsigned> &vmb (vmo.visitable_mocker); + vmo.verify(); + vmb.verify(); vmb.addThrowable(mockpp::make_throwable(333u)); vmb.setDefaultThrowable(mockpp::make_throwable(444u)); @@ -257,6 +259,8 @@ MyVisitableMockObject_2 vmo(MOCKPP_PCHAR("Visitable-object")); mockpp::VisitableMockMethod2<void, unsigned, unsigned> &vmb (vmo.visitablev_mocker); mockpp::VisitableMockMethod2<int, unsigned, unsigned> &vmbi (vmo.visitable_mocker); + vmo.verify(); + vmb.verify(); vmb.setDefaultThrowable(mockpp::make_throwable(444u)); vmb.addThrowable(mockpp::make_throwable(333u)); Index: ChainableMockMethod_2_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/ChainableMockMethod_2_test.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- ChainableMockMethod_2_test.cpp 15 Nov 2005 19:42:18 -0000 1.8 +++ ChainableMockMethod_2_test.cpp 18 Nov 2005 10:49:31 -0000 1.9 @@ -107,6 +107,7 @@ { MyChainableMockObject_2 mcm(MOCKPP_PCHAR("chainable-object")); mockpp::ChainableMockMethod2<int, unsigned, long> &chain(mcm.chainable_mocker); + mcm.verify(); chain.stubs(mockpp::once()) .with(mockpp::eq<unsigned>(12u), @@ -140,6 +141,8 @@ MyChainableMockObject_2 mcm(MOCKPP_PCHAR("chainable-object")); mockpp::ChainableMockMethod2<void, unsigned, long> &chain(mcm.chainablev_mocker); + mcm.verify(); + unsigned counter = 0; // IncCounter<unsigned> ctr(counter); |
From: Ewald A. <ewa...@us...> - 2005-11-18 10:32:00
|
Update of /cvsroot/mockpp/mockpp/mockpp/examples/tutorial In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29089/mockpp/examples/tutorial Modified Files: Makefile.am Log Message: changes for mock method Index: Makefile.am =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/examples/tutorial/Makefile.am,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- Makefile.am 19 Sep 2005 18:36:28 -0000 1.25 +++ Makefile.am 18 Nov 2005 10:31:53 -0000 1.26 @@ -5,7 +5,8 @@ AM_LDFLAGS = $(all_libraries) -noinst_PROGRAMS = visitmock chainmock basicmock poormock poormock-se cppunit verifying +noinst_PROGRAMS = visitmock visitmock2 chainmock chainmock2 \ + basicmock poormock poormock-se cppunit verifying EXTRA_DIST = \ tutorial.doxygen.in \ @@ -17,7 +18,9 @@ tutorial.dox \ tut-basic.dox \ tut-visit.dox \ + tut-visit2.dox \ tut-chain.dox \ + tut-chain2.dox \ tut-poor.dox \ tut-poor-se.dox \ tut-verifying.dox \ @@ -66,8 +69,12 @@ visitmock_SOURCES = visitmock.cpp consumer.cpp +visitmock2_SOURCES = visitmock2.cpp consumer.cpp + chainmock_SOURCES = chainmock.cpp consumer.cpp +chainmock2_SOURCES = chainmock2.cpp consumer.cpp + poormock_SOURCES = poormock.cpp consumer.cpp poormock_se_SOURCES = poormock-se.cpp consumer.cpp |
From: Ewald A. <ewa...@us...> - 2005-11-18 10:31:50
|
Update of /cvsroot/mockpp/mockpp/mockpp/examples/tutorial In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28988/mockpp/examples/tutorial Added Files: chainmock2.cpp Log Message: changes for mock method --- NEW FILE: chainmock2.cpp --- /*************************************************************************** chainmock.cpp - solve problem with chaining mocks ------------------- begin : Sun 2 Jan 2005 copyright : (C) 2002-2005 by Ewald Arnold email : mockpp at ewald-arnold dot de $Id: chainmock2.cpp,v 1.1 2005/11/18 10:31:30 ewald-arnold Exp $ ***************************************************************************/ #include <mockpp/mockpp.h> #include "interface.h" #include "consumer.h" #include <mockpp/ChainableMockObject.h> #include <mockpp/chaining/CountedChainableMethod.h> #include <mockpp/chaining/ChainingMockObjectSupport.h> #include <exception> #include <iostream> using namespace mockpp; class ChainMock : public Interface , public mockpp::ChainableMockObject { public: ChainMock() : mockpp::ChainableMockObject(MOCKPP_PCHAR("ChainMock"), 0) , open_mocker(MOCKPP_PCHAR("open"), this) , read_mocker(MOCKPP_PCHAR("read"), this) , write_mocker(MOCKPP_PCHAR("write"), this) , close_mocker(MOCKPP_PCHAR("close"), this) , calculate_mocker(MOCKPP_PCHAR("calculate"), this) {} void open(const std::string &filename) { open_mocker.forward(filename); } std::string read() { return read_mocker.forward(); } void write(const std::string &data) { write_mocker.forward(data); } unsigned calculate(unsigned input) { return calculate_mocker.forward(input); } void close() { close_mocker.forward(); } mockpp::ChainableMockMethod<void, std::string> open_mocker; mockpp::ChainableMockMethod<std::string> read_mocker; mockpp::ChainableMockMethod<void, std::string> write_mocker; mockpp::ChainableMockMethod<void> close_mocker; mockpp::ChainableMockMethod<unsigned, unsigned> calculate_mocker; }; int main(int /*argc*/, char ** /*argv*/) { try { ChainMock mock; mockpp::ChainableMockMethod<void, std::string> &open_chainer (mock.open_mocker); mockpp::ChainableMockMethod<std::string> &read_chainer (mock.read_mocker); mockpp::ChainableMockMethod<void, std::string> &write_chainer (mock.write_mocker); mockpp::ChainableMockMethod<void> &close_chainer (mock.close_mocker); mockpp::ChainableMockMethod<unsigned, unsigned> &calculate_chainer (mock.calculate_mocker); // Expectations for reading the file open_chainer.expects(once()) .with(eq(std::string("file1.lst"))) .before(MOCKPP_PCHAR("reader")); read_chainer.stubs() .will(onConsecutiveCalls(new ReturnStub<std::string>("record-1"), new ReturnStub<std::string>("record-2"), new ReturnStub<std::string>("record-3"))) .id(MOCKPP_PCHAR("reader")); close_chainer.expects(once()) .after(MOCKPP_PCHAR("reader")); // Expectations for processing the file calculate_chainer.expects(atLeast(3)) .with(eq<unsigned>(5, 5)) .after(MOCKPP_PCHAR("reader")) .will(returnValue<unsigned>(1)); // Expectations for writing the file back open_chainer.expects(once()) .with(eq(std::string("file1.lst"))) .before(MOCKPP_PCHAR("writer")); write_chainer.expects(once()) .with(eq(std::string("record-1/processed"))); write_chainer.expects(once()) .with(eq(std::string("record-2/processed"))); write_chainer.expects(once()) .with(stringContains(std::string("processed"))) .id(MOCKPP_PCHAR("writer")); close_chainer.expects(once()) .after(MOCKPP_PCHAR("writer")); // Run Consumer object std::cout << "Tests starting" << std::endl; Consumer consumer(&mock); consumer.load(); consumer.process(); consumer.save(); std::cout << "Tests finished" << std::endl; // Check pending expectations mock.verify(); std::cout << "All tests have passed successfully" << std::endl; } catch(std::exception &ex) { std::cout << std::endl << "Error occured.\n" << ex.what() << std::endl << std::endl; return 1; } return 0; } |
From: Ewald A. <ewa...@us...> - 2005-11-18 10:24:51
|
Update of /cvsroot/mockpp/mockpp/mockpp/examples/tutorial In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27383/mockpp/examples/tutorial Added Files: tut-chain2.dox tut-visit2.dox Log Message: add draft --- NEW FILE: tut-chain2.dox --- /*************************************************************************** tut-chain2.dox - chainable mock objects, template version ------------------- begin : Fri 18 Nov 2005 copyright : (C) 2002-2005 by Ewald Arnold email : mockpp at ewald-arnold dot de $Id: tut-chain2.dox,v 1.1 2005/11/18 10:24:30 ewald-arnold Exp $ ***************************************************************************/ /*! \page tut_chain2 \ref content \section chain2_mo Solution 3b: Chainable Mock Methods After including the the \c mockpp header files some elements from the \c mockpp namespace which will be needed later are imported to omit the prefix and enhance readability. \code using mockpp::eq; using mockpp::exactly; using mockpp::returnValue; 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 method calls to a temporary object that moves the sub-expectations into the container mock object. The class is implemented similar to the previous example. Only the names differ slightly. Every \c VISITABLE is replaced by \c CHAINABLE . \code class ChainMock : public Interface , public mockpp::ChainableMockObject { public: ChainMock() : mockpp::ChainableMockObject(MOCKPP_PCHAR("ChainMock"), 0) , MOCKPP_CONSTRUCT_MEMBERS_FOR_VOID_CHAINABLE_EXT1(open, ext) , MOCKPP_CONSTRUCT_MEMBERS_FOR_CHAINABLE0(read) , MOCKPP_CONSTRUCT_MEMBERS_FOR_VOID_CHAINABLE_EXT1(write, ext) , MOCKPP_CONSTRUCT_MEMBERS_FOR_VOID_CHAINABLE0(close) {} \endcode The next step after implementing the mock object is similar to the previous example, too. To create expectations you have to use a helper object as well. In this case a \c Chainer instead of the former \c Controller . \code ChainMock mock; MOCKPP_CHAINER_FOR_EXT(ChainMock, open, ext) open_chainer (&mock); \endcode This chainer is then used to create a temporary object which helps to pass all desired sub-expectations into the mock object. Usually you will create one or more of the following types: - a number indicating how often the ecpectation is used - a constraint for each parameter of the call - a return value or an exception to throw - a unique label to reference the expectation When a method is invoked on a mock object, the mock object searches through its expectations from first to last (in the order of your source code) to find one that matches the invocation. An expectation matches an invocation if all of its matching rules match the invocation. After the invocation, the matching expectation might stop matching further invocations. For example, an \c expects(once()) expectation only matches once and will be ignored on future invocations while an \c expects(atLeastOnce()) expectation will always be matched against invocations. At the end of the test cycle all expectations have to be "consumed" for a successful result. So he following code is quite easy to read: the method is expected to be invoked exactly once with a parameter equal to "file1.lst". And the the call must happen before another call labelled "reader". \code open_chainer.expects(once()) .with(eq(std::string("file1.lst"))) .before("reader"); \endcode Chainable mock objects provide a method \c stubs() as well as a method \c expects(). Internally both do exactly the same. The main difference is more of a syntactical nature. Expectations expressed with \c stubs should be used when the main intent is to return values. Whereas \c expects() is prefered when the focus lies on checking parameters. Another difference is the optional parameter to \c stubs() . If this parameter is missing the expecation is optional and has unlimited lifetime. Therefor it is no error of the stub is not called at all. To set up a method to return a value you might choose one of the patterns below. The first call passes only one argument and the second creates a sequence of three values which will be returned one after the other. \code read_chainer.stubs() .will(new ReturnStub<std::string>("record-1")); read_chainer.stubs() .will(onConsecutiveCalls(new ReturnStub<std::string>("record-1"), new ReturnStub<std::string>("record-2"), new ReturnStub<std::string>("record-3"))); \endcode <a href="chainmock_8cpp-source.html">chainmock.cpp</a> contains the complete source code. \section chain2_examples More elaborate examples It is possible to re-write the examples from the previous section. First the \c add() method is replaced. Two expected calls with parameters are prepared together with the correct return value: - \c add(1,2) ==> 3 - \c add(99,11) ==> 110 The last statement sets the default return value -1. \code add_chainer.stubs() .with(eq(1), eq(2)) .will(returnValue(3)); add_chainer.stubs() .with(eq(99), eq(11)) .will(returnValue(110)); add_chainer.stubs() .will(returnValue(-1)); \endcode The next example rewrites the \c network_read() method. As before the method shall return 10 times with a 0, then an NetworkError shall be thrown and all later calls shall return 1: \code read_chainer.stubs(exactly(10)) .will(returnValue(0)); read_chainer.stubs(once()) .will(throwException<int>(NetworkError())); read_chainer.stubs() .will(returnValue(1)); \endcode <a href="chainmock_8cpp-source.html">chainmock.cpp</a> contains the complete source code. Next: \ref poor_mo \ref content */ --- NEW FILE: tut-visit2.dox --- /*************************************************************************** tut-visit2.dox - visitable mock objects, template version ------------------- begin : Fri 18 Nov 2005 copyright : (C) 2002-2005 by Ewald Arnold email : mockpp at ewald-arnold dot de $Id: tut-visit2.dox,v 1.1 2005/11/18 10:24:30 ewald-arnold Exp $ ***************************************************************************/ /*! \page tut_visit2 \section visit2_mo Solution 2b: Visitable Mock Methods In the previous example each sub-expectation was created and adjusted manually. To reduce the code needed to set up the desired behaviour \c mockpp provides advanced mock objects. One of them uses the <em>visitable</em> approach. The name is derived from the fact that the behaviour is set up using some king of recording machanism, or by <em>visting</em> the mock object. First the a container mock object must be implemeneted. Similar to the first solution is must inherit from \c Interface and from \c mockpp::VisitableMockObject . All the functionality is hidden in internal variables and helper methods. There is a set of variables for each method which must be initialized in the constructor. This work is done with a macro. The macro name depends on the type of method and the number of parameters it takes. You can read more about the details in the <a href="../handbook/ch01s03.html#choosing_macro" >handbook</a>. \code class VisitMock : public Interface , public mockpp::VisitableMockObject { public: VisitMock() : mockpp::VisitableMockObject("VisitMock", 0) , MOCKPP_CONSTRUCT_MEMBERS_FOR_VOID_VISITABLE_EXT1(open, ext) , MOCKPP_CONSTRUCT_MEMBERS_FOR_VISITABLE0(read) , MOCKPP_CONSTRUCT_MEMBERS_FOR_VOID_VISITABLE_EXT1(write, ext) , MOCKPP_CONSTRUCT_MEMBERS_FOR_VOID_VISITABLE0(close) {} \endcode Then the methods are implemented. The according code for the variables and helper methods is also hidden in macros. In the simplest case you only have to pick the according macro and add the name of the class and the method. So the definition for method \c close() is easy: \code MOCKPP_VOID_VISITABLE0(VisitMock, close); \endcode If the method has a non standard type (according to the definition of \c mockpp) you need an extended set of macros. The same applies to overloaded methods. This is necessary because the internal variables and names are derived from the methods name and parameters but need special handling. This is also explained in the according section of the <a href="../handbook/ch01s03.html#choosing_macro" >handbook</a>. \code MOCKPP_VOID_VISITABLE_EXT1(VisitMock, open, const std::string &, With Macros ext, std::string); \endcode Once the class is finished and ready to use the desired behaviour must be set up. This is done by invoking the expected methods with the expected parameters. In the example the file is opened, three lines are read and the file is closed. \code VisitMock mock; mock.open("file1.lst"); mock.read(); mock.read(); mock.read(); mock.close(); \endcode When you want to prepare the return values for the method \c read() you use a helper object which passes the values via helper methods in the desired order into the mock object. \code MOCKPP_CONTROLLER_FOR(VisitMock, read) read_controller (&mock); read_controller.addReturnValue("record-1"); read_controller.addReturnValue("record-2"); read_controller.addReturnValue("record-3"); \endcode After all the behaviour is added you have to switch the mock object into test mode by invoking \c activate() . Then you run the methods under test. Similar to the first example you should call \c verify() at the end to check for pending expectations. \code mock.activate(); Consumer consumer(&mock); consumer.load(); consumer.process(); consumer.save(); mock.verify(); } catch(std::exception &ex) { std::cout << std::endl << "Error occured.\n" << ex.what() << std::endl << std::endl; } \endcode <a href="visitmock_8cpp-source.html">visitmock.cpp</a> contains the complete source code. \section visit2_enh Enhanced functionality Visitable mock objects offer some more functionality. Suppose you have a method \c add() which receives two parameters and returns the sum.You could emulate this behaviour for some expected values by using the following statements. Additionally the method shall return -1 as error indicator for all other parameters. As an alternative you could have it throw an exception by using \c setDefaultThrowable(). \code MOCKPP_CONTROLLER_FOR(VisitMock, add) add_controller (&mock); add_controller.addResponseValue(3, 1, 2); // 1 and 2 are expected add_controller.addResponseValue(110, 99, 11); // 99 and 11 are expected add_controller.setDefaultReturnValue(-1); \endcode Another rather common problem is the simulation of runtime errors. Such errors happen usually when you don't expect them but you hardly can reproduce them. To address such testing problems you might use a \c mockpp::Throwable . The following code could be used to emulate a method that returns bytes from a network connection. The first 10 calls return 0, but the next call throws a \c NetworkError . All the following calls return 1. \code class NetworkError {}; MOCKPP_CONTROLLER_FOR(VisitMock, network_read) read_controller (&mock); read_controller.addReturnValue(0, 10); read_controller.addThrowable(mockpp::make_throwable(NetworkError())); read_controller.setDefaultValue(1); \endcode When generating such behaviour you should keep in mind that there is a determined dispatching order which is explained in the <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(std::string("processed"))); mock.write(stringContains(std::string("processed"))); \endcode In a similar manner the return value can be influenced 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 \ref content */ |
From: Ewald A. <ewa...@us...> - 2005-11-18 10:24:22
|
Update of /cvsroot/mockpp/mockpp/mockpp/examples/tutorial In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27321/mockpp/examples/tutorial Modified Files: tut-chain.dox tut-visit.dox Log Message: link new files Index: tut-chain.dox =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/examples/tutorial/tut-chain.dox,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- tut-chain.dox 30 Oct 2005 20:22:10 -0000 1.8 +++ tut-chain.dox 18 Nov 2005 10:24:12 -0000 1.9 @@ -14,7 +14,7 @@ \ref content -\section chain_mo Solution 3: Chainable Mock Objects +\section chain_mo Solution 3a: Chainable Mock Objects With Macros After including the the \c mockpp header files some elements from the \c mockpp namespace which will be needed later @@ -170,7 +170,7 @@ <a href="chainmock_8cpp-source.html">chainmock.cpp</a> contains the complete source code. -Next: \ref poor_mo +Next: \ref tut_chain2 \ref content Index: tut-visit.dox =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/examples/tutorial/tut-visit.dox,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- tut-visit.dox 31 Aug 2005 14:46:36 -0000 1.7 +++ tut-visit.dox 18 Nov 2005 10:24:12 -0000 1.8 @@ -12,7 +12,7 @@ /*! \page tut_visit -\section visit_mo Solution 2: Visitable Mock Objects +\section visit_mo Solution 2: Visitable Mock Objects With Macros In the previous example each sub-expectation was created and adjusted manually. To reduce the code needed to set up the desired behaviour \c mockpp provides advanced @@ -184,7 +184,7 @@ <a href="visitmock_8cpp-source.html">visitmock.cpp</a> contains the complete source code. -Next: \ref chain_mo +Next: \ref tut_visit2 \ref content |