mockpp-commits Mailing List for Mock Objects for C++ (Page 26)
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-10-30 13:53:23
|
Update of /cvsroot/mockpp/mockpp/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27397/mockpp Modified Files: Makefile.am Added Files: CountedVisitableMethod.h CountParameters.h gen_countparams_N.pl gen_countvisitable_N.pl Log Message: basic file set working --- NEW FILE: CountedVisitableMethod.h --- /** @file @internal NOT INTENDED FOR PUBLIC INCLUSION @brief Generated with gen_countvisitable.pl. $Id: CountedVisitableMethod.h,v 1.1 2005/10/30 13:53:00 ewald-arnold Exp $ ***************************************************************************/ /************************************************************************** begin : Sun Oct 30 2005 copyright : (C) 2002-2005 by Ewald Arnold email : mockpp at ewald-arnold dot de This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. **/ #ifndef MOCKPP_COUNTEDVISITABLEMETHOD_H #define MOCKPP_COUNTEDVISITABLEMETHOD_H #include <mockpp/CountParameters.h> #include <mockpp/VisitableMockMethod0.h> #include <mockpp/VisitableMockMethod1.h> #include <mockpp/VisitableMockMethod2.h> #include <mockpp/VisitableMockMethod3.h> #include <mockpp/VisitableMockMethod4.h> #include <mockpp/VisitableMockMethod5.h> #include <mockpp/VisitableMockMethod6.h> namespace mockpp { template<unsigned params> class SwitchVisitable { }; template<> class SwitchVisitable<0> { public: template< typename R , typename P1 , typename P2 , typename P3 , typename P4 , typename P5 , typename P6> class Method { public: typedef VisitableMockMethod0<R> VisitableMockMethodType; }; }; template<> class SwitchVisitable<1> { public: template< typename R , typename P1 , typename P2 , typename P3 , typename P4 , typename P5 , typename P6> class Method { public: typedef VisitableMockMethod1<R, P1> VisitableMockMethodType; }; }; template<> class SwitchVisitable<2> { public: template< typename R , typename P1 , typename P2 , typename P3 , typename P4 , typename P5 , typename P6> class Method { public: typedef VisitableMockMethod2<R, P1, P2> VisitableMockMethodType; }; }; template<> class SwitchVisitable<3> { public: template< typename R , typename P1 , typename P2 , typename P3 , typename P4 , typename P5 , typename P6> class Method { public: typedef VisitableMockMethod3<R, P1, P2, P3> VisitableMockMethodType; }; }; template<> class SwitchVisitable<4> { public: template< typename R , typename P1 , typename P2 , typename P3 , typename P4 , typename P5 , typename P6> class Method { public: typedef VisitableMockMethod4<R, P1, P2, P3, P4> VisitableMockMethodType; }; }; template<> class SwitchVisitable<5> { public: template< typename R , typename P1 , typename P2 , typename P3 , typename P4 , typename P5 , typename P6> class Method { public: typedef VisitableMockMethod5<R, P1, P2, P3, P4, P5> VisitableMockMethodType; }; }; template<> class SwitchVisitable<6> { public: template< typename R , typename P1 , typename P2 , typename P3 , typename P4 , typename P5 , typename P6> class Method { public: typedef VisitableMockMethod6<R, P1, P2, P3, P4, P5, P6> VisitableMockMethodType; }; }; template< typename R , typename P1 = NoParameter , typename P2 = NoParameter , typename P3 = NoParameter , typename P4 = NoParameter , typename P5 = NoParameter , typename P6 = NoParameter> class VisitableMockMethod : public SwitchVisitable<CountParameters<R, P1, P2, P3, P4, P5, P6>::value> ::template Method<R, P1, P2, P3, P4, P5, P6> ::VisitableMockMethodType { public: VisitableMockMethod(const String &name, VisitableMockObject *parent ) : SwitchVisitable<CountParameters<R, P1, P2, P3, P4, P5, P6>::value > ::template Method<R, P1, P2, P3, P4, P5, P6> ::VisitableMockMethodType(name, parent) { } }; } // ns mockpp #endif // MOCKPP_COUNTEDVISITABLEMETHOD_H --- NEW FILE: CountParameters.h --- /** @file @internal NOT INTENDED FOR PUBLIC INCLUSION @brief Generated with gen_countparameters_N.pl. $Id: CountParameters.h,v 1.1 2005/10/30 13:53:00 ewald-arnold Exp $ ***************************************************************************/ /************************************************************************** begin : Sun Oct 30 2005 copyright : (C) 2002-2005 by Ewald Arnold email : mockpp at ewald-arnold dot de This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. **/ #ifndef MOCKPP_COUNTPARAMETERS_N_H #define MOCKPP_COUNTPARAMETERS_N_H namespace mockpp { class NoParameter { NoParameter() {} }; template<typename T> class CountIfUsed { public: enum { value = 1 }; }; template<> class CountIfUsed<NoParameter> { public: enum { value = 0 }; }; template< typename T , typename P1 = NoParameter , typename P2 = NoParameter , typename P3 = NoParameter , typename P4 = NoParameter , typename P5 = NoParameter , typename P6 = NoParameter> class CountParameters { public: enum { value = CountIfUsed<P1>::value + CountIfUsed<P2>::value + CountIfUsed<P3>::value + CountIfUsed<P4>::value + CountIfUsed<P5>::value + CountIfUsed<P6>::value }; }; } // ns mockpp #endif // MOCKPP_COUNTPARAMETERS_N_H Index: Makefile.am =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/Makefile.am,v retrieving revision 1.93 retrieving revision 1.94 diff -u -d -r1.93 -r1.94 --- Makefile.am 29 Oct 2005 18:17:30 -0000 1.93 +++ Makefile.am 30 Oct 2005 13:53:00 -0000 1.94 @@ -38,6 +38,8 @@ VisitableMockMethod4.h \ VisitableMockMethod5.h \ VisitableMockMethod6.h \ + CountParameters.h \ + CountedVisitableMethod.h \ ResponseVector1.h \ ResponseVector2.h \ ResponseVector3.h \ @@ -50,6 +52,8 @@ mockpp_config-msvc_60_70.h \ mockpp_config-msvc_71.h \ gen_visitablemethod_N.pl \ + gen_countparameters_N.pl \ + gen_countvisitbale_N.pl \ gen_responsevector_N.pl CLEANFILES = *.~* *.~~* *~ mockpp_config.h *.old --- NEW FILE: gen_countvisitable_N.pl --- #!/usr/bin/perl -w # # $Id: gen_countvisitable_N.pl,v 1.1 2005/10/30 13:53:00 ewald-arnold Exp $ use English; if ($#ARGV < 0) { print "Usage: perl gen_countvisitable <number of arguments>\n"; exit; } $totalNumArgs = $ARGV[0]; if ($totalNumArgs < 5) { $totalNumArgs = 5; } for ($numArgs = 1; $numArgs <= $totalNumArgs; ++$numArgs) { } open OUT, ">CountedVisitableMethod.h"; print OUT "/** \@file \@internal NOT INTENDED FOR PUBLIC INCLUSION \@brief Generated with gen_countvisitable.pl. \$I" . "d: CountedVisitableMethod.h,v 1.7 2005/10/19 20:53:09 ewald-arnold Exp \$ ***************************************************************************/ /************************************************************************** begin : Sun Oct 30 2005 copyright : (C) 2002-2005 by Ewald Arnold email : mockpp at ewald-arnold dot de This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. **/ #ifndef MOCKPP_COUNTEDVISITABLEMETHOD_H #define MOCKPP_COUNTEDVISITABLEMETHOD_H #include <mockpp/CountParameters.h>"; for ($p = 0; $p <= $totalNumArgs; ++$p) { print OUT " #include <mockpp/VisitableMockMethod" . $p . ".h>";} print OUT " namespace mockpp { template<unsigned params> class SwitchVisitable { }; "; for ($numArgs = 0; $numArgs <= $totalNumArgs; ++$numArgs) { $templateParms = ""; $templateParms_colon = ""; for ($i = 1; $i <= $numArgs; ++$i) { if ($i > 1) { $templateParms .= ", "; } $templateParms .= "typename P$i"; } if ($numArgs > 0) { $templateParms_colon = ", " . $templateParms; } $templateArgs_colon = ""; $_ = $templateParms; s/typename //g; $templateArgs = $_; if ($numArgs > 0) { $templateArgs_colon = ", ". $templateArgs; } print "Creating CountedVisitableMethod" . $numArgs ."\n"; print OUT " template<> class SwitchVisitable<" . $numArgs ."> { public: "; print OUT " template< typename R"; for($p = 1; $p <= $totalNumArgs; ++$p) { print OUT " , typename P" . $p; } print OUT "> class Method { public: typedef VisitableMockMethod" . $numArgs ."<R" . $templateArgs_colon . "> VisitableMockMethodType; }; }; "; } print OUT " template< typename R , typename P1 = NoParameter"; for($p = 2; $p <= $totalNumArgs; ++$p) { print OUT " , typename P" . $p . " = NoParameter"; }; print OUT "> class VisitableMockMethod : public SwitchVisitable<CountParameters<R, " . $templateArgs . ">::value> ::template Method<R, " . $templateArgs . "> ::VisitableMockMethodType { public: VisitableMockMethod(const String &name, VisitableMockObject *parent ) : SwitchVisitable<CountParameters<R, " . $templateArgs . ">::value > ::template Method<R, " . $templateArgs . "> ::VisitableMockMethodType(name, parent) { } }; "; print OUT " } // ns mockpp #endif // MOCKPP_COUNTEDVISITABLEMETHOD_H "; close OUT; --- NEW FILE: gen_countparams_N.pl --- #!/usr/bin/perl -w # # $Id: gen_countparams_N.pl,v 1.1 2005/10/30 13:53:00 ewald-arnold Exp $ use English; if ($#ARGV < 0) { print "Usage: perl gen_countparams_N <number of arguments>\n"; exit; } $totalNumArgs = $ARGV[0]; if ($totalNumArgs < 5) { $totalNumArgs = 5; } open OUT, ">CountParameters.h"; print OUT "/** \@file \@internal NOT INTENDED FOR PUBLIC INCLUSION \@brief Generated with gen_countparameters_N.pl. \$I" . "d: CountParameters.h,v 1.7 2005/10/19 20:53:09 ewald-arnold Exp \$ ***************************************************************************/ /************************************************************************** begin : Sun Oct 30 2005 copyright : (C) 2002-2005 by Ewald Arnold email : mockpp at ewald-arnold dot de This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. **/ #ifndef MOCKPP_COUNTPARAMETERS_N_H #define MOCKPP_COUNTPARAMETERS_N_H namespace mockpp { class NoParameter { NoParameter() {} }; template<typename T> class CountIfUsed { public: enum { value = 1 }; }; template<> class CountIfUsed<NoParameter> { public: enum { value = 0 }; }; "; print OUT " template< typename T , typename P1 = NoParameter"; for($p = 2; $p <= $totalNumArgs; ++$p) { print OUT " , typename P" . $p . " = NoParameter"; } print OUT "> class CountParameters { public: enum { value = CountIfUsed<P1>::value"; for($p = 2; $p <= $totalNumArgs; ++$p) { print OUT " + CountIfUsed<P" . $p . ">::value"; }; print OUT " }; }; } // ns mockpp #endif // MOCKPP_COUNTPARAMETERS_N_H "; close OUT; |
From: Ewald A. <ewa...@us...> - 2005-10-30 13:53:20
|
Update of /cvsroot/mockpp/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27397 Modified Files: gen_files_N.sh Log Message: basic file set working Index: gen_files_N.sh =================================================================== RCS file: /cvsroot/mockpp/mockpp/gen_files_N.sh,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- gen_files_N.sh 29 Oct 2005 18:17:30 -0000 1.2 +++ gen_files_N.sh 30 Oct 2005 13:53:00 -0000 1.3 @@ -14,8 +14,11 @@ ( cd mockpp/chaining ; ./gen_invocation_N.pl $p ) ( cd mockpp/chaining ; ./gen_chainablemethod_N.pl $p ) +( cd mockpp/chaining ; ./gen_countchainable_N.pl $p ) ( cd mockpp ; ./gen_responsevector_N.pl $p ) ( cd mockpp ; ./gen_visitablemethod_N.pl $p ) ( cd mockpp/builder ; ./gen_argumentsmatchbuilder_N.pl $p ) ( cd mockpp/constraint ; ./gen_constraintset_N.pl $p ) +( cd mockpp ; ./gen_countparams_N.pl $p ) +( cd mockpp ; ./gen_countvisitable_N.pl $p ) |
From: Ewald A. <ewa...@us...> - 2005-10-30 13:53:07
|
Update of /cvsroot/mockpp/mockpp/mockpp/chaining In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27397/mockpp/chaining Modified Files: Makefile.am Log Message: basic file set working Index: Makefile.am =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/Makefile.am,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- Makefile.am 29 Oct 2005 18:17:30 -0000 1.15 +++ Makefile.am 30 Oct 2005 13:53:00 -0000 1.16 @@ -16,10 +16,12 @@ ChainableMockMethod4.h \ ChainableMockMethod5.h \ ChainableMockMethod6.h \ + CountedChainableMethod.h \ InvocationN.h EXTRA_DIST = \ gen_chainablemethod_N.pl \ + gen_countchainable_N.pl \ gen_invocation_N.pl libchainingincludedir = $(includedir)/mockpp/chaining |
From: Ewald A. <ewa...@us...> - 2005-10-30 13:51:51
|
Update of /cvsroot/mockpp/mockpp/mockpp/chaining In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27211/mockpp/chaining Added Files: CountedChainableMethod.h gen_countchainable_N.pl Log Message: basic file set working --- NEW FILE: CountedChainableMethod.h --- /** @file @internal NOT INTENDED FOR PUBLIC INCLUSION @brief Generated with gen_countparameters_N.pl. $Id: CountedChainableMethod.h,v 1.1 2005/10/30 13:51:43 ewald-arnold Exp $ ***************************************************************************/ /************************************************************************** begin : Sun Oct 30 2005 copyright : (C) 2002-2005 by Ewald Arnold email : mockpp at ewald-arnold dot de This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. **/ #ifndef MOCKPP_COUNTEDCHAINABLEMETHOD_H #define MOCKPP_COUNTEDCHAINABLEMETHOD_H #include <mockpp/CountParameters.h> #include <mockpp/chaining/ChainableMockMethod0.h> #include <mockpp/chaining/ChainableMockMethod1.h> #include <mockpp/chaining/ChainableMockMethod2.h> #include <mockpp/chaining/ChainableMockMethod3.h> #include <mockpp/chaining/ChainableMockMethod4.h> #include <mockpp/chaining/ChainableMockMethod5.h> #include <mockpp/chaining/ChainableMockMethod6.h> namespace mockpp { template<unsigned params> class SwitchChainable { }; template<> class SwitchChainable<0> { public: template< typename R , typename P1 , typename P2 , typename P3 , typename P4 , typename P5 , typename P6> class Method { public: typedef ChainableMockMethod0<R> ChainableMockMethodType; }; }; template<> class SwitchChainable<1> { public: template< typename R , typename P1 , typename P2 , typename P3 , typename P4 , typename P5 , typename P6> class Method { public: typedef ChainableMockMethod1<R, P1> ChainableMockMethodType; }; }; template<> class SwitchChainable<2> { public: template< typename R , typename P1 , typename P2 , typename P3 , typename P4 , typename P5 , typename P6> class Method { public: typedef ChainableMockMethod2<R, P1, P2> ChainableMockMethodType; }; }; template<> class SwitchChainable<3> { public: template< typename R , typename P1 , typename P2 , typename P3 , typename P4 , typename P5 , typename P6> class Method { public: typedef ChainableMockMethod3<R, P1, P2, P3> ChainableMockMethodType; }; }; template<> class SwitchChainable<4> { public: template< typename R , typename P1 , typename P2 , typename P3 , typename P4 , typename P5 , typename P6> class Method { public: typedef ChainableMockMethod4<R, P1, P2, P3, P4> ChainableMockMethodType; }; }; template<> class SwitchChainable<5> { public: template< typename R , typename P1 , typename P2 , typename P3 , typename P4 , typename P5 , typename P6> class Method { public: typedef ChainableMockMethod5<R, P1, P2, P3, P4, P5> ChainableMockMethodType; }; }; template<> class SwitchChainable<6> { public: template< typename R , typename P1 , typename P2 , typename P3 , typename P4 , typename P5 , typename P6> class Method { public: typedef ChainableMockMethod6<R, P1, P2, P3, P4, P5, P6> ChainableMockMethodType; }; }; template< typename R , typename P1 = NoParameter , typename P2 = NoParameter , typename P3 = NoParameter , typename P4 = NoParameter , typename P5 = NoParameter , typename P6 = NoParameter> class ChainableMockMethod : public SwitchChainable<CountParameters<R, P1, P2, P3, P4, P5, P6>::value > ::template Method<R, P1, P2, P3, P4, P5, P6> ::ChainableMockMethodType { public: ChainableMockMethod(const String &name, ChainableMockObject *parent ) : SwitchChainable<CountParameters<R, P1, P2, P3, P4, P5, P6>::value > ::template Method<R, P1, P2, P3, P4, P5, P6> ::ChainableMockMethodType(name, parent) { } }; } // ns mockpp #endif // MOCKPP_COUNTEDCHAINABLEMETHOD_H --- NEW FILE: gen_countchainable_N.pl --- #!/usr/bin/perl -w # # $Id: gen_countchainable_N.pl,v 1.1 2005/10/30 13:51:43 ewald-arnold Exp $ use English; if ($#ARGV < 0) { print "Usage: perl gen_countchainable_N <number of arguments>\n"; exit; } $totalNumArgs = $ARGV[0]; if ($totalNumArgs < 5) { $totalNumArgs = 5; } open OUT, ">CountedChainableMethod.h"; print OUT "/** \@file \@internal NOT INTENDED FOR PUBLIC INCLUSION \@brief Generated with gen_countparameters_N.pl. \$I" . "d: CountedChainableMethod.h,v 1.7 2005/10/19 20:53:09 ewald-arnold Exp \$ ***************************************************************************/ /************************************************************************** begin : Sun Oct 30 2005 copyright : (C) 2002-2005 by Ewald Arnold email : mockpp at ewald-arnold dot de This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. **/ #ifndef MOCKPP_COUNTEDCHAINABLEMETHOD_H #define MOCKPP_COUNTEDCHAINABLEMETHOD_H #include <mockpp/CountParameters.h>"; for ($p = 0; $p <= $totalNumArgs; ++$p) { print OUT " #include <mockpp/chaining/ChainableMockMethod" . $p . ".h>";} print OUT " namespace mockpp { template<unsigned params> class SwitchChainable { }; "; for ($numArgs = 0; $numArgs <= $totalNumArgs; ++$numArgs) { $templateParms = ""; $templateParms_colon = ""; for ($i = 1; $i <= $numArgs; ++$i) { if ($i > 1) { $templateParms .= ", "; } $templateParms .= "typename P$i"; } if ($numArgs > 0) { $templateParms_colon = ", " . $templateParms; } $templateArgs_colon = ""; $_ = $templateParms; s/typename //g; $templateArgs = $_; if ($numArgs > 0) { $templateArgs_colon = ", ". $templateArgs; } print "Creating CountedChainableMethod" . $numArgs ."\n"; print OUT " template<> class SwitchChainable<" . $numArgs ."> { public: "; print OUT " template< typename R"; for($p = 1; $p <= $totalNumArgs; ++$p) { print OUT " , typename P" . $p; } print OUT "> class Method { public: typedef ChainableMockMethod" . $numArgs ."<R" . $templateArgs_colon . "> ChainableMockMethodType; }; }; "; } print OUT " template< typename R , typename P1 = NoParameter"; for($p = 2; $p <= $totalNumArgs; ++$p) { print OUT " , typename P" . $p . " = NoParameter"; }; print OUT "> class ChainableMockMethod : public SwitchChainable<CountParameters<R, " . $templateArgs . ">::value > ::template Method<R, " . $templateArgs . "> ::ChainableMockMethodType { public: ChainableMockMethod(const String &name, ChainableMockObject *parent ) : SwitchChainable<CountParameters<R, " . $templateArgs . ">::value > ::template Method<R, " . $templateArgs . "> ::ChainableMockMethodType(name, parent) { } }; } // ns mockpp #endif // MOCKPP_COUNTEDCHAINABLEMETHOD_H "; close OUT; |
Update of /cvsroot/mockpp/mockpp/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19293/mockpp Modified Files: ChainableMockObject.h ExpectationBoundary.h MixedMockObject.h MockObject.h ResponseVector1.h ResponseVector2.h ResponseVector3.h ResponseVector4.h ResponseVector5.h ResponseVector6.h VisitableMockMethod.cpp VisitableMockMethod.h VisitableMockMethod0.h VisitableMockMethod1.h VisitableMockMethod2.h VisitableMockMethod3.h VisitableMockMethod4.h VisitableMockMethod5.h VisitableMockMethod6.h Log Message: cleanup in docs Index: VisitableMockMethod.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/VisitableMockMethod.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- VisitableMockMethod.cpp 25 Oct 2005 19:06:10 -0000 1.3 +++ VisitableMockMethod.cpp 29 Oct 2005 21:00:26 -0000 1.4 @@ -30,6 +30,7 @@ #include <mockpp/mockpp.h> // always first +#include <mockpp/mockpp_dbc.h> #include <mockpp/VisitableMockMethod.h> @@ -43,6 +44,8 @@ , throwables (name + MOCKPP_PCHAR("/throwables"), this) , throwablesInline (true) { + MOCKPP_PRE(parent != 0); + MOCKPP_PRE(name.length() != 0); } Index: ChainableMockObject.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/ChainableMockObject.h,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- ChainableMockObject.h 19 Sep 2005 18:42:08 -0000 1.27 +++ ChainableMockObject.h 29 Oct 2005 21:00:25 -0000 1.28 @@ -111,7 +111,7 @@ protected: - /** Verifies the object and the mock objects it contains.. + /** Verifies the object and the mock objects it contains. * If it fails, an AssertionFailedError is thrown */ void chainableVerify(); @@ -158,7 +158,7 @@ */ virtual ~ChainableMockObject(); - /** Verifies the object and the mock objects it contains.. + /** Verifies the object and the mock objects it contains. * If it fails, an AssertionFailedError is thrown */ virtual void verify(); Index: MixedMockObject.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/MixedMockObject.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- MixedMockObject.h 6 Mar 2005 21:45:52 -0000 1.1 +++ MixedMockObject.h 29 Oct 2005 21:00:26 -0000 1.2 @@ -66,7 +66,7 @@ */ virtual void reset(); - /** Verifies the object and the mock objects it contains.. + /** Verifies the object and the mock objects it contains. * If it fails, an AssertionFailedError is thrown */ virtual void verify(); Index: MockObject.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/MockObject.h,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- MockObject.h 6 Apr 2005 20:15:20 -0000 1.21 +++ MockObject.h 29 Oct 2005 21:00:26 -0000 1.22 @@ -63,7 +63,7 @@ */ void notImplemented(); - /** Verifies the object and the mock objects it contains.. + /** Verifies the object and the mock objects it contains. * If it fails, an AssertionFailedError is thrown */ virtual void verify(); Index: VisitableMockMethod.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/VisitableMockMethod.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- VisitableMockMethod.h 25 Oct 2005 19:06:10 -0000 1.9 +++ VisitableMockMethod.h 29 Oct 2005 21:00:26 -0000 1.10 @@ -47,7 +47,7 @@ * @param name the method name to mock * @param parent parent Visitable mock object */ - VisitableMockMethodBase(const String &methodname, VisitableMockObject *parent); + VisitableMockMethodBase(const String &name, VisitableMockObject *parent); String getMethodName() const; @@ -89,6 +89,9 @@ { public: + /** Construct the item. + * @param meth pointer to the method mock + */ ControllerFor (VMM *meth) : method(meth) , object(meth->getVisitableMockObject()) @@ -96,25 +99,41 @@ this->object->addController(this); } + /** Destruct the item. + */ virtual ~ControllerFor () { this->object->removeController(this); } + /** Switches exception handling back to pre-1.2 behaviour. + * @see VisitableMockObject::Controller::unsetThrowablesInline() + */ void unsetThrowablesInline() { MOCKPP_ASSERT_FALSE(this->object->isActivated()); this->method->throwablesInline = false; }; - void addThrowable(Throwable *t_) + /** Adds another throwable to the method. + * The throwables are thrown one after the other when the method is + * called after activating until all of them are used. + * @param t a pointer to the throwable + */ + void addThrowable(Throwable *t) { - std::auto_ptr<Throwable> at (t_); + std::auto_ptr<Throwable> at (t); MOCKPP_ASSERT_FALSE(this->object->isActivated()); this->method->throwables.push_back(at.release()); this->method->throwableInsteadReturn.push_back(true); } + /** Adds another throwable to the method. + * The throwables are thrown one after the other when the method is + * called after activating until all of them are used. + * @param w the value to throw + * @param count how often to throw the value + */ template <class T> void addThrowable(const T &w, unsigned count = 1) { @@ -122,9 +141,14 @@ addThrowable(make_throwable(w)); } - void setDefaultThrowable(Throwable *t_) + /** Sets the default throwable. + * Once the list of throwables is empty this one is thrown. This also + * means that your method never processes the parameters passed to it. + * @param t a pointer to the throwable + */ + void setDefaultThrowable(Throwable *t) { - std::auto_ptr<Throwable> at (t_); + std::auto_ptr<Throwable> at (t); MOCKPP_ASSERT_FALSE(this->object->isActivated()); this->method->defaultThrowable.take(at.release()); } @@ -199,11 +223,19 @@ public: + /** Construct the item. + * @param meth pointer to the method mock + */ ControllerFor (VisitableMockReturningMethodBase<R> *meth) : Inherited(meth) { } + /** Sets the default return value. + * This value is returned if there are no throwables available and if there + * are no other possible return values in a list. + * @param rv the default return value + */ void setDefaultReturnValue(const R &rv) { MOCKPP_ASSERT_FALSE(this->object->isActivated()); @@ -211,6 +243,12 @@ this->method->defaultReturnValue = rv; } + /** Adds another return value. + * The values from this list are return one after the other unless there + * are no other throwables or response values available. + * @param rv the next return value + * @param count the number of times this value shall be returned + */ void addReturnValue(const R &rv, unsigned count = 1) { MOCKPP_ASSERT_FALSE(this->object->isActivated()); @@ -221,6 +259,10 @@ } } + /** Determines the current return value. + * The values from the default value or the list are returned one after + * the other. + */ R determineReturnValue() { if (this->method->returnValues.hasMoreObjects()) @@ -231,6 +273,8 @@ return this->method->defaultReturnValue; } + /** Sets all internal objects to the state after construction. + */ virtual void reset() { Inherited::reset(); @@ -238,6 +282,9 @@ this->method->defaultReturnValueUsed = false; } + /** Verify that the expected and actual values are equal. + * If it fails, an AssertionFailedError is thrown + */ virtual void verify() { Inherited::verify(); @@ -275,6 +322,9 @@ : VisitableMockMethodBase(name, parent) {} + /** Construct the item. + * @param meth pointer to the method mock + */ class ControllerFor : public VisitableMockMethodBase::ControllerFor<VisitableMockReturningMethodBase<void> > { typedef VisitableMockMethodBase::ControllerFor<VisitableMockReturningMethodBase<void> > Inherited; Index: ExpectationBoundary.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/ExpectationBoundary.h,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- ExpectationBoundary.h 7 May 2005 12:45:10 -0000 1.19 +++ ExpectationBoundary.h 29 Oct 2005 21:00:26 -0000 1.20 @@ -40,7 +40,7 @@ namespace mockpp { -/** A class to verify that an actual value lies between two boundary values.. +/** A class to verify that an actual value lies between two boundary values. * Since it uses operator<() and operator==() for verification * it can handle all objects that implement those operators not just numerics. * \ingroup grp_basic_mo @@ -99,14 +99,15 @@ #if MOCKPP_BOUNDARY_DELTA != 0 + /** Sets the expectation value boundaries. * Differs from the normal setExpected() method only in the parameters. * Since this method is not activated by default, you must add the - * following lines to your source code before #include'ing ExpectationBoundery.h + * following lines to your source code before \#include'ing ExpectationBoundery.h * to activate it. * <pre> - * #undef MOCKPP_BOUNDARY_DELTA // after inclusion of mockpp.h! - * #define MOCKPP_BOUNDARY_DELTA 1 + * \#undef MOCKPP_BOUNDARY_DELTA // after inclusion of mockpp.h! + * \#define MOCKPP_BOUNDARY_DELTA 1 * </pre> * Additionally operator+() and operator-() must exist for your * expected objects, that's the reason why it is disabled by default. |
From: Ewald A. <ewa...@us...> - 2005-10-29 21:00:39
|
Update of /cvsroot/mockpp/mockpp/mockpp/chaining In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19293/mockpp/chaining Modified Files: ChainableMockMethod.h ChainableMockMethod0.h ChainableMockMethod1.h ChainableMockMethod2.h ChainableMockMethod3.h ChainableMockMethod4.h ChainableMockMethod5.h ChainableMockMethod6.h InvocationN.h gen_chainablemethod_N.pl Log Message: cleanup in docs Index: ChainableMockMethod6.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/ChainableMockMethod6.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ChainableMockMethod6.h 29 Oct 2005 19:09:27 -0000 1.2 +++ ChainableMockMethod6.h 29 Oct 2005 21:00:26 -0000 1.3 @@ -85,7 +85,7 @@ public: /** Construct the chainer object. - * @param meth pointer to according method mock. + * @param method pointer to according method mock. */ ChainerFor(ChainableMockMethod6Common &method) : Builder(&method.getCoreMock(), method.getChainableMockObject(), method.getMethodName()) Index: ChainableMockMethod.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/ChainableMockMethod.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- ChainableMockMethod.h 25 Oct 2005 20:19:31 -0000 1.7 +++ ChainableMockMethod.h 29 Oct 2005 21:00:26 -0000 1.8 @@ -33,6 +33,7 @@ #include <mockpp/mockpp.h> +#include <mockpp/mockpp_dbc.h> #include <mockpp/ChainableMockObject.h> @@ -51,7 +52,10 @@ ChainableMockMethodCommon(const String &name, ChainableMockObject *parent ) : MockObject(name, parent) , chainable(parent) - {} + { + MOCKPP_PRE(parent != 0); + MOCKPP_PRE(name.length() != 0); + } ChainableMockObject *getChainableMockObject() const { Index: ChainableMockMethod2.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/ChainableMockMethod2.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- ChainableMockMethod2.h 29 Oct 2005 19:09:27 -0000 1.4 +++ ChainableMockMethod2.h 29 Oct 2005 21:00:26 -0000 1.5 @@ -85,7 +85,7 @@ public: /** Construct the chainer object. - * @param meth pointer to according method mock. + * @param method pointer to according method mock. */ ChainerFor(ChainableMockMethod2Common &method) : Builder(&method.getCoreMock(), method.getChainableMockObject(), method.getMethodName()) Index: ChainableMockMethod3.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/ChainableMockMethod3.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- ChainableMockMethod3.h 29 Oct 2005 19:09:27 -0000 1.4 +++ ChainableMockMethod3.h 29 Oct 2005 21:00:26 -0000 1.5 @@ -85,7 +85,7 @@ public: /** Construct the chainer object. - * @param meth pointer to according method mock. + * @param method pointer to according method mock. */ ChainerFor(ChainableMockMethod3Common &method) : Builder(&method.getCoreMock(), method.getChainableMockObject(), method.getMethodName()) Index: ChainableMockMethod4.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/ChainableMockMethod4.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- ChainableMockMethod4.h 29 Oct 2005 19:09:27 -0000 1.4 +++ ChainableMockMethod4.h 29 Oct 2005 21:00:26 -0000 1.5 @@ -85,7 +85,7 @@ public: /** Construct the chainer object. - * @param meth pointer to according method mock. + * @param method pointer to according method mock. */ ChainerFor(ChainableMockMethod4Common &method) : Builder(&method.getCoreMock(), method.getChainableMockObject(), method.getMethodName()) Index: gen_chainablemethod_N.pl =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/gen_chainablemethod_N.pl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- gen_chainablemethod_N.pl 29 Oct 2005 19:09:27 -0000 1.2 +++ gen_chainablemethod_N.pl 29 Oct 2005 21:00:26 -0000 1.3 @@ -223,7 +223,7 @@ public: /** Construct the chainer object. - * \@param meth pointer to according method mock. + * \@param method pointer to according method mock. */ ChainerFor(ChainableMockMethod" . $numArgs . "Common &method) : Builder(&method.getCoreMock(), method.getChainableMockObject(), method.getMethodName()) Index: ChainableMockMethod5.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/ChainableMockMethod5.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- ChainableMockMethod5.h 29 Oct 2005 19:09:27 -0000 1.4 +++ ChainableMockMethod5.h 29 Oct 2005 21:00:26 -0000 1.5 @@ -85,7 +85,7 @@ public: /** Construct the chainer object. - * @param meth pointer to according method mock. + * @param method pointer to according method mock. */ ChainerFor(ChainableMockMethod5Common &method) : Builder(&method.getCoreMock(), method.getChainableMockObject(), method.getMethodName()) Index: ChainableMockMethod0.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/ChainableMockMethod0.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- ChainableMockMethod0.h 29 Oct 2005 19:09:27 -0000 1.4 +++ ChainableMockMethod0.h 29 Oct 2005 21:00:26 -0000 1.5 @@ -85,7 +85,7 @@ public: /** Construct the chainer object. - * @param meth pointer to according method mock. + * @param method pointer to according method mock. */ ChainerFor(ChainableMockMethod0Common &method) : Builder(&method.getCoreMock(), method.getChainableMockObject(), method.getMethodName()) Index: ChainableMockMethod1.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/ChainableMockMethod1.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- ChainableMockMethod1.h 29 Oct 2005 19:09:27 -0000 1.4 +++ ChainableMockMethod1.h 29 Oct 2005 21:00:26 -0000 1.5 @@ -85,7 +85,7 @@ public: /** Construct the chainer object. - * @param meth pointer to according method mock. + * @param method pointer to according method mock. */ ChainerFor(ChainableMockMethod1Common &method) : Builder(&method.getCoreMock(), method.getChainableMockObject(), method.getMethodName()) |
From: Ewald A. <ewa...@us...> - 2005-10-29 21:00:39
|
Update of /cvsroot/mockpp/mockpp/mockpp/docs/en In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19293/mockpp/docs/en Modified Files: Makefile.am Log Message: cleanup in docs Index: Makefile.am =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/docs/en/Makefile.am,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- Makefile.am 28 Oct 2005 20:35:14 -0000 1.32 +++ Makefile.am 29 Oct 2005 21:00:27 -0000 1.33 @@ -33,7 +33,7 @@ -test -L api-doc && rm api-doc ln -s ../../docs/api/html api-doc mkdir -pv var - -rm -rf ./var/*.html + -rm -rf ./var -rm -rf ./var/common -rm -rf ./var/images cp -R $(srcdir)/common var |
From: Ewald A. <ewa...@us...> - 2005-10-29 21:00:39
|
Update of /cvsroot/mockpp/mockpp/mockpp/compat In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19293/mockpp/compat Modified Files: Assert.h Log Message: cleanup in docs Index: Assert.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/compat/Assert.h,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- Assert.h 6 Jan 2005 13:09:22 -0000 1.23 +++ Assert.h 29 Oct 2005 21:00:26 -0000 1.24 @@ -272,7 +272,7 @@ } -/** Asserts that a values lies between two boundary values.. +/** Asserts that a values lies between two boundary values. * @ingroup grp_helper * @param srcline the line in the sourcefile * @param srcfile the name of the sourcefile @@ -291,7 +291,7 @@ } -/** Asserts that a values lies between two boundary values.. +/** Asserts that a values lies between two boundary values. * @ingroup grp_helper * @param srcline the line in the sourcefile * @param srcfile the name of the sourcefile @@ -351,7 +351,7 @@ MOCKPP_PCHAR(#a) MOCKPP_PCHAR(" +- ") MOCKPP_PCHAR(#delta) \ MOCKPP_PCHAR(" == ") MOCKPP_PCHAR(#b), a, b, delta) -/** Asserts that a values lies between two boundary values.. +/** Asserts that a values lies between two boundary values. * @ingroup grp_helper * @param msg a human readable description about the cause * @param lo lower boundaray |
From: Ewald A. <ewa...@us...> - 2005-10-29 21:00:39
|
Update of /cvsroot/mockpp/mockpp/mockpp/constraint In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19293/mockpp/constraint Modified Files: ConstraintSetN.h Log Message: cleanup in docs |
From: Ewald A. <ewa...@us...> - 2005-10-29 21:00:37
|
Update of /cvsroot/mockpp/mockpp/mockpp/builder In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19293/mockpp/builder Modified Files: ArgumentsMatchBuilderN.h Log Message: cleanup in docs |
From: Ewald A. <ewa...@us...> - 2005-10-29 21:00:37
|
Update of /cvsroot/mockpp/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19293 Modified Files: mockpp.doxygen.in Log Message: cleanup in docs Index: mockpp.doxygen.in =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp.doxygen.in,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- mockpp.doxygen.in 29 Jul 2005 10:07:23 -0000 1.16 +++ mockpp.doxygen.in 29 Oct 2005 21:00:25 -0000 1.17 @@ -1002,6 +1002,7 @@ PREDEFINED = \ DOXYGEN \ + MOCKPP_USE_INVOCATION_EQUALS \ HAVE_ICONV_H \ HAVE_LIMITS \ HAVE_CPPUNIT \ |
From: Ewald A. <ewa...@us...> - 2005-10-29 19:09:40
|
Update of /cvsroot/mockpp/mockpp/mockpp/chaining In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23065/mockpp/chaining Modified Files: ChainableMockMethod0.h ChainableMockMethod1.h ChainableMockMethod2.h ChainableMockMethod3.h ChainableMockMethod4.h ChainableMockMethod5.h ChainableMockMethod6.h InvocationN.h gen_chainablemethod_N.pl Log Message: typos in docs Index: ChainableMockMethod6.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/ChainableMockMethod6.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ChainableMockMethod6.h 29 Oct 2005 18:17:30 -0000 1.1 +++ ChainableMockMethod6.h 29 Oct 2005 19:09:27 -0000 1.2 @@ -85,7 +85,7 @@ public: /** Construct the chainer object. - * @meth pointer to according method mock. + * @param meth pointer to according method mock. */ ChainerFor(ChainableMockMethod6Common &method) : Builder(&method.getCoreMock(), method.getChainableMockObject(), method.getMethodName()) Index: ChainableMockMethod2.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/ChainableMockMethod2.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- ChainableMockMethod2.h 29 Oct 2005 18:17:30 -0000 1.3 +++ ChainableMockMethod2.h 29 Oct 2005 19:09:27 -0000 1.4 @@ -85,7 +85,7 @@ public: /** Construct the chainer object. - * @meth pointer to according method mock. + * @param meth pointer to according method mock. */ ChainerFor(ChainableMockMethod2Common &method) : Builder(&method.getCoreMock(), method.getChainableMockObject(), method.getMethodName()) Index: ChainableMockMethod3.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/ChainableMockMethod3.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- ChainableMockMethod3.h 29 Oct 2005 18:17:30 -0000 1.3 +++ ChainableMockMethod3.h 29 Oct 2005 19:09:27 -0000 1.4 @@ -85,7 +85,7 @@ public: /** Construct the chainer object. - * @meth pointer to according method mock. + * @param meth pointer to according method mock. */ ChainerFor(ChainableMockMethod3Common &method) : Builder(&method.getCoreMock(), method.getChainableMockObject(), method.getMethodName()) Index: ChainableMockMethod4.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/ChainableMockMethod4.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- ChainableMockMethod4.h 29 Oct 2005 18:17:30 -0000 1.3 +++ ChainableMockMethod4.h 29 Oct 2005 19:09:27 -0000 1.4 @@ -85,7 +85,7 @@ public: /** Construct the chainer object. - * @meth pointer to according method mock. + * @param meth pointer to according method mock. */ ChainerFor(ChainableMockMethod4Common &method) : Builder(&method.getCoreMock(), method.getChainableMockObject(), method.getMethodName()) Index: gen_chainablemethod_N.pl =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/gen_chainablemethod_N.pl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- gen_chainablemethod_N.pl 25 Oct 2005 20:19:31 -0000 1.1 +++ gen_chainablemethod_N.pl 29 Oct 2005 19:09:27 -0000 1.2 @@ -223,7 +223,7 @@ public: /** Construct the chainer object. - * \@meth pointer to according method mock. + * \@param meth pointer to according method mock. */ ChainerFor(ChainableMockMethod" . $numArgs . "Common &method) : Builder(&method.getCoreMock(), method.getChainableMockObject(), method.getMethodName()) Index: ChainableMockMethod5.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/ChainableMockMethod5.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- ChainableMockMethod5.h 29 Oct 2005 18:17:30 -0000 1.3 +++ ChainableMockMethod5.h 29 Oct 2005 19:09:27 -0000 1.4 @@ -85,7 +85,7 @@ public: /** Construct the chainer object. - * @meth pointer to according method mock. + * @param meth pointer to according method mock. */ ChainerFor(ChainableMockMethod5Common &method) : Builder(&method.getCoreMock(), method.getChainableMockObject(), method.getMethodName()) Index: ChainableMockMethod0.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/ChainableMockMethod0.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- ChainableMockMethod0.h 29 Oct 2005 18:17:30 -0000 1.3 +++ ChainableMockMethod0.h 29 Oct 2005 19:09:27 -0000 1.4 @@ -85,7 +85,7 @@ public: /** Construct the chainer object. - * @meth pointer to according method mock. + * @param meth pointer to according method mock. */ ChainerFor(ChainableMockMethod0Common &method) : Builder(&method.getCoreMock(), method.getChainableMockObject(), method.getMethodName()) Index: ChainableMockMethod1.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/ChainableMockMethod1.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- ChainableMockMethod1.h 29 Oct 2005 18:17:30 -0000 1.3 +++ ChainableMockMethod1.h 29 Oct 2005 19:09:27 -0000 1.4 @@ -85,7 +85,7 @@ public: /** Construct the chainer object. - * @meth pointer to according method mock. + * @param meth pointer to according method mock. */ ChainerFor(ChainableMockMethod1Common &method) : Builder(&method.getCoreMock(), method.getChainableMockObject(), method.getMethodName()) |
From: Ewald A. <ewa...@us...> - 2005-10-29 19:09:40
|
Update of /cvsroot/mockpp/mockpp/mockpp/builder In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23065/mockpp/builder Modified Files: ArgumentsMatchBuilderN.h gen_argumentsmatchbuilder_N.pl Log Message: typos in docs Index: gen_argumentsmatchbuilder_N.pl =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/builder/gen_argumentsmatchbuilder_N.pl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- gen_argumentsmatchbuilder_N.pl 28 Oct 2005 19:04:04 -0000 1.1 +++ gen_argumentsmatchbuilder_N.pl 29 Oct 2005 19:09:27 -0000 1.2 @@ -197,7 +197,7 @@ * \@ingroup grp_chainer"; for($p = 1; $p <= $numArgs; ++$p) { print OUT " - * \@param cons" .$p . " pointer to the constraint for method parameter " .$p; } + * \@param p" .$p . " pointer to the constraint for method parameter " .$p; } print OUT " * \@return the builder object Index: ArgumentsMatchBuilderN.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/builder/ArgumentsMatchBuilderN.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- ArgumentsMatchBuilderN.h 29 Oct 2005 18:17:30 -0000 1.3 +++ ArgumentsMatchBuilderN.h 29 Oct 2005 19:09:27 -0000 1.4 @@ -61,7 +61,7 @@ /** Indicate a matcher for 1 arguments. * @ingroup grp_chainer - * @param cons1 pointer to the constraint for method parameter 1 + * @param p1 pointer to the constraint for method parameter 1 * @return the builder object */ MatchBuilder<R, I>& with( const ConstraintHolder<P1> &p1 ) @@ -104,8 +104,8 @@ /** Indicate a matcher for 2 arguments. * @ingroup grp_chainer - * @param cons1 pointer to the constraint for method parameter 1 - * @param cons2 pointer to the constraint for method parameter 2 + * @param p1 pointer to the constraint for method parameter 1 + * @param p2 pointer to the constraint for method parameter 2 * @return the builder object */ MatchBuilder<R, I>& with( const ConstraintHolder<P1> &p1 @@ -150,9 +150,9 @@ /** Indicate a matcher for 3 arguments. * @ingroup grp_chainer - * @param cons1 pointer to the constraint for method parameter 1 - * @param cons2 pointer to the constraint for method parameter 2 - * @param cons3 pointer to the constraint for method parameter 3 + * @param p1 pointer to the constraint for method parameter 1 + * @param p2 pointer to the constraint for method parameter 2 + * @param p3 pointer to the constraint for method parameter 3 * @return the builder object */ MatchBuilder<R, I>& with( const ConstraintHolder<P1> &p1 @@ -199,10 +199,10 @@ /** Indicate a matcher for 4 arguments. * @ingroup grp_chainer - * @param cons1 pointer to the constraint for method parameter 1 - * @param cons2 pointer to the constraint for method parameter 2 - * @param cons3 pointer to the constraint for method parameter 3 - * @param cons4 pointer to the constraint for method parameter 4 + * @param p1 pointer to the constraint for method parameter 1 + * @param p2 pointer to the constraint for method parameter 2 + * @param p3 pointer to the constraint for method parameter 3 + * @param p4 pointer to the constraint for method parameter 4 * @return the builder object */ MatchBuilder<R, I>& with( const ConstraintHolder<P1> &p1 @@ -251,11 +251,11 @@ /** Indicate a matcher for 5 arguments. * @ingroup grp_chainer - * @param cons1 pointer to the constraint for method parameter 1 - * @param cons2 pointer to the constraint for method parameter 2 - * @param cons3 pointer to the constraint for method parameter 3 - * @param cons4 pointer to the constraint for method parameter 4 - * @param cons5 pointer to the constraint for method parameter 5 + * @param p1 pointer to the constraint for method parameter 1 + * @param p2 pointer to the constraint for method parameter 2 + * @param p3 pointer to the constraint for method parameter 3 + * @param p4 pointer to the constraint for method parameter 4 + * @param p5 pointer to the constraint for method parameter 5 * @return the builder object */ MatchBuilder<R, I>& with( const ConstraintHolder<P1> &p1 @@ -306,12 +306,12 @@ /** Indicate a matcher for 6 arguments. * @ingroup grp_chainer - * @param cons1 pointer to the constraint for method parameter 1 - * @param cons2 pointer to the constraint for method parameter 2 - * @param cons3 pointer to the constraint for method parameter 3 - * @param cons4 pointer to the constraint for method parameter 4 - * @param cons5 pointer to the constraint for method parameter 5 - * @param cons6 pointer to the constraint for method parameter 6 + * @param p1 pointer to the constraint for method parameter 1 + * @param p2 pointer to the constraint for method parameter 2 + * @param p3 pointer to the constraint for method parameter 3 + * @param p4 pointer to the constraint for method parameter 4 + * @param p5 pointer to the constraint for method parameter 5 + * @param p6 pointer to the constraint for method parameter 6 * @return the builder object */ MatchBuilder<R, I>& with( const ConstraintHolder<P1> &p1 |
From: Ewald A. <ewa...@us...> - 2005-10-29 19:09:39
|
Update of /cvsroot/mockpp/mockpp/mockpp/constraint In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23065/mockpp/constraint Modified Files: ConstraintSetN.h Log Message: typos in docs |
From: Ewald A. <ewa...@us...> - 2005-10-29 19:09:39
|
Update of /cvsroot/mockpp/mockpp/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23065/mockpp Modified Files: ResponseVector1.h ResponseVector2.h ResponseVector3.h ResponseVector4.h ResponseVector5.h ResponseVector6.h VisitableMockMethod0.h VisitableMockMethod1.h VisitableMockMethod2.h VisitableMockMethod3.h VisitableMockMethod4.h VisitableMockMethod5.h VisitableMockMethod6.h gen_visitablemethod_N.pl mockpp_dbc.h Log Message: typos in docs Index: VisitableMockMethod6.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/VisitableMockMethod6.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- VisitableMockMethod6.h 29 Oct 2005 18:17:30 -0000 1.1 +++ VisitableMockMethod6.h 29 Oct 2005 19:09:26 -0000 1.2 @@ -154,7 +154,7 @@ typedef typename VisitableMockReturningMethodBase<R>::ControllerFor Inherited; /** Construct the controller object. - * @meth pointer to according method mock. + * @param meth pointer to according method mock. */ ControllerFor (VisitableMockReturningMethodBase<R> *meth) : Inherited(meth) @@ -261,7 +261,7 @@ typedef typename VisitableMockReturningMethodBase<R>::ControllerFor Inherited; /** Construct the controller object. - * @meth pointer to according method mock. + * @param meth pointer to according method mock. */ ControllerFor (VisitableMockReturningMethodBase<R> *meth) : Inherited(meth) @@ -355,7 +355,7 @@ typedef VisitableMockReturningMethodBase<void>::ControllerFor Inherited; /** Construct the controller object. - * @meth pointer to according method mock. + * @param meth pointer to according method mock. */ ControllerFor (VisitableMockReturningMethodBase<void> *meth) : Inherited(meth) Index: VisitableMockMethod2.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/VisitableMockMethod2.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- VisitableMockMethod2.h 29 Oct 2005 18:17:30 -0000 1.3 +++ VisitableMockMethod2.h 29 Oct 2005 19:09:26 -0000 1.4 @@ -126,7 +126,7 @@ typedef typename VisitableMockReturningMethodBase<R>::ControllerFor Inherited; /** Construct the controller object. - * @meth pointer to according method mock. + * @param meth pointer to according method mock. */ ControllerFor (VisitableMockReturningMethodBase<R> *meth) : Inherited(meth) @@ -217,7 +217,7 @@ typedef typename VisitableMockReturningMethodBase<R>::ControllerFor Inherited; /** Construct the controller object. - * @meth pointer to according method mock. + * @param meth pointer to according method mock. */ ControllerFor (VisitableMockReturningMethodBase<R> *meth) : Inherited(meth) @@ -299,7 +299,7 @@ typedef VisitableMockReturningMethodBase<void>::ControllerFor Inherited; /** Construct the controller object. - * @meth pointer to according method mock. + * @param meth pointer to according method mock. */ ControllerFor (VisitableMockReturningMethodBase<void> *meth) : Inherited(meth) Index: gen_visitablemethod_N.pl =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/gen_visitablemethod_N.pl,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- gen_visitablemethod_N.pl 29 Oct 2005 18:17:30 -0000 1.6 +++ gen_visitablemethod_N.pl 29 Oct 2005 19:09:26 -0000 1.7 @@ -309,7 +309,7 @@ typedef typename VisitableMockReturningMethodBase<R>::ControllerFor Inherited; /** Construct the controller object. - * \@meth pointer to according method mock. + * \@param meth pointer to according method mock. */ ControllerFor (VisitableMockReturningMethodBase<R> *meth) : Inherited(meth) @@ -438,7 +438,7 @@ typedef typename VisitableMockReturningMethodBase<R>::ControllerFor Inherited; /** Construct the controller object. - * \@meth pointer to according method mock. + * \@param meth pointer to according method mock. */ ControllerFor (VisitableMockReturningMethodBase<R> *meth) : Inherited(meth) @@ -543,7 +543,7 @@ typedef VisitableMockReturningMethodBase<void>::ControllerFor Inherited; /** Construct the controller object. - * \@meth pointer to according method mock. + * \@param meth pointer to according method mock. */ ControllerFor (VisitableMockReturningMethodBase<void> *meth) : Inherited(meth) Index: VisitableMockMethod3.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/VisitableMockMethod3.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- VisitableMockMethod3.h 29 Oct 2005 18:17:30 -0000 1.3 +++ VisitableMockMethod3.h 29 Oct 2005 19:09:26 -0000 1.4 @@ -133,7 +133,7 @@ typedef typename VisitableMockReturningMethodBase<R>::ControllerFor Inherited; /** Construct the controller object. - * @meth pointer to according method mock. + * @param meth pointer to according method mock. */ ControllerFor (VisitableMockReturningMethodBase<R> *meth) : Inherited(meth) @@ -228,7 +228,7 @@ typedef typename VisitableMockReturningMethodBase<R>::ControllerFor Inherited; /** Construct the controller object. - * @meth pointer to according method mock. + * @param meth pointer to according method mock. */ ControllerFor (VisitableMockReturningMethodBase<R> *meth) : Inherited(meth) @@ -313,7 +313,7 @@ typedef VisitableMockReturningMethodBase<void>::ControllerFor Inherited; /** Construct the controller object. - * @meth pointer to according method mock. + * @param meth pointer to according method mock. */ ControllerFor (VisitableMockReturningMethodBase<void> *meth) : Inherited(meth) Index: mockpp_dbc.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/mockpp_dbc.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- mockpp_dbc.h 3 Sep 2005 09:44:42 -0000 1.2 +++ mockpp_dbc.h 29 Oct 2005 19:09:26 -0000 1.3 @@ -14,6 +14,7 @@ "MOCKPP_POST_MSG(a,b) = / *! \post a \code b \endcode * /" \ "MOCKPP_INVARIANT(a) = / *! \invariant a * /" \ "MOCKPP_INVARIANT_MSG(a,b) = / *! \invariant a \code b \endcode * /" + @endverbatim $Id$ Index: VisitableMockMethod4.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/VisitableMockMethod4.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- VisitableMockMethod4.h 29 Oct 2005 18:17:30 -0000 1.3 +++ VisitableMockMethod4.h 29 Oct 2005 19:09:26 -0000 1.4 @@ -140,7 +140,7 @@ typedef typename VisitableMockReturningMethodBase<R>::ControllerFor Inherited; /** Construct the controller object. - * @meth pointer to according method mock. + * @param meth pointer to according method mock. */ ControllerFor (VisitableMockReturningMethodBase<R> *meth) : Inherited(meth) @@ -239,7 +239,7 @@ typedef typename VisitableMockReturningMethodBase<R>::ControllerFor Inherited; /** Construct the controller object. - * @meth pointer to according method mock. + * @param meth pointer to according method mock. */ ControllerFor (VisitableMockReturningMethodBase<R> *meth) : Inherited(meth) @@ -327,7 +327,7 @@ typedef VisitableMockReturningMethodBase<void>::ControllerFor Inherited; /** Construct the controller object. - * @meth pointer to according method mock. + * @param meth pointer to according method mock. */ ControllerFor (VisitableMockReturningMethodBase<void> *meth) : Inherited(meth) Index: VisitableMockMethod0.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/VisitableMockMethod0.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- VisitableMockMethod0.h 29 Oct 2005 18:17:30 -0000 1.3 +++ VisitableMockMethod0.h 29 Oct 2005 19:09:26 -0000 1.4 @@ -94,7 +94,7 @@ typedef typename VisitableMockReturningMethodBase<R>::ControllerFor Inherited; /** Construct the controller object. - * @meth pointer to according method mock. + * @param meth pointer to according method mock. */ ControllerFor (VisitableMockReturningMethodBase<R> *meth) : Inherited(meth) @@ -142,7 +142,7 @@ typedef typename VisitableMockReturningMethodBase<R>::ControllerFor Inherited; /** Construct the controller object. - * @meth pointer to according method mock. + * @param meth pointer to according method mock. */ ControllerFor (VisitableMockReturningMethodBase<R> *meth) : Inherited(meth) @@ -190,7 +190,7 @@ typedef VisitableMockReturningMethodBase<void>::ControllerFor Inherited; /** Construct the controller object. - * @meth pointer to according method mock. + * @param meth pointer to according method mock. */ ControllerFor (VisitableMockReturningMethodBase<void> *meth) : Inherited(meth) Index: VisitableMockMethod5.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/VisitableMockMethod5.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- VisitableMockMethod5.h 29 Oct 2005 18:17:30 -0000 1.3 +++ VisitableMockMethod5.h 29 Oct 2005 19:09:26 -0000 1.4 @@ -147,7 +147,7 @@ typedef typename VisitableMockReturningMethodBase<R>::ControllerFor Inherited; /** Construct the controller object. - * @meth pointer to according method mock. + * @param meth pointer to according method mock. */ ControllerFor (VisitableMockReturningMethodBase<R> *meth) : Inherited(meth) @@ -250,7 +250,7 @@ typedef typename VisitableMockReturningMethodBase<R>::ControllerFor Inherited; /** Construct the controller object. - * @meth pointer to according method mock. + * @param meth pointer to according method mock. */ ControllerFor (VisitableMockReturningMethodBase<R> *meth) : Inherited(meth) @@ -341,7 +341,7 @@ typedef VisitableMockReturningMethodBase<void>::ControllerFor Inherited; /** Construct the controller object. - * @meth pointer to according method mock. + * @param meth pointer to according method mock. */ ControllerFor (VisitableMockReturningMethodBase<void> *meth) : Inherited(meth) Index: VisitableMockMethod1.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/VisitableMockMethod1.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- VisitableMockMethod1.h 29 Oct 2005 18:17:30 -0000 1.3 +++ VisitableMockMethod1.h 29 Oct 2005 19:09:26 -0000 1.4 @@ -119,7 +119,7 @@ typedef typename VisitableMockReturningMethodBase<R>::ControllerFor Inherited; /** Construct the controller object. - * @meth pointer to according method mock. + * @param meth pointer to according method mock. */ ControllerFor (VisitableMockReturningMethodBase<R> *meth) : Inherited(meth) @@ -206,7 +206,7 @@ typedef typename VisitableMockReturningMethodBase<R>::ControllerFor Inherited; /** Construct the controller object. - * @meth pointer to according method mock. + * @param meth pointer to according method mock. */ ControllerFor (VisitableMockReturningMethodBase<R> *meth) : Inherited(meth) @@ -285,7 +285,7 @@ typedef VisitableMockReturningMethodBase<void>::ControllerFor Inherited; /** Construct the controller object. - * @meth pointer to according method mock. + * @param meth pointer to according method mock. */ ControllerFor (VisitableMockReturningMethodBase<void> *meth) : Inherited(meth) |
From: Ewald A. <ewa...@us...> - 2005-10-29 18:17:39
|
Update of /cvsroot/mockpp/mockpp/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11255/mockpp Modified Files: Makefile.am ResponseVector1.h ResponseVector2.h ResponseVector3.h ResponseVector4.h ResponseVector5.h VisitableMockMethod0.h VisitableMockMethod1.h VisitableMockMethod2.h VisitableMockMethod3.h VisitableMockMethod4.h VisitableMockMethod5.h gen_visitablemethod_N.pl Added Files: ResponseVector6.h VisitableMockMethod6.h Log Message: provide up to 6 parameters --- NEW FILE: VisitableMockMethod6.h --- /** @file @brief Visitable Mock Method with 6 parameters. Generated with gen_visitablemethod_N.pl. $Id: VisitableMockMethod6.h,v 1.1 2005/10/29 18:17:30 ewald-arnold Exp $ ***************************************************************************/ /************************************************************************** begin : Thu Oct 22 2005 copyright : (C) 2002-2005 by Ewald Arnold email : mockpp at ewald-arnold dot de This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. **/ #ifndef MOCKPP_VisitableMockMethod6_H #define MOCKPP_VisitableMockMethod6_H #include <mockpp/mockpp.h> #include <mockpp/VisitableMockObject.h> #include <mockpp/VisitableMockMethod.h> #include <mockpp/ResponseVector6.h> namespace mockpp { /** Common stuff to set up visitable mock method expectations with 6 parameters. * @ingroup grp_controller */ template <typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6> class VisitableMockMethod6Common : public VisitableMockReturningMethodBase<R> { public: /** Constructs the mock object. * @param name human readable description about the expectation * @param parent parent Visitable mock object */ VisitableMockMethod6Common(const String &name, VisitableMockObject *parent = 0) : VisitableMockReturningMethodBase<R>(name, parent) , responseThrowables(this->getMethodName() + MOCKPP_PCHAR("/responseThrowables") , this) , parameter1(this->getMethodName() + MOCKPP_PCHAR("/parameter1"), this) , parameter2(this->getMethodName() + MOCKPP_PCHAR("/parameter2"), this) , parameter3(this->getMethodName() + MOCKPP_PCHAR("/parameter3"), this) , parameter4(this->getMethodName() + MOCKPP_PCHAR("/parameter4"), this) , parameter5(this->getMethodName() + MOCKPP_PCHAR("/parameter5"), this) , parameter6(this->getMethodName() + MOCKPP_PCHAR("/parameter6"), this) { } /** 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 { MOCKPP_ASSERT_FALSE(this->getVisitableMockObject()->isActivated()); this->getVisitableMockObject()->addExpectedMethod(this->getMethodIdentifier()); parameter1.addExpected(p1); parameter2.addExpected(p2); parameter3.addExpected(p3); parameter4.addExpected(p4); parameter5.addExpected(p5); parameter6.addExpected(p6); } protected: /** Perform the internals to verify a mocked method. * @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_param(const P1 &p1, const P2 &p2, const P3 &p3, const P4 &p4, const P5 &p5, const P6 &p6) const { if (!this->getVisitableMockObject()->isActivated() ) { this->getVisitableMockObject()->addExpectedMethod(this->getMethodIdentifier()); parameter1.addExpected(p1); parameter2.addExpected(p2); parameter3.addExpected(p3); parameter4.addExpected(p4); parameter5.addExpected(p5); parameter6.addExpected(p6); } else { try { this->getVisitableMockObject()->addActualMethod(this->getMethodIdentifier()); Throwable *t; if (this->responseValues.find(t, p1, p2, p3, p4, p5, p6)) t->throw_me(); this->throwAvailableException(); } catch(...) { parameter1.balanceActual(); parameter2.balanceActual(); parameter3.balanceActual(); parameter4.balanceActual(); parameter5.balanceActual(); parameter6.balanceActual(); throw; } parameter1.addActual(p1); parameter2.addActual(p2); parameter3.addActual(p3); parameter4.addActual(p4); parameter5.addActual(p5); parameter6.addActual(p6); } } public: /** Helper object to easily set up the visitable expectations. * @ingroup grp_controller */ class ControllerFor : public VisitableMockReturningMethodBase<R>::ControllerFor { public: typedef typename VisitableMockReturningMethodBase<R>::ControllerFor Inherited; /** Construct the controller object. * @meth pointer to according method mock. */ ControllerFor (VisitableMockReturningMethodBase<R> *meth) : Inherited(meth) { } /** Adds another response throwable. * Response values are determined on the parameters you pass. This way the * object returns a value that is totally based on the input. * @param t the throwable object * @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 * @param count the number of times this value shall be returned. Default is unlimited. */ void addResponseThrowable(Throwable *t, const P1 &p1, const P2 &p2, const P3 &p3, const P4 &p4, const P5 &p5, const P6 &p6, unsigned count = MOCKPP_UNLIMITED) { MOCKPP_ASSERT_FALSE(this->object->isActivated()); this->method->responseValues.add(t, p1, p2, p3, p4, p5, p6, count); } /** Adds another response throwable. * Response values are determined on the parameters you pass. This way the * object returns a value that is totally based on the input. * @param t the throwable object * @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 * @param count the number of times this value shall be returned. Default is unlimited. */ void addResponseThrowable(Throwable *t, const ConstraintHolder<P1> &p1, const ConstraintHolder<P2> &p2, const ConstraintHolder<P3> &p3, const ConstraintHolder<P4> &p4, const ConstraintHolder<P5> &p5, const ConstraintHolder<P6> &p6, unsigned count = MOCKPP_UNLIMITED) { MOCKPP_ASSERT_FALSE(this->object->isActivated()); this->method->responseValues.add(t, p1, p2, p3, p4, p5, p6, count); } }; friend class ControllerFor; private: mutable ResponseThrowableVector6<P1, P2, P3, P4, P5, P6> responseThrowables; mutable ConstraintList<P1> parameter1; mutable ConstraintList<P2> parameter2; mutable ConstraintList<P3> parameter3; mutable ConstraintList<P4> parameter4; mutable ConstraintList<P5> parameter5; mutable ConstraintList<P6> parameter6; }; /** Set up visitable mock method expectations with 6 parameters. * @ingroup grp_controller */ template <typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6> class VisitableMockMethod6 : public VisitableMockMethod6Common<R, P1, P2, P3, P4, P5, P6> { public: /** Constructs the mock object. * @param name human readable description about the expectation * @param parent parent Visitable mock object */ VisitableMockMethod6(const String &name, VisitableMockObject *parent = 0) : VisitableMockMethod6Common<R, P1, P2, P3, P4, P5, P6>(name, parent) , responseValues(this->getMethodName() + MOCKPP_PCHAR("/responseValues") , this) { } /** 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 */ R forward(const P1 &p1, const P2 &p2, const P3 &p3, const P4 &p4, const P5 &p5, const P6 &p6) const { this->forward_param(p1, p2, p3, p4, p5, p6); R ret_val; if (this->method->responseValues.find(ret_val, p1, p2, p3, p4, p5, p6)) return ret_val; return this->determineReturnValue(); } /** Helper object to easily set up the visitable expectations. * @ingroup grp_controller */ class ControllerFor : public VisitableMockReturningMethodBase<void>::ControllerFor { public: typedef typename VisitableMockReturningMethodBase<R>::ControllerFor Inherited; /** Construct the controller object. * @meth pointer to according method mock. */ ControllerFor (VisitableMockReturningMethodBase<R> *meth) : Inherited(meth) { } /** Adds another response value. * Response values are determined on the parameters you pass. This way the * object returns a value that is totally based on the input. * @param rv the return value * @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 * @param count the number of times this value shall be returned. Default is unlimited. */ void addResponseValue(const R &rv, const P1 &p1, const P2 &p2, const P3 &p3, const P4 &p4, const P5 &p5, const P6 &p6, unsigned count = MOCKPP_UNLIMITED) { MOCKPP_ASSERT_FALSE(this->object->isActivated()); this->method->responseValues.add(rv, p1, p2, p3, p4, p5, p6, count); } /** Adds another response value. * Response values are determined on the parameters you pass. This way the * object returns a value that is totally based on the input. * @param rv the return value * @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 * @param count the number of times this value shall be returned. Default is unlimited. */ void addResponseValue(const R &rv, const ConstraintHolder<P1> &p1, const ConstraintHolder<P2> &p2, const ConstraintHolder<P3> &p3, const ConstraintHolder<P4> &p4, const ConstraintHolder<P5> &p5, const ConstraintHolder<P6> &p6, unsigned count = MOCKPP_UNLIMITED) { MOCKPP_ASSERT_FALSE(this->object->isActivated()); this->method->responseValues.add(rv, p1, p2, p3, p4, p5, p6, count); } }; friend class ControllerFor; private: mutable ResponseVector6<R, P1, P2, P3, P4, P5, P6> responseValues; }; /** Set up visitable mock method expectations with 6 parameters. * Partial specialisation for a void return value. * @ingroup grp_controller */ template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6> class VisitableMockMethod6<void, P1, P2, P3, P4, P5, P6> : public VisitableMockMethod6Common<void, P1, P2, P3, P4, P5, P6> { public: /** Constructs the mock object. * @param name human readable description about the expectation * @param parent parent Visitable mock object */ VisitableMockMethod6(const String &name, VisitableMockObject *parent = 0) : VisitableMockMethod6Common<void, P1, P2, P3, P4, P5, P6>(name, parent) { } /** 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 */ void forward(const P1 &p1, const P2 &p2, const P3 &p3, const P4 &p4, const P5 &p5, const P6 &p6) const { this->forward_param(p1, p2, p3, p4, p5, p6); } /** Helper object to easily set up the visitable expectations. * @ingroup grp_controller */ class ControllerFor : public VisitableMockReturningMethodBase<void>::ControllerFor { public: typedef VisitableMockReturningMethodBase<void>::ControllerFor Inherited; /** Construct the controller object. * @meth pointer to according method mock. */ ControllerFor (VisitableMockReturningMethodBase<void> *meth) : Inherited(meth) { } }; friend class ControllerFor; }; } // ns mockpp #endif // MOCKPP_VisitableMockMethod6_H Index: VisitableMockMethod2.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/VisitableMockMethod2.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- VisitableMockMethod2.h 28 Oct 2005 20:35:13 -0000 1.2 +++ VisitableMockMethod2.h 29 Oct 2005 18:17:30 -0000 1.3 @@ -35,7 +35,7 @@ #include <mockpp/VisitableMockObject.h> #include <mockpp/VisitableMockMethod.h> -//#include <mockpp/ResponseVector2.h> +#include <mockpp/ResponseVector2.h> namespace mockpp { Index: gen_visitablemethod_N.pl =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/gen_visitablemethod_N.pl,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- gen_visitablemethod_N.pl 26 Oct 2005 20:05:43 -0000 1.5 +++ gen_visitablemethod_N.pl 29 Oct 2005 18:17:30 -0000 1.6 @@ -55,8 +55,12 @@ #include <mockpp/mockpp.h> #include <mockpp/VisitableMockObject.h> -#include <mockpp/VisitableMockMethod.h> -//#include <mockpp/ResponseVector" . $numArgs . ".h> +#include <mockpp/VisitableMockMethod.h>"; + +if ($numArgs > 0){ print OUT " +#include <mockpp/ResponseVector" . $numArgs . ".h>"; } + +print OUT " namespace mockpp { Index: VisitableMockMethod3.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/VisitableMockMethod3.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- VisitableMockMethod3.h 28 Oct 2005 20:35:13 -0000 1.2 +++ VisitableMockMethod3.h 29 Oct 2005 18:17:30 -0000 1.3 @@ -35,7 +35,7 @@ #include <mockpp/VisitableMockObject.h> #include <mockpp/VisitableMockMethod.h> -//#include <mockpp/ResponseVector3.h> +#include <mockpp/ResponseVector3.h> namespace mockpp { Index: Makefile.am =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/Makefile.am,v retrieving revision 1.92 retrieving revision 1.93 diff -u -d -r1.92 -r1.93 --- Makefile.am 28 Oct 2005 20:35:13 -0000 1.92 +++ Makefile.am 29 Oct 2005 18:17:30 -0000 1.93 @@ -37,11 +37,13 @@ VisitableMockMethod3.h \ VisitableMockMethod4.h \ VisitableMockMethod5.h \ + VisitableMockMethod6.h \ ResponseVector1.h \ ResponseVector2.h \ ResponseVector3.h \ ResponseVector4.h \ - ResponseVector5.h + ResponseVector5.h \ + ResponseVector6.h EXTRA_DIST = \ mockpp_config-bcb5.h \ Index: VisitableMockMethod4.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/VisitableMockMethod4.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- VisitableMockMethod4.h 28 Oct 2005 20:35:13 -0000 1.2 +++ VisitableMockMethod4.h 29 Oct 2005 18:17:30 -0000 1.3 @@ -35,7 +35,7 @@ #include <mockpp/VisitableMockObject.h> #include <mockpp/VisitableMockMethod.h> -//#include <mockpp/ResponseVector4.h> +#include <mockpp/ResponseVector4.h> namespace mockpp { --- NEW FILE: ResponseVector6.h --- /** @file @internal NOT INTENDED FOR PUBLIC INCLUSION @brief Generated with gen_responsevector_N.pl. $Id: ResponseVector6.h,v 1.1 2005/10/29 18:17:30 ewald-arnold Exp $ ***************************************************************************/ /************************************************************************** begin : Sat Feb 15 2003 copyright : (C) 2002-2005 by Ewald Arnold email : mockpp at ewald-arnold dot de This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. **/ #ifndef MOCKPP_ResponseVector6_H #define MOCKPP_ResponseVector6_H #include <mockpp/constraint/ConstraintHolder.h> #include <mockpp/constraint/IsEqual.h> namespace mockpp { /** Class returning a throwable depending on the parameters * passed to a method. */ template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6> class ResponseThrowableVector6 : public ResponseVectorBase { public: /** * Construct a new empty vector * @param aName Label used to identify vector * @param parent parent verifiable */ ResponseThrowableVector6(const String &aName, VerifiableList *parent) : ResponseVectorBase(aName, parent) {} /** Destroys the vector */ virtual ~ResponseThrowableVector6() { reset(); } /** Adds a throwable. * @param t the throwable * @param p1 the parameter 1 upon which to return * @param p2 the parameter 2 upon which to return * @param p3 the parameter 3 upon which to return * @param p4 the parameter 4 upon which to return * @param p5 the parameter 5 upon which to return * @param p6 the parameter 6 upon which to return * @param count the number of times the object may be used */ void add(Throwable *t, const P1 &p1, const P2 &p2, const P3 &p3, const P4 &p4, const P5 &p5, const P6 &p6, unsigned count) { const ConstraintHolder<P1> h1 = new IsEqual<P1>(p1); const ConstraintHolder<P2> h2 = new IsEqual<P2>(p2); const ConstraintHolder<P3> h3 = new IsEqual<P3>(p3); const ConstraintHolder<P4> h4 = new IsEqual<P4>(p4); const ConstraintHolder<P5> h5 = new IsEqual<P5>(p5); const ConstraintHolder<P6> h6 = new IsEqual<P6>(p6); add(t, h1, h2, h3, h4, h5, h6, count); } /** Adds a throwable. * @param t the throwable * @param p1 the parameter 1 upon which to return * @param p2 the parameter 2 upon which to return * @param p3 the parameter 3 upon which to return * @param p4 the parameter 4 upon which to return * @param p5 the parameter 5 upon which to return * @param p6 the parameter 6 upon which to return * @param count the number of times the object may be used */ void add(Throwable *t, const ConstraintHolder<P1> &p1, const ConstraintHolder<P2> &p2, const ConstraintHolder<P3> &p3, const ConstraintHolder<P4> &p4, const ConstraintHolder<P5> &p5, const ConstraintHolder<P6> &p6, unsigned count) { counter.push_back(count); tvec.push_back(t); typename mockpp::Constraint<P1>::AP cons1 (p1); typename mockpp::Constraint<P2>::AP cons2 (p2); typename mockpp::Constraint<P3>::AP cons3 (p3); typename mockpp::Constraint<P4>::AP cons4 (p4); typename mockpp::Constraint<P5>::AP cons5 (p5); typename mockpp::Constraint<P6>::AP cons6 (p6); t1vec.push_back(cons1.release()); t2vec.push_back(cons2.release()); t3vec.push_back(cons3.release()); t4vec.push_back(cons4.release()); t5vec.push_back(cons5.release()); t6vec.push_back(cons6.release()); } /** Removes all the objects from the list. */ virtual void reset() { clear(); } /** Removes all the objects from the list. */ void clear() { counter.clear(); tvec.clear(); for (unsigned i1 = 0; i1 < t1vec.size(); ++i1) delete t1vec[i1]; t1vec.clear(); for (unsigned i2 = 0; i2 < t2vec.size(); ++i2) delete t2vec[i2]; t2vec.clear(); for (unsigned i3 = 0; i3 < t3vec.size(); ++i3) delete t3vec[i3]; t3vec.clear(); for (unsigned i4 = 0; i4 < t4vec.size(); ++i4) delete t4vec[i4]; t4vec.clear(); for (unsigned i5 = 0; i5 < t5vec.size(); ++i5) delete t5vec[i5]; t5vec.clear(); for (unsigned i6 = 0; i6 < t6vec.size(); ++i6) delete t6vec[i6]; t6vec.clear(); } /** Finds a throwable for a set of parameters. * @param t the throwable * @param p1 the parameter 1 upon which to return * @param p2 the parameter 2 upon which to return * @param p3 the parameter 3 upon which to return * @param p4 the parameter 4 upon which to return * @param p5 the parameter 5 upon which to return * @param p6 the parameter 6 upon which to return * @return true: throwable found for parameters */ bool find(Throwable * &t, const P1 &p1, const P2 &p2, const P3 &p3, const P4 &p4, const P5 &p5, const P6 &p6) { for (unsigned i = 0; i < t1vec.size(); ++i) if ( counter[i] > 0 && t1vec[i]->eval(p1) && t2vec[i]->eval(p2) && t3vec[i]->eval(p3) && t4vec[i]->eval(p4) && t5vec[i]->eval(p5) && t6vec[i]->eval(p6) ) { if (tvec.at(i) == 0) return false; if (counter[i] != MOCKPP_UNLIMITED) --counter[i]; t = tvec.at(i); return true; } return false; } protected: std::vector<Constraint<P1>*> t1vec; std::vector<Constraint<P2>*> t2vec; std::vector<Constraint<P3>*> t3vec; std::vector<Constraint<P4>*> t4vec; std::vector<Constraint<P5>*> t5vec; std::vector<Constraint<P6>*> t6vec; }; /** Class returning a throwable depending on the parameters * passed to a method. */ template <typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6> class ResponseVector6 : public ResponseThrowableVector6<P1, P2, P3, P4, P5, P6> { public: /** Construct a new empty vector * @param aName Label used to identify vector * @param parent parent verifiable */ ResponseVector6(const String &aName, VerifiableList *parent) : ResponseThrowableVector6<P1, P2, P3, P4, P5, P6>(aName, parent) {} /** Adds a throwable. * @param t the throwable * @param p1 the parameter 1 upon which to return * @param p2 the parameter 2 upon which to return * @param p3 the parameter 3 upon which to return * @param p4 the parameter 4 upon which to return * @param p5 the parameter 5 upon which to return * @param p6 the parameter 6 upon which to return * @param count the number of times the object may be used */ void add(Throwable *t, const P1 &p1, const P2 &p2, const P3 &p3, const P4 &p4, const P5 &p5, const P6 &p6, unsigned count) { MOCKPP_ASSERT_TRUE(t != 0); ResponseThrowableVector6<P1, P2, P3, P4, P5, P6>::add(t, p1, p2, p3, p4, p5, p6, count); R r; rvec.push_back(r); } /** Adds a throwable. * @param t the throwable * @param p1 the parameter 1 upon which to return * @param p2 the parameter 2 upon which to return * @param p3 the parameter 3 upon which to return * @param p4 the parameter 4 upon which to return * @param p5 the parameter 5 upon which to return * @param p6 the parameter 6 upon which to return * @param count the number of times the object may be used */ void add(Throwable *t, const ConstraintHolder<P1> &p1, const ConstraintHolder<P2> &p2, const ConstraintHolder<P3> &p3, const ConstraintHolder<P4> &p4, const ConstraintHolder<P5> &p5, const ConstraintHolder<P6> &p6, unsigned count) { MOCKPP_ASSERT_TRUE(t != 0); ResponseThrowableVector6<P1, P2, P3, P4, P5, P6>::add (t, p1, p2, p3, p4, p5, p6, count); R r; rvec.push_back(r); } /** Adds a return value. * @param r the return value * @param p1 the parameter 1 upon which to return * @param p2 the parameter 2 upon which to return * @param p3 the parameter 3 upon which to return * @param p4 the parameter 4 upon which to return * @param p5 the parameter 5 upon which to return * @param p6 the parameter 6 upon which to return * @param count the number of times the object may be used */ void add(const R &r, const P1 &p1, const P2 &p2, const P3 &p3, const P4 &p4, const P5 &p5, const P6 &p6, unsigned count) { ResponseThrowableVector6<P1, P2, P3, P4, P5, P6>::add((Throwable*)0, p1, p2, p3, p4, p5, p6, count); rvec.push_back(r); } /** Adds a return value. * @param r the return value * @param p1 the parameter 1 upon which to return * @param p2 the parameter 2 upon which to return * @param p3 the parameter 3 upon which to return * @param p4 the parameter 4 upon which to return * @param p5 the parameter 5 upon which to return * @param p6 the parameter 6 upon which to return * @param count the number of times the object may be used */ void add(const R &r, const ConstraintHolder<P1> &p1, const ConstraintHolder<P2> &p2, const ConstraintHolder<P3> &p3, const ConstraintHolder<P4> &p4, const ConstraintHolder<P5> &p5, const ConstraintHolder<P6> &p6, unsigned count) { ResponseThrowableVector6<P1, P2, P3, P4, P5, P6>::add((Throwable*)0, p1, p2, p3, p4, p5, p6, count); rvec.push_back(r); } /** Removes all the objects from the list. */ virtual void reset() { clear(); } /** Removes all the objects from the list. */ void clear() { ResponseThrowableVector6<P1, P2, P3, P4, P5, P6>::clear(); rvec.clear(); } #if defined(__BORLANDC__) || (__GNUC__ < 3) // ==> BCB5.5.1 ?? F1004 Internal compiler error at 0x12548c1 with base 0x1200000 bool find(Throwable * &t, const P1 &p1, const P2 &p2, const P3 &p3, const P4 &p4, const P5 &p5, const P6 &p6) { return ResponseThrowableVector6<P1, P2, P3, P4, P5, P6>::find(t, p1, p2, p3, p4, p5, p6); } #else using ResponseThrowableVector6<P1, P2, P3, P4, P5, P6>::find; #endif /** Finds a return value for a set of parameters. * @param r the value * @param p1 the parameter 1 upon which to return * @param p2 the parameter 2 upon which to return * @param p3 the parameter 3 upon which to return * @param p4 the parameter 4 upon which to return * @param p5 the parameter 5 upon which to return * @param p6 the parameter 6 upon which to return * @return true: return value found for parameters */ bool find(R &r, const P1 &p1, const P2 &p2, const P3 &p3, const P4 &p4, const P5 &p5, const P6 &p6) { for (unsigned i = 0; i < this->t1vec.size(); ++i) if ( this->counter[i] > 0 && this->t1vec[i]->eval(p1) && this->t2vec[i]->eval(p2) && this->t3vec[i]->eval(p3) && this->t4vec[i]->eval(p4) && this->t5vec[i]->eval(p5) && this->t6vec[i]->eval(p6) ) { if (this->tvec.at(i) != 0) return false; if (this->counter[i] != MOCKPP_UNLIMITED) --this->counter[i]; r = rvec[i]; return true; } return false; } private: std::vector<R> rvec; }; } // ns mockpp #endif // MOCKPP_ResponseVector6_H Index: VisitableMockMethod0.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/VisitableMockMethod0.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- VisitableMockMethod0.h 28 Oct 2005 20:35:13 -0000 1.2 +++ VisitableMockMethod0.h 29 Oct 2005 18:17:30 -0000 1.3 @@ -35,7 +35,6 @@ #include <mockpp/VisitableMockObject.h> #include <mockpp/VisitableMockMethod.h> -//#include <mockpp/ResponseVector0.h> namespace mockpp { Index: VisitableMockMethod5.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/VisitableMockMethod5.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- VisitableMockMethod5.h 28 Oct 2005 20:35:13 -0000 1.2 +++ VisitableMockMethod5.h 29 Oct 2005 18:17:30 -0000 1.3 @@ -35,7 +35,7 @@ #include <mockpp/VisitableMockObject.h> #include <mockpp/VisitableMockMethod.h> -//#include <mockpp/ResponseVector5.h> +#include <mockpp/ResponseVector5.h> namespace mockpp { Index: VisitableMockMethod1.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/VisitableMockMethod1.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- VisitableMockMethod1.h 28 Oct 2005 20:35:13 -0000 1.2 +++ VisitableMockMethod1.h 29 Oct 2005 18:17:30 -0000 1.3 @@ -35,7 +35,7 @@ #include <mockpp/VisitableMockObject.h> #include <mockpp/VisitableMockMethod.h> -//#include <mockpp/ResponseVector1.h> +#include <mockpp/ResponseVector1.h> namespace mockpp { |
From: Ewald A. <ewa...@us...> - 2005-10-29 18:17:38
|
Update of /cvsroot/mockpp/mockpp/mockpp/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11255/mockpp/tests Modified Files: ChainableMockMethod_test.cpp VisitableMockMethod_test.cpp Log Message: provide up to 6 parameters Index: VisitableMockMethod_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/VisitableMockMethod_test.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- VisitableMockMethod_test.cpp 25 Oct 2005 19:05:29 -0000 1.6 +++ VisitableMockMethod_test.cpp 29 Oct 2005 18:17:30 -0000 1.7 @@ -44,6 +44,7 @@ #include <mockpp/VisitableMockMethod3.h> #include <mockpp/VisitableMockMethod4.h> #include <mockpp/VisitableMockMethod5.h> +#include <mockpp/VisitableMockMethod6.h> #include <mockpp/VisitableMockObject.h> @@ -144,6 +145,7 @@ mockpp::VisitableMockMethod3<void, int, int, int> mmv3(MOCKPP_PCHAR("mm3"), 0); mockpp::VisitableMockMethod4<void, int, int, int, int> mmv4(MOCKPP_PCHAR("mm4"), 0); mockpp::VisitableMockMethod5<void, int, int, int, int, int> mmv5(MOCKPP_PCHAR("mm5"), 0); + mockpp::VisitableMockMethod6<void, int, int, int, int, int, int> mmv6(MOCKPP_PCHAR("mm6"), 0); mockpp::VisitableMockMethod0<int> mmi0(MOCKPP_PCHAR("mm0"), 0); mockpp::VisitableMockMethod1<int, int> mmi1(MOCKPP_PCHAR("mm1"), 0); @@ -151,7 +153,7 @@ mockpp::VisitableMockMethod3<int, int, int, int> mmi3(MOCKPP_PCHAR("mm3"), 0); mockpp::VisitableMockMethod4<int, int, int, int, int> mmi4(MOCKPP_PCHAR("mm4"), 0); mockpp::VisitableMockMethod5<int, int, int, int, int, int> mmi5(MOCKPP_PCHAR("mm5"), 0); - + mockpp::VisitableMockMethod6<int, int, int, int, int, int, int> mmi6(MOCKPP_PCHAR("mm6"), 0); } Index: ChainableMockMethod_test.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/tests/ChainableMockMethod_test.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- ChainableMockMethod_test.cpp 25 Oct 2005 20:20:18 -0000 1.6 +++ ChainableMockMethod_test.cpp 29 Oct 2005 18:17:30 -0000 1.7 @@ -44,6 +44,7 @@ #include <mockpp/chaining/ChainableMockMethod3.h> #include <mockpp/chaining/ChainableMockMethod4.h> #include <mockpp/chaining/ChainableMockMethod5.h> +#include <mockpp/chaining/ChainableMockMethod6.h> #include <mockpp/chaining/ChainingMockObjectSupport.h> #include <mockpp/chaining/Invocation.h> @@ -66,6 +67,7 @@ CPPUNIT_TEST( test_parameter_0 ); CPPUNIT_TEST( test_parameter_0v ); + CPPUNIT_TEST( test_inst ); CPPUNIT_TEST_SUITE_END(); @@ -73,6 +75,7 @@ void test_parameter_0(); void test_parameter_0v(); + void test_inst(); }; @@ -104,6 +107,27 @@ }; + +void ChainableMockMethod_test::test_inst() +{ + mockpp::ChainableMockMethod0<void> mmv0(MOCKPP_PCHAR("mm0"), 0); + mockpp::ChainableMockMethod1<void, int> mmv1(MOCKPP_PCHAR("mm1"), 0); + mockpp::ChainableMockMethod2<void, int, int> mmv2(MOCKPP_PCHAR("mm2"), 0); + mockpp::ChainableMockMethod3<void, int, int, int> mmv3(MOCKPP_PCHAR("mm3"), 0); + mockpp::ChainableMockMethod4<void, int, int, int, int> mmv4(MOCKPP_PCHAR("mm4"), 0); + mockpp::ChainableMockMethod5<void, int, int, int, int, int> mmv5(MOCKPP_PCHAR("mm5"), 0); + mockpp::ChainableMockMethod6<void, int, int, int, int, int, int> mmv6(MOCKPP_PCHAR("mm6"), 0); + + mockpp::ChainableMockMethod0<int> mmi0(MOCKPP_PCHAR("mm0"), 0); + mockpp::ChainableMockMethod1<int, int> mmi1(MOCKPP_PCHAR("mm1"), 0); + mockpp::ChainableMockMethod2<int, int, int> mmi2(MOCKPP_PCHAR("mm2"), 0); + mockpp::ChainableMockMethod3<int, int, int, int> mmi3(MOCKPP_PCHAR("mm3"), 0); + mockpp::ChainableMockMethod4<int, int, int, int, int> mmi4(MOCKPP_PCHAR("mm4"), 0); + mockpp::ChainableMockMethod5<int, int, int, int, int, int> mmi5(MOCKPP_PCHAR("mm5"), 0); + mockpp::ChainableMockMethod6<int, int, int, int, int, int, int> mmi6(MOCKPP_PCHAR("mm6"), 0); +} + + void ChainableMockMethod_test::test_parameter_0() { MyChainableMockObject_0 mcm(MOCKPP_PCHAR("chainable-object")); |
From: Ewald A. <ewa...@us...> - 2005-10-29 18:17:38
|
Update of /cvsroot/mockpp/mockpp/mockpp/chaining In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11255/mockpp/chaining Modified Files: ChainableMockMethod0.h ChainableMockMethod1.h ChainableMockMethod2.h ChainableMockMethod3.h ChainableMockMethod4.h ChainableMockMethod5.h InvocationN.h Makefile.am Added Files: ChainableMockMethod6.h Log Message: provide up to 6 parameters --- NEW FILE: ChainableMockMethod6.h --- /** @file @brief Chainable Mock Method with 6 parameters. Generated with gen_chainablemethod_N.pl. $Id: ChainableMockMethod6.h,v 1.1 2005/10/29 18:17:30 ewald-arnold Exp $ ***************************************************************************/ /************************************************************************** begin : Thu Oct 2 2005 copyright : (C) 2002-2005 by Ewald Arnold email : mockpp at ewald-arnold dot de This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. **/ #ifndef MOCKPP_ChainableMockMethod6_H #define MOCKPP_ChainableMockMethod6_H #include <mockpp/mockpp.h> #include <mockpp/ChainableMockObject.h> #include <mockpp/chaining/ChainableMockMethod.h> namespace mockpp { /** Common stuff to set up chainable mock method expectations with 6 parameters. * @ingroup grp_controller */ template <typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6> class ChainableMockMethod6Common : public ChainableMockMethodCommon<R> { public: typedef Invocation6<P1, P2, P3, P4, P5, P6> InvocationType; typedef CoreMock<R, InvocationType> CoreMockType; typedef R ReturnType; /** 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) , coremock(name + MOCKPP_PCHAR("/coreMock"), this) { } protected: /** Returns the underlying coremock. * @return reference to the mock object */ CoreMockType & getCoreMock() const { return coremock; } public: typedef ChainingMockBuilder <ArgumentsMatchBuilder6<ReturnType, InvocationType> > Builder; /** Helper object to easily set up the chainable expectations. * @ingroup grp_controller */ class ChainerFor : public Builder { public: /** Construct the chainer object. * @meth pointer to according method mock. */ ChainerFor(ChainableMockMethod6Common &method) : Builder(&method.getCoreMock(), method.getChainableMockObject(), method.getMethodName()) { } }; private: mutable CoreMockType coremock; }; /** Set up a chainable mock method expectations with 6 parameters. * @ingroup grp_controller */ template <typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6> class ChainableMockMethod6 : public ChainableMockMethod6Common<R, P1, P2, P3, P4, P5, P6> { public: typedef typename ChainableMockMethod6Common<R, 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) { } /** 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 */ R 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); } }; /** Set up a chainable mock method expectations with 6 parameters. * Partial specialisation for a void return value. * @ingroup grp_controller */ template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6> class ChainableMockMethod6<void, P1, P2, P3, P4, P5, P6> : public ChainableMockMethod6Common<void, P1, P2, P3, P4, P5, P6> { public: typedef typename ChainableMockMethod6Common<void, 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<void, P1, P2, P3, P4, P5, P6>(name, parent) { } /** 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 */ void 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); this->getCoreMock().invoke(inv); } }; } // ns mockpp #endif // MOCKPP_ChainableMockMethod6_H Index: Makefile.am =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/Makefile.am,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- Makefile.am 27 Oct 2005 18:54:01 -0000 1.14 +++ Makefile.am 29 Oct 2005 18:17:30 -0000 1.15 @@ -15,6 +15,7 @@ ChainableMockMethod3.h \ ChainableMockMethod4.h \ ChainableMockMethod5.h \ + ChainableMockMethod6.h \ InvocationN.h EXTRA_DIST = \ Index: InvocationN.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/chaining/InvocationN.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- InvocationN.h 28 Oct 2005 20:35:13 -0000 1.2 +++ InvocationN.h 29 Oct 2005 18:17:30 -0000 1.3 @@ -548,6 +548,153 @@ }; +/** Hold invocations with 6 parameters + * @internal + */ +template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6> +class Invocation6 : public Invocation +{ + public: + + enum { numParams = 6 }; + + typedef ConstraintSet6<P1, P2, P3, P4, P5, P6> ConstraintSetType; + + typedef P1 T1Type; + typedef P2 T2Type; + typedef P3 T3Type; + typedef P4 T4Type; + typedef P5 T5Type; + typedef P6 T6Type; + + /** Constructs the object + * @param name name of he object + * @param in_param1 parameter 1 + * @param in_param2 parameter 2 + * @param in_param3 parameter 3 + * @param in_param4 parameter 4 + * @param in_param5 parameter 5 + * @param in_param6 parameter 6 + */ + Invocation6( const String &name + , const P1 &in_param1 + , const P2 &in_param2 + , const P3 &in_param3 + , const P4 &in_param4 + , const P5 &in_param5 + , const P6 &in_param6) + : Invocation( name ) + , param1( in_param1 ) + , param2( in_param2 ) + , param3( in_param3 ) + , param4( in_param4 ) + , param5( in_param5 ) + , param6( in_param6 ) + { + } + +#ifdef MOCKPP_USE_INVOCATION_EQUALS + + /** Check if the object equals another invocation + * @param other the other invocation + * @return true: objects are equal + */ + virtual bool equals( const Invocation6<P1, P2, P3, P4, P5, P6> &other ) const + { + return invocationComparison(param1, other.param1) + && invocationComparison(param2, other.param2) + && invocationComparison(param3, other.param3) + && invocationComparison(param4, other.param4) + && invocationComparison(param5, other.param5) + && invocationComparison(param6, other.param6); + } + + /** Check if the object equals another invocation + * @param other the other invocation + * @return true: objects are equal + */ + bool equals( const InvocationBase &other ) const + { + MOCKPP_UNUSED(other); + return false; + } + +#endif // MOCKPP_USE_INVOCATION_EQUALS + + /** Returns an invocation parameter + * @return the invocation parameter 1 + */ + const P1 & getParameter1() const + { + return param1; + } + + /** Returns an invocation parameter + * @return the invocation parameter 2 + */ + const P2 & getParameter2() const + { + return param2; + } + + /** Returns an invocation parameter + * @return the invocation parameter 3 + */ + const P3 & getParameter3() const + { + return param3; + } + + /** Returns an invocation parameter + * @return the invocation parameter 4 + */ + const P4 & getParameter4() const + { + return param4; + } + + /** Returns an invocation parameter + * @return the invocation parameter 5 + */ + const P5 & getParameter5() const + { + return param5; + } + + /** Returns an invocation parameter + * @return the invocation parameter 6 + */ + const P6 & getParameter6() const + { + return param6; + } + + /** Returns a description of the parameters + * @return the description + */ + virtual String describeParameters() const + { + String fmt = MOCKPP_PCHAR("%1, %2, %3, %4, %5, %6"); + fmt << param1 + << param2 + << param3 + << param4 + << param5 + << param6; + return fmt; + } + + private: + + const P1 & param1; + const P2 & param2; + const P3 & param3; + const P4 & param4; + const P5 & param5; + const P6 & param6; +}; + + } // ns mockpp |
From: Ewald A. <ewa...@us...> - 2005-10-29 18:17:38
|
Update of /cvsroot/mockpp/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11255 Modified Files: gen_files_N.sh Log Message: provide up to 6 parameters Index: gen_files_N.sh =================================================================== RCS file: /cvsroot/mockpp/mockpp/gen_files_N.sh,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- gen_files_N.sh 28 Oct 2005 19:10:39 -0000 1.1 +++ gen_files_N.sh 29 Oct 2005 18:17:30 -0000 1.2 @@ -1,9 +1,21 @@ #!/bin/sh -echo parameter: $1 +p=$1 + +if test $# -eq 0; then + p=6; +fi + +if test $p -lt 6; then + p=6; +fi + +echo parameter: $p + +( cd mockpp/chaining ; ./gen_invocation_N.pl $p ) +( cd mockpp/chaining ; ./gen_chainablemethod_N.pl $p ) +( cd mockpp ; ./gen_responsevector_N.pl $p ) +( cd mockpp ; ./gen_visitablemethod_N.pl $p ) +( cd mockpp/builder ; ./gen_argumentsmatchbuilder_N.pl $p ) +( cd mockpp/constraint ; ./gen_constraintset_N.pl $p ) -( cd mockpp/chaining ; ./gen_invocation_N.pl $1 ) -( cd mockpp/chaining ; ./gen_chainablemethod_N.pl $1 ) -( cd mockpp ; ./gen_responsevector_N.pl $1 ) -( cd mockpp ; ./gen_visitablemethod_N.pl $1 ) -( cd mockpp/builder ; ./gen_argumentsmatchbuilder_N.pl $1 ) |
From: Ewald A. <ewa...@us...> - 2005-10-29 18:17:38
|
Update of /cvsroot/mockpp/mockpp/mockpp/builder In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11255/mockpp/builder Modified Files: ArgumentsMatchBuilderN.h Log Message: provide up to 6 parameters Index: ArgumentsMatchBuilderN.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/builder/ArgumentsMatchBuilderN.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ArgumentsMatchBuilderN.h 28 Oct 2005 20:35:13 -0000 1.2 +++ ArgumentsMatchBuilderN.h 29 Oct 2005 18:17:30 -0000 1.3 @@ -277,6 +277,63 @@ }; +/** Build a matcher for an invocation with 6 argument. + * @ingroup grp_chainer + * @internal + */ +template <typename R, // Returntype + typename I> // Invocation +class ArgumentsMatchBuilder6 : public MatchBuilder<R,I> +{ + public: + + typedef R ReturnType; + typedef I InvocationType; + typedef typename I::T1Type P1; + typedef typename I::T2Type P2; + typedef typename I::T3Type P3; + typedef typename I::T4Type P4; + typedef typename I::T5Type P5; + typedef typename I::T6Type P6; + + typedef ConstraintSet6<P1, P2, P3, P4, P5, P6> ConstraintSetType; + + /** Adds another matcher. + * @param matcher the matcher object + * @return the builder object + */ + virtual MatchBuilder<R, I>& addMatcher( const MatcherHolder<I> &matcher ) = 0; + + /** Indicate a matcher for 6 arguments. + * @ingroup grp_chainer + * @param cons1 pointer to the constraint for method parameter 1 + * @param cons2 pointer to the constraint for method parameter 2 + * @param cons3 pointer to the constraint for method parameter 3 + * @param cons4 pointer to the constraint for method parameter 4 + * @param cons5 pointer to the constraint for method parameter 5 + * @param cons6 pointer to the constraint for method parameter 6 + * @return the builder object + */ + MatchBuilder<R, I>& with( const ConstraintHolder<P1> &p1 + , const ConstraintHolder<P2> &p2 + , const ConstraintHolder<P3> &p3 + , const ConstraintHolder<P4> &p4 + , const ConstraintHolder<P5> &p5 + , const ConstraintHolder<P6> &p6 ) + { + return with_cs( ConstraintSetType( p1, p2, p3, p4, p5, p6 ) ); + } + + protected: + + /** Indicate a matcher for a set of arguments. + * @param constraintset constraint set + * @return the builder object + */ + virtual MatchBuilder<R, I>& with_cs( const ConstraintSetType &constraintset ) = 0; +}; + + } // ns mockpp |
From: Ewald A. <ewa...@us...> - 2005-10-29 18:16:31
|
Update of /cvsroot/mockpp/mockpp/mockpp/constraint In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10934/mockpp/constraint Modified Files: ConstraintSet.h Makefile.am Added Files: ConstraintSetN.h gen_constraintset_N.pl Log Message: basic file set working --- NEW FILE: gen_constraintset_N.pl --- #!/usr/bin/perl -w # # $Id: gen_constraintset_N.pl,v 1.1 2005/10/29 18:16:22 ewald-arnold Exp $ use English; if ($#ARGV < 0) { print "Usage: perl gen_constraintset_N <number of arguments>\n"; exit; } $totalNumArgs = $ARGV[0]; if ($totalNumArgs < 5) { $totalNumArgs = 5; } open OUT, ">ConstraintSetN.h"; print OUT "/** \@file \@internal NOT INTENDED FOR PUBLIC INCLUSION \@brief Generated with gen_constraintset_N.pl. \$I" . "d: ConstraintSetN.h,v 1.7 2005/10/19 20:53:09 ewald-arnold Exp \$ ***************************************************************************/ /************************************************************************** begin : Sat Aug 21 2004 copyright : (C) 2002-2005 by Ewald Arnold email : mockpp at ewald-arnold dot de This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. **/ #ifndef MOCKPP_ConstraintSet_N_H #define MOCKPP_ConstraintSet_N_H //#include <mockpp/builder/ConstraintSet.h> namespace mockpp { "; for ($numArgs = 1; $numArgs <= $totalNumArgs; ++$numArgs) { $templateParms = ""; $templateParms_colon = ""; for ($i = 1; $i <= $numArgs; ++$i) { if ($i > 1) { $templateParms .= ", "; } $templateParms .= "typename P$i"; } if ($numArgs > 0) { $templateParms_colon = ", " . $templateParms; } $templateArgs_colon = ""; $_ = $templateParms; s/typename //g; $templateArgs = $_; if ($numArgs > 0) { $templateArgs_colon = ", ". $templateArgs; } $parms = ""; for ($i = 1; $i <= $numArgs; ++$i) { if ($i > 1) { $parms .= ", "; } $parms .= "const P$i &p$i"; } $percentParms = ""; for ($i = 1; $i <= $numArgs; ++$i) { if ($i > 1) { $percentParms .= ", "; } $percentParms .= "%$i"; } $holderParms = ""; for ($i = 1; $i <= $numArgs; ++$i) { if ($i > 1) { $holderParms .= ", "; } $holderParms .= "const ConstraintHolder<P$i> &p$i"; } $args = ""; for ($i = 1; $i <= $numArgs; ++$i) { if ($i > 1) { $args .= ", "; } $args .= "p$i"; } $boundArgs = ""; for ($i = 1; $i <= $numArgs; ++$i) { if ($i > 1) { $boundArgs .= ", "; } $boundArgs .= "args->a$i"; } $argsAsMembers = ""; for ($i = 1; $i <= $numArgs; ++$i) { $argsAsMembers .= "P$i p$i;"; } $copyParms = ""; for ($i = 1; $i <= $numArgs; ++$i) { if ($i > 1) { $copyParms .= ", "; } $copyParms .= "P$i ia$i"; } $hArgs = ""; for ($i = 1; $i <= $numArgs; ++$i) { if ($i > 1) { $hArgs .= ", "; } $hArgs .= "h$i"; } $initArgs = ""; if ($numArgs > 0) { $initArgs = ":"; } for ($i = 1; $i <= $numArgs; ++$i) { if ($i > 1) { $initArgs .= ", "; } $initArgs .= "p$i(ip$i)"; } $argTypes = ""; for ($i = 1; $i <= $numArgs; ++$i) { $argTypes .= "typedef P$i p". ($i+1) . "_type; "; } print "Creating ConstraintSet" . $numArgs ."\n"; print OUT " /** A set of constraints for a method with " . $numArgs . " arguments * \@internal */ template <" . $templateParms . "> class ConstraintSet" . $numArgs . " { public: "; for($p = 1; $p <= $numArgs; ++$p) { print OUT " typedef P" . $p . " ValueType" . $p . ";"; } print OUT " /** Constructs the object"; for($p = 1; $p <= $numArgs; ++$p) { print OUT " * \@param in_constraint" . $p . " constraint " . $p . ""; } print OUT " */ ConstraintSet" . $numArgs . "( const ConstraintHolder<P1> &in_constraint1"; for($p = 2; $p <= $numArgs; ++$p) { print OUT " , const ConstraintHolder<P" . $p . "> &in_constraint" . $p; } print OUT ") : constraint1( in_constraint1 )"; for($p = 2; $p <= $numArgs; ++$p) { print OUT " , constraint" . $p . "( in_constraint" . $p . " )"; } print OUT " {} /** Destroys the object */ virtual ~ConstraintSet" . $numArgs . "() {} /** Tests if the constraint set matches the invocation * \@param invocation the invocation data * \@return true: the set matches */ template <typename I> // Invocation bool matches( const I &invocation ) { return constraint1->eval( invocation.getParameter1() )"; for($p = 2; $p <= $numArgs; ++$p) { print OUT " && constraint" . $p . "->eval( invocation.getParameter" . $p . "() )"; } print OUT "; } /** Appends the description of this object to the buffer. * \@param buffer The buffer that the description is appended to. * \@return The current content of the buffer data */ virtual String describeTo( String &buffer ) const { String fmt = MOCKPP_PCHAR( \"" . $percentParms . "\" ); fmt << constraint1->toString()"; for($p = 2; $p <= $numArgs; ++$p) { print OUT " << constraint" . $p . "->toString()"; } print OUT "; buffer += fmt; return buffer; } private: "; for($p = 1; $p <= $numArgs; ++$p) { print OUT " const typename Constraint<P" . $p . ">::AP constraint" . $p . ";"; } print OUT " }; "; } print OUT " } // ns mockpp #endif // MOCKPP_ConstraintSet_N_H "; close OUT; Index: Makefile.am =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/constraint/Makefile.am,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- Makefile.am 19 Sep 2005 18:34:35 -0000 1.12 +++ Makefile.am 29 Oct 2005 18:16:22 -0000 1.13 @@ -6,9 +6,12 @@ libconstraintinclude_HEADERS = IsAnything.h IsCloseTo.h IsEqual.h \ IsGreaterThan.h IsInstanceOf.h IsLessThan.h IsNot.h IsNothing.h IsSame.h Or.h \ StringContains.h StringStartsWith.h StringEndsWith.h And.h IsGreaterOrEqual.h \ - IsLessOrEqual.h Constraint.h ConstraintSet.h OutBound.h \ + IsLessOrEqual.h Constraint.h ConstraintSet.h ConstraintSetN.h OutBound.h \ TypelessConstraint.h ConstraintHolder.h ConstraintList.h +EXTRA_DIST = \ + gen_constraintset_N.pl + CLEANFILES = *.~* *.~~* *~ *.old libconstraintincludedir = $(includedir)/mockpp/constraint --- NEW FILE: ConstraintSetN.h --- /** @file @internal NOT INTENDED FOR PUBLIC INCLUSION @brief Generated with gen_constraintset_N.pl. $Id: ConstraintSetN.h,v 1.1 2005/10/29 18:16:22 ewald-arnold Exp $ ***************************************************************************/ /************************************************************************** begin : Sat Aug 21 2004 copyright : (C) 2002-2005 by Ewald Arnold email : mockpp at ewald-arnold dot de This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. **/ #ifndef MOCKPP_ConstraintSet_N_H #define MOCKPP_ConstraintSet_N_H //#include <mockpp/builder/ConstraintSet.h> namespace mockpp { /** A set of constraints for a method with 1 arguments * @internal */ template <typename P1> class ConstraintSet1 { public: typedef P1 ValueType1; /** Constructs the object * @param in_constraint1 constraint 1 */ ConstraintSet1( const ConstraintHolder<P1> &in_constraint1) : constraint1( in_constraint1 ) {} /** Destroys the object */ virtual ~ConstraintSet1() {} /** Tests if the constraint set matches the invocation * @param invocation the invocation data * @return true: the set matches */ template <typename I> // Invocation bool matches( const I &invocation ) { return constraint1->eval( invocation.getParameter1() ); } /** Appends the description of this object to the buffer. * @param buffer The buffer that the description is appended to. * @return The current content of the buffer data */ virtual String describeTo( String &buffer ) const { String fmt = MOCKPP_PCHAR( "%1" ); fmt << constraint1->toString(); buffer += fmt; return buffer; } private: const typename Constraint<P1>::AP constraint1; }; /** A set of constraints for a method with 2 arguments * @internal */ template <typename P1, typename P2> class ConstraintSet2 { public: typedef P1 ValueType1; typedef P2 ValueType2; /** Constructs the object * @param in_constraint1 constraint 1 * @param in_constraint2 constraint 2 */ ConstraintSet2( const ConstraintHolder<P1> &in_constraint1 , const ConstraintHolder<P2> &in_constraint2) : constraint1( in_constraint1 ) , constraint2( in_constraint2 ) {} /** Destroys the object */ virtual ~ConstraintSet2() {} /** Tests if the constraint set matches the invocation * @param invocation the invocation data * @return true: the set matches */ template <typename I> // Invocation bool matches( const I &invocation ) { return constraint1->eval( invocation.getParameter1() ) && constraint2->eval( invocation.getParameter2() ); } /** Appends the description of this object to the buffer. * @param buffer The buffer that the description is appended to. * @return The current content of the buffer data */ virtual String describeTo( String &buffer ) const { String fmt = MOCKPP_PCHAR( "%1, %2" ); fmt << constraint1->toString() << constraint2->toString(); buffer += fmt; return buffer; } private: const typename Constraint<P1>::AP constraint1; const typename Constraint<P2>::AP constraint2; }; /** A set of constraints for a method with 3 arguments * @internal */ template <typename P1, typename P2, typename P3> class ConstraintSet3 { public: typedef P1 ValueType1; typedef P2 ValueType2; typedef P3 ValueType3; /** Constructs the object * @param in_constraint1 constraint 1 * @param in_constraint2 constraint 2 * @param in_constraint3 constraint 3 */ ConstraintSet3( const ConstraintHolder<P1> &in_constraint1 , const ConstraintHolder<P2> &in_constraint2 , const ConstraintHolder<P3> &in_constraint3) : constraint1( in_constraint1 ) , constraint2( in_constraint2 ) , constraint3( in_constraint3 ) {} /** Destroys the object */ virtual ~ConstraintSet3() {} /** Tests if the constraint set matches the invocation * @param invocation the invocation data * @return true: the set matches */ template <typename I> // Invocation bool matches( const I &invocation ) { return constraint1->eval( invocation.getParameter1() ) && constraint2->eval( invocation.getParameter2() ) && constraint3->eval( invocation.getParameter3() ); } /** Appends the description of this object to the buffer. * @param buffer The buffer that the description is appended to. * @return The current content of the buffer data */ virtual String describeTo( String &buffer ) const { String fmt = MOCKPP_PCHAR( "%1, %2, %3" ); fmt << constraint1->toString() << constraint2->toString() << constraint3->toString(); buffer += fmt; return buffer; } private: const typename Constraint<P1>::AP constraint1; const typename Constraint<P2>::AP constraint2; const typename Constraint<P3>::AP constraint3; }; /** A set of constraints for a method with 4 arguments * @internal */ template <typename P1, typename P2, typename P3, typename P4> class ConstraintSet4 { public: typedef P1 ValueType1; typedef P2 ValueType2; typedef P3 ValueType3; typedef P4 ValueType4; /** Constructs the object * @param in_constraint1 constraint 1 * @param in_constraint2 constraint 2 * @param in_constraint3 constraint 3 * @param in_constraint4 constraint 4 */ ConstraintSet4( const ConstraintHolder<P1> &in_constraint1 , const ConstraintHolder<P2> &in_constraint2 , const ConstraintHolder<P3> &in_constraint3 , const ConstraintHolder<P4> &in_constraint4) : constraint1( in_constraint1 ) , constraint2( in_constraint2 ) , constraint3( in_constraint3 ) , constraint4( in_constraint4 ) {} /** Destroys the object */ virtual ~ConstraintSet4() {} /** Tests if the constraint set matches the invocation * @param invocation the invocation data * @return true: the set matches */ template <typename I> // Invocation bool matches( const I &invocation ) { return constraint1->eval( invocation.getParameter1() ) && constraint2->eval( invocation.getParameter2() ) && constraint3->eval( invocation.getParameter3() ) && constraint4->eval( invocation.getParameter4() ); } /** Appends the description of this object to the buffer. * @param buffer The buffer that the description is appended to. * @return The current content of the buffer data */ virtual String describeTo( String &buffer ) const { String fmt = MOCKPP_PCHAR( "%1, %2, %3, %4" ); fmt << constraint1->toString() << constraint2->toString() << constraint3->toString() << constraint4->toString(); buffer += fmt; return buffer; } private: const typename Constraint<P1>::AP constraint1; const typename Constraint<P2>::AP constraint2; const typename Constraint<P3>::AP constraint3; const typename Constraint<P4>::AP constraint4; }; /** A set of constraints for a method with 5 arguments * @internal */ template <typename P1, typename P2, typename P3, typename P4, typename P5> class ConstraintSet5 { public: typedef P1 ValueType1; typedef P2 ValueType2; typedef P3 ValueType3; typedef P4 ValueType4; typedef P5 ValueType5; /** Constructs the object * @param in_constraint1 constraint 1 * @param in_constraint2 constraint 2 * @param in_constraint3 constraint 3 * @param in_constraint4 constraint 4 * @param in_constraint5 constraint 5 */ ConstraintSet5( const ConstraintHolder<P1> &in_constraint1 , const ConstraintHolder<P2> &in_constraint2 , const ConstraintHolder<P3> &in_constraint3 , const ConstraintHolder<P4> &in_constraint4 , const ConstraintHolder<P5> &in_constraint5) : constraint1( in_constraint1 ) , constraint2( in_constraint2 ) , constraint3( in_constraint3 ) , constraint4( in_constraint4 ) , constraint5( in_constraint5 ) {} /** Destroys the object */ virtual ~ConstraintSet5() {} /** Tests if the constraint set matches the invocation * @param invocation the invocation data * @return true: the set matches */ template <typename I> // Invocation bool matches( const I &invocation ) { return constraint1->eval( invocation.getParameter1() ) && constraint2->eval( invocation.getParameter2() ) && constraint3->eval( invocation.getParameter3() ) && constraint4->eval( invocation.getParameter4() ) && constraint5->eval( invocation.getParameter5() ); } /** Appends the description of this object to the buffer. * @param buffer The buffer that the description is appended to. * @return The current content of the buffer data */ virtual String describeTo( String &buffer ) const { String fmt = MOCKPP_PCHAR( "%1, %2, %3, %4, %5" ); fmt << constraint1->toString() << constraint2->toString() << constraint3->toString() << constraint4->toString() << constraint5->toString(); buffer += fmt; return buffer; } private: const typename Constraint<P1>::AP constraint1; const typename Constraint<P2>::AP constraint2; const typename Constraint<P3>::AP constraint3; const typename Constraint<P4>::AP constraint4; const typename Constraint<P5>::AP constraint5; }; /** A set of constraints for a method with 6 arguments * @internal */ template <typename P1, typename P2, typename P3, typename P4, typename P5, typename P6> class ConstraintSet6 { public: typedef P1 ValueType1; typedef P2 ValueType2; typedef P3 ValueType3; typedef P4 ValueType4; typedef P5 ValueType5; typedef P6 ValueType6; /** Constructs the object * @param in_constraint1 constraint 1 * @param in_constraint2 constraint 2 * @param in_constraint3 constraint 3 * @param in_constraint4 constraint 4 * @param in_constraint5 constraint 5 * @param in_constraint6 constraint 6 */ ConstraintSet6( const ConstraintHolder<P1> &in_constraint1 , const ConstraintHolder<P2> &in_constraint2 , const ConstraintHolder<P3> &in_constraint3 , const ConstraintHolder<P4> &in_constraint4 , const ConstraintHolder<P5> &in_constraint5 , const ConstraintHolder<P6> &in_constraint6) : constraint1( in_constraint1 ) , constraint2( in_constraint2 ) , constraint3( in_constraint3 ) , constraint4( in_constraint4 ) , constraint5( in_constraint5 ) , constraint6( in_constraint6 ) {} /** Destroys the object */ virtual ~ConstraintSet6() {} /** Tests if the constraint set matches the invocation * @param invocation the invocation data * @return true: the set matches */ template <typename I> // Invocation bool matches( const I &invocation ) { return constraint1->eval( invocation.getParameter1() ) && constraint2->eval( invocation.getParameter2() ) && constraint3->eval( invocation.getParameter3() ) && constraint4->eval( invocation.getParameter4() ) && constraint5->eval( invocation.getParameter5() ) && constraint6->eval( invocation.getParameter6() ); } /** Appends the description of this object to the buffer. * @param buffer The buffer that the description is appended to. * @return The current content of the buffer data */ virtual String describeTo( String &buffer ) const { String fmt = MOCKPP_PCHAR( "%1, %2, %3, %4, %5, %6" ); fmt << constraint1->toString() << constraint2->toString() << constraint3->toString() << constraint4->toString() << constraint5->toString() << constraint6->toString(); buffer += fmt; return buffer; } private: const typename Constraint<P1>::AP constraint1; const typename Constraint<P2>::AP constraint2; const typename Constraint<P3>::AP constraint3; const typename Constraint<P4>::AP constraint4; const typename Constraint<P5>::AP constraint5; const typename Constraint<P6>::AP constraint6; }; } // ns mockpp #endif // MOCKPP_ConstraintSet_N_H Index: ConstraintSet.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/constraint/ConstraintSet.h,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- ConstraintSet.h 19 Oct 2005 20:14:27 -0000 1.15 +++ ConstraintSet.h 29 Oct 2005 18:16:22 -0000 1.16 @@ -71,342 +71,11 @@ }; -/////////////////////////////////////////////////////////////////// - - -/** A set of constraints for a method with 1 argument - * @internal - */ -template <typename T1> -class ConstraintSet1 -{ - public: - - typedef T1 ValueType1; - - /** Constructs the object - * @param in_constraint1 constraint 1 - */ - ConstraintSet1( const ConstraintHolder<T1> &in_constraint1 ) - : constraint1( in_constraint1 ) - {} - - /** Destroys the object - */ - virtual ~ConstraintSet1() - {} - - /** Tests if the constraint set matches the invocation - * @param invocation the invocation data - * @return true: the set matches - */ - template <typename I> // Invocation - bool matches( const I &invocation ) - { - return constraint1->eval( invocation.getParameter1() ); - } - - /** Appends the description of this object to the buffer. - * @param buffer The buffer that the description is appended to. - * @return The current content of the buffer data - */ - virtual String describeTo( String &buffer ) const - { - String fmt = MOCKPP_PCHAR( "%1" ); - fmt << constraint1->toString(); - buffer += fmt; - return buffer; - } - - private: - - const typename Constraint<T1>::AP constraint1; -}; - - -/////////////////////////////////////////////////////////////////// - - -/** A set of constraints for a method with 2 argument - * @internal - */ -template <typename T1, typename T2> -class ConstraintSet2 -{ - public: - - typedef T1 ValueType1; - typedef T2 ValueType2; - - /** Constructs the object - * @param in_constraint1 constraint 1 - * @param in_constraint2 constraint 2 - */ - ConstraintSet2( const ConstraintHolder<T1> &in_constraint1, - const ConstraintHolder<T2> &in_constraint2 ) - : constraint1( in_constraint1 ) - , constraint2( in_constraint2 ) - {} - - /** Destroys the object - */ - virtual ~ConstraintSet2() - {} - - /** Tests if the constraint set matches the invocation - * @param invocation the invocation data - * @return true: the set matches - */ - template <typename I> // Invocation - bool matches( const I &invocation ) - { - return constraint1->eval( invocation.getParameter1() ) - && constraint2->eval( invocation.getParameter2() ); - } - - /** Appends the description of this object to the buffer. - * @param buffer The buffer that the description is appended to. - * @return The current content of the buffer data - */ - virtual String describeTo( String &buffer ) const - { - String fmt = MOCKPP_PCHAR( "%1, %2" ); - fmt << constraint1->toString() - << constraint2->toString(); - buffer += fmt; - return buffer; - } - - private: - - const typename Constraint<T1>::AP constraint1; - const typename Constraint<T2>::AP constraint2; -}; - - -/////////////////////////////////////////////////////////////////// - - -/** A set of constraints for a method with 3 argument - * @internal - */ -template <typename T1, typename T2, typename T3> -class ConstraintSet3 -{ - public: - - typedef T1 ValueType1; - typedef T2 ValueType2; - typedef T3 ValueType3; - - /** Constructs the object - * @param in_constraint1 constraint 1 - * @param in_constraint2 constraint 2 - * @param in_constraint3 constraint 3 - */ - ConstraintSet3( const ConstraintHolder<T1> &in_constraint1, - const ConstraintHolder<T2> &in_constraint2, - const ConstraintHolder<T3> &in_constraint3 ) - : constraint1( in_constraint1 ) - , constraint2( in_constraint2 ) - , constraint3( in_constraint3 ) - {} - - /** Destroys the object - */ - virtual ~ConstraintSet3() - {} - - /** Tests if the constraint set matches the invocation - * @param invocation the invocation data - * @return true: the set matches - */ - template <typename I> // Invocation - bool matches( const I &invocation ) - { - return constraint1->eval( invocation.getParameter1() ) - && constraint2->eval( invocation.getParameter2() ) - && constraint3->eval( invocation.getParameter3() ); - } - - /** Appends the description of this object to the buffer. - * @param buffer The buffer that the description is appended to. - * @return The current content of the buffer data - */ - virtual String describeTo( String &buffer ) const - { - String fmt = MOCKPP_PCHAR( "%1, %2, %3" ); - fmt << constraint1->toString() - << constraint2->toString() - << constraint3->toString(); - buffer += fmt; - return buffer; - } - - private: - - const typename Constraint<T1>::AP constraint1; - const typename Constraint<T2>::AP constraint2; - const typename Constraint<T3>::AP constraint3; -}; - - -/////////////////////////////////////////////////////////////////// - - -/** A set of constraints for a method with 4 argument - * @internal - */ -template <typename T1, typename T2, typename T3, typename T4> -class ConstraintSet4 -{ - public: - - typedef T1 ValueType1; - typedef T2 ValueType2; - typedef T3 ValueType3; - typedef T4 ValueType4; - - /** Constructs the object - * @param in_constraint1 constraint 1 - * @param in_constraint2 constraint 2 - * @param in_constraint3 constraint 3 - * @param in_constraint4 constraint 4 - */ - ConstraintSet4( const ConstraintHolder<T1> &in_constraint1, - const ConstraintHolder<T2> &in_constraint2, - const ConstraintHolder<T3> &in_constraint3, - const ConstraintHolder<T4> &in_constraint4 ) - : constraint1( in_constraint1 ) - , constraint2( in_constraint2 ) - , constraint3( in_constraint3 ) - , constraint4( in_constraint4 ) - {} - - /** Destroys the object - */ - virtual ~ConstraintSet4() - {} - - /** Tests if the constraint set matches the invocation - * @param invocation the invocation data - * @return true: the set matches - */ - template <typename I> // Invocation - bool matches( const I &invocation ) - { - return constraint1->eval( invocation.getParameter1() ) - && constraint2->eval( invocation.getParameter2() ) - && constraint3->eval( invocation.getParameter3() ) - && constraint4->eval( invocation.getParameter4() ); - } - - /** Appends the description of this object to the buffer. - * @param buffer The buffer that the description is appended to. - * @return The current content of the buffer data - */ - virtual String describeTo( String &buffer ) const - { - String fmt = MOCKPP_PCHAR( "%1, %2, %3, %4" ); - fmt << constraint1->toString() - << constraint2->toString() - << constraint3->toString() - << constraint4->toString(); - buffer += fmt; - return buffer; - } - - private: - - const typename Constraint<T1>::AP constraint1; - const typename Constraint<T2>::AP constraint2; - const typename Constraint<T3>::AP constraint3; - const typename Constraint<T4>::AP constraint4; -}; - - -/////////////////////////////////////////////////////////////////// - - -/** A set of constraints for a method with 5 argument - * @internal - */ -template <typename T1, typename T2, typename T3, typename T4, typename T5> -class ConstraintSet5 -{ - public: - - typedef T1 ValueType1; - typedef T2 ValueType2; - typedef T3 ValueType3; - typedef T4 ValueType4; - typedef T5 ValueType5; - - /** Constructs the object - * @param in_constraint1 constraint 1 - * @param in_constraint2 constraint 2 - * @param in_constraint3 constraint 3 - * @param in_constraint4 constraint 4 - * @param in_constraint5 constraint 5 - */ - ConstraintSet5( const ConstraintHolder<T1> &in_constraint1, - const ConstraintHolder<T2> &in_constraint2, - const ConstraintHolder<T3> &in_constraint3, - const ConstraintHolder<T4> &in_constraint4, - const ConstraintHolder<T5> &in_constraint5 ) - : constraint1( in_constraint1 ) - , constraint2( in_constraint2 ) - , constraint3( in_constraint3 ) - , constraint4( in_constraint4 ) - , constraint5( in_constraint5 ) - {} - - /** Destroys the object - */ - virtual ~ConstraintSet5() - {} - - /** Tests if the constraint set matches the invocation - * @param invocation the invocation data - * @return true: the set matches - */ - template <typename I> // Invocation - bool matches( const I &invocation ) - { - return constraint1->eval( invocation.getParameter1() ) - && constraint2->eval( invocation.getParameter2() ) - && constraint3->eval( invocation.getParameter3() ) - && constraint4->eval( invocation.getParameter4() ) - && constraint5->eval( invocation.getParameter5() ); - } - - /** Appends the description of this object to the buffer. - * @param buffer The buffer that the description is appended to. - * @return The current content of the buffer data - */ - virtual String describeTo( String &buffer ) const - { - String fmt = MOCKPP_PCHAR( "%1, %2, %3, %4, %5" ); - fmt << constraint1->toString() - << constraint2->toString() - << constraint3->toString() - << constraint4->toString() - << constraint5->toString(); - buffer += fmt; - return buffer; - } - - private: - - const typename Constraint<T1>::AP constraint1; - const typename Constraint<T2>::AP constraint2; - const typename Constraint<T3>::AP constraint3; - const typename Constraint<T4>::AP constraint4; - const typename Constraint<T5>::AP constraint5; -}; - } // namespace mockpp #endif // MOCKPP_CONSTRAINTSET_H + + +#include "ConstraintSetN.h" |
From: Ewald A. <ewa...@us...> - 2005-10-28 21:27:23
|
Update of /cvsroot/mockpp/mockpp/mockpp/docs/api In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5530/mockpp/docs/api Modified Files: Makefile.am Log Message: better install Index: Makefile.am =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/docs/api/Makefile.am,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- Makefile.am 28 Oct 2005 20:35:14 -0000 1.19 +++ Makefile.am 28 Oct 2005 21:27:16 -0000 1.20 @@ -51,7 +51,8 @@ install-data-hook: doc $(mkdir_p) $(htmldir)/api-doc - $(INSTALL) html/* $(htmldir)/api-doc + -find html | xargs -n 1 cp -v -t $(htmldir)/api-doc +# $(INSTALL) html/* $(htmldir)/api-doc # Automake's "distcheck" is sensitive to having files left over # after "make uninstall", so we have to clean up the install hook. |
From: Ewald A. <ewa...@us...> - 2005-10-28 20:35:26
|
Update of /cvsroot/mockpp/mockpp/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27524/mockpp Modified Files: Makefile.am ResponseVector1.h ResponseVector2.h ResponseVector3.h ResponseVector4.h ResponseVector5.h VisitableMockMethod0.h VisitableMockMethod1.h VisitableMockMethod2.h VisitableMockMethod3.h VisitableMockMethod4.h VisitableMockMethod5.h Log Message: cleanup Index: VisitableMockMethod2.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/VisitableMockMethod2.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- VisitableMockMethod2.h 25 Oct 2005 19:04:30 -0000 1.1 +++ VisitableMockMethod2.h 28 Oct 2005 20:35:13 -0000 1.2 @@ -126,7 +126,7 @@ typedef typename VisitableMockReturningMethodBase<R>::ControllerFor Inherited; /** Construct the controller object. - * @meth poiinter to according method mock. + * @meth pointer to according method mock. */ ControllerFor (VisitableMockReturningMethodBase<R> *meth) : Inherited(meth) @@ -217,7 +217,7 @@ typedef typename VisitableMockReturningMethodBase<R>::ControllerFor Inherited; /** Construct the controller object. - * @meth poiinter to according method mock. + * @meth pointer to according method mock. */ ControllerFor (VisitableMockReturningMethodBase<R> *meth) : Inherited(meth) @@ -299,7 +299,7 @@ typedef VisitableMockReturningMethodBase<void>::ControllerFor Inherited; /** Construct the controller object. - * @meth poiinter to according method mock. + * @meth pointer to according method mock. */ ControllerFor (VisitableMockReturningMethodBase<void> *meth) : Inherited(meth) Index: VisitableMockMethod3.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/VisitableMockMethod3.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- VisitableMockMethod3.h 25 Oct 2005 19:04:30 -0000 1.1 +++ VisitableMockMethod3.h 28 Oct 2005 20:35:13 -0000 1.2 @@ -133,7 +133,7 @@ typedef typename VisitableMockReturningMethodBase<R>::ControllerFor Inherited; /** Construct the controller object. - * @meth poiinter to according method mock. + * @meth pointer to according method mock. */ ControllerFor (VisitableMockReturningMethodBase<R> *meth) : Inherited(meth) @@ -228,7 +228,7 @@ typedef typename VisitableMockReturningMethodBase<R>::ControllerFor Inherited; /** Construct the controller object. - * @meth poiinter to according method mock. + * @meth pointer to according method mock. */ ControllerFor (VisitableMockReturningMethodBase<R> *meth) : Inherited(meth) @@ -313,7 +313,7 @@ typedef VisitableMockReturningMethodBase<void>::ControllerFor Inherited; /** Construct the controller object. - * @meth poiinter to according method mock. + * @meth pointer to according method mock. */ ControllerFor (VisitableMockReturningMethodBase<void> *meth) : Inherited(meth) Index: Makefile.am =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/Makefile.am,v retrieving revision 1.91 retrieving revision 1.92 diff -u -d -r1.91 -r1.92 --- Makefile.am 26 Oct 2005 20:43:31 -0000 1.91 +++ Makefile.am 28 Oct 2005 20:35:13 -0000 1.92 @@ -1,8 +1,7 @@ INCLUDES = $(all_includes) -I$(top_srcdir) -I$(top_builddir) $(EA_EXTRA_INC) DEFAULT_INCLUDES = $(INCLUDES) -SUBDIRS = chaining compat util builder constraint matcher stub production . docs tests po -# examples +SUBDIRS = chaining compat util builder constraint matcher stub production . docs tests po examples lib_LTLIBRARIES = libmockpp.la @@ -48,10 +47,6 @@ mockpp_config-bcb5.h \ mockpp_config-msvc_60_70.h \ mockpp_config-msvc_71.h \ - visitable-template.h \ - visitable-template.raw \ - chainable-template.h \ - chainable-template.raw \ gen_visitablemethod_N.pl \ gen_responsevector_N.pl Index: VisitableMockMethod4.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/VisitableMockMethod4.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- VisitableMockMethod4.h 25 Oct 2005 19:04:30 -0000 1.1 +++ VisitableMockMethod4.h 28 Oct 2005 20:35:13 -0000 1.2 @@ -140,7 +140,7 @@ typedef typename VisitableMockReturningMethodBase<R>::ControllerFor Inherited; /** Construct the controller object. - * @meth poiinter to according method mock. + * @meth pointer to according method mock. */ ControllerFor (VisitableMockReturningMethodBase<R> *meth) : Inherited(meth) @@ -239,7 +239,7 @@ typedef typename VisitableMockReturningMethodBase<R>::ControllerFor Inherited; /** Construct the controller object. - * @meth poiinter to according method mock. + * @meth pointer to according method mock. */ ControllerFor (VisitableMockReturningMethodBase<R> *meth) : Inherited(meth) @@ -327,7 +327,7 @@ typedef VisitableMockReturningMethodBase<void>::ControllerFor Inherited; /** Construct the controller object. - * @meth poiinter to according method mock. + * @meth pointer to according method mock. */ ControllerFor (VisitableMockReturningMethodBase<void> *meth) : Inherited(meth) Index: VisitableMockMethod0.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/VisitableMockMethod0.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- VisitableMockMethod0.h 25 Oct 2005 19:04:30 -0000 1.1 +++ VisitableMockMethod0.h 28 Oct 2005 20:35:13 -0000 1.2 @@ -95,7 +95,7 @@ typedef typename VisitableMockReturningMethodBase<R>::ControllerFor Inherited; /** Construct the controller object. - * @meth poiinter to according method mock. + * @meth pointer to according method mock. */ ControllerFor (VisitableMockReturningMethodBase<R> *meth) : Inherited(meth) @@ -143,7 +143,7 @@ typedef typename VisitableMockReturningMethodBase<R>::ControllerFor Inherited; /** Construct the controller object. - * @meth poiinter to according method mock. + * @meth pointer to according method mock. */ ControllerFor (VisitableMockReturningMethodBase<R> *meth) : Inherited(meth) @@ -191,7 +191,7 @@ typedef VisitableMockReturningMethodBase<void>::ControllerFor Inherited; /** Construct the controller object. - * @meth poiinter to according method mock. + * @meth pointer to according method mock. */ ControllerFor (VisitableMockReturningMethodBase<void> *meth) : Inherited(meth) Index: VisitableMockMethod5.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/VisitableMockMethod5.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- VisitableMockMethod5.h 25 Oct 2005 19:04:30 -0000 1.1 +++ VisitableMockMethod5.h 28 Oct 2005 20:35:13 -0000 1.2 @@ -147,7 +147,7 @@ typedef typename VisitableMockReturningMethodBase<R>::ControllerFor Inherited; /** Construct the controller object. - * @meth poiinter to according method mock. + * @meth pointer to according method mock. */ ControllerFor (VisitableMockReturningMethodBase<R> *meth) : Inherited(meth) @@ -250,7 +250,7 @@ typedef typename VisitableMockReturningMethodBase<R>::ControllerFor Inherited; /** Construct the controller object. - * @meth poiinter to according method mock. + * @meth pointer to according method mock. */ ControllerFor (VisitableMockReturningMethodBase<R> *meth) : Inherited(meth) @@ -341,7 +341,7 @@ typedef VisitableMockReturningMethodBase<void>::ControllerFor Inherited; /** Construct the controller object. - * @meth poiinter to according method mock. + * @meth pointer to according method mock. */ ControllerFor (VisitableMockReturningMethodBase<void> *meth) : Inherited(meth) Index: VisitableMockMethod1.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/VisitableMockMethod1.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- VisitableMockMethod1.h 25 Oct 2005 19:04:30 -0000 1.1 +++ VisitableMockMethod1.h 28 Oct 2005 20:35:13 -0000 1.2 @@ -119,7 +119,7 @@ typedef typename VisitableMockReturningMethodBase<R>::ControllerFor Inherited; /** Construct the controller object. - * @meth poiinter to according method mock. + * @meth pointer to according method mock. */ ControllerFor (VisitableMockReturningMethodBase<R> *meth) : Inherited(meth) @@ -206,7 +206,7 @@ typedef typename VisitableMockReturningMethodBase<R>::ControllerFor Inherited; /** Construct the controller object. - * @meth poiinter to according method mock. + * @meth pointer to according method mock. */ ControllerFor (VisitableMockReturningMethodBase<R> *meth) : Inherited(meth) @@ -285,7 +285,7 @@ typedef VisitableMockReturningMethodBase<void>::ControllerFor Inherited; /** Construct the controller object. - * @meth poiinter to according method mock. + * @meth pointer to according method mock. */ ControllerFor (VisitableMockReturningMethodBase<void> *meth) : Inherited(meth) |
From: Ewald A. <ewa...@us...> - 2005-10-28 20:35:25
|
Update of /cvsroot/mockpp/mockpp/mockpp/docs/api In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27524/mockpp/docs/api Modified Files: Makefile.am Log Message: cleanup Index: Makefile.am =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/docs/api/Makefile.am,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- Makefile.am 29 Jul 2005 10:07:25 -0000 1.18 +++ Makefile.am 28 Oct 2005 20:35:14 -0000 1.19 @@ -11,6 +11,8 @@ echo "Auspacken nicht vergessen" echo "###########################" +doc: apidoc + apidoc: -test -L tutorial && rm tutorial ln -s ../../examples/tutorial/html tutorial @@ -47,7 +49,7 @@ htmldir = $(pkgdatadir)/html -install-data-hook: +install-data-hook: doc $(mkdir_p) $(htmldir)/api-doc $(INSTALL) html/* $(htmldir)/api-doc |
From: Ewald A. <ewa...@us...> - 2005-10-28 20:35:25
|
Update of /cvsroot/mockpp/mockpp/mockpp/builder In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27524/mockpp/builder Modified Files: ArgumentsMatchBuilderN.h Log Message: cleanup |