[Mockpp-commits] mockpp/mockpp VisitableMockMethod0.h,1.10,1.11 VisitableMockMethod1.h,1.10,1.11 Vis
Brought to you by:
ewald-arnold
From: Ewald A. <ewa...@us...> - 2005-11-19 14:16:47
|
Update of /cvsroot/mockpp/mockpp/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6085/mockpp Modified Files: VisitableMockMethod0.h VisitableMockMethod1.h VisitableMockMethod2.h VisitableMockMethod3.h VisitableMockMethod4.h VisitableMockMethod5.h VisitableMockMethod6.h gen_visitablemethod_N.pl Log Message: fixes for bcb5 Index: VisitableMockMethod6.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/VisitableMockMethod6.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- VisitableMockMethod6.h 14 Nov 2005 17:25:14 -0000 1.8 +++ VisitableMockMethod6.h 19 Nov 2005 14:16:38 -0000 1.9 @@ -211,7 +211,8 @@ { } - /** Actually verifies the mocked method. Must be called by the client code. + /** Actually verifies the mocked method. + * Must be called by the client code. * @param p1 mock method parameter 1 * @param p2 mock method parameter 2 * @param p3 mock method parameter 3 @@ -232,10 +233,25 @@ return this->determineReturnValue(); } else - return R(); // only dummy value + return R(); // only dummy value to make the compiler happy } +#if defined(__BORLANDC__) // ==> BCB5.5.1 ?? F1004 Internal compiler error at 0x12548c1 with base 0x1200000 + /** Set up expectations with constraints. + * @param p1 mock method parameter 1 + * @param p2 mock method parameter 2 + * @param p3 mock method parameter 3 + * @param p4 mock method parameter 4 + * @param p5 mock method parameter 5 + * @param p6 mock method parameter 6 + */ + void forward (const ConstraintHolder<P1> &p1, const ConstraintHolder<P2> &p2, const ConstraintHolder<P3> &p3, const ConstraintHolder<P4> &p4, const ConstraintHolder<P5> &p5, const ConstraintHolder<P6> &p6) const + { + VisitableMockMethod6Common<R, P1, P2, P3, P4, P5, P6>::forward(p1, p2, p3, p4, p5, p6); + } +#else using VisitableMockMethod6Common<R, P1, P2, P3, P4, P5, P6>::forward; +#endif /** Adds another response value. * Response values are determined on the parameters you pass. This way the @@ -298,7 +314,8 @@ { } - /** Actually verifies the mocked method. Must be called by the client code. + /** Actually verifies the mocked method. + * Must be called by the client code. * @param p1 mock method parameter 1 * @param p2 mock method parameter 2 * @param p3 mock method parameter 3 @@ -311,7 +328,22 @@ this->forward_param(p1, p2, p3, p4, p5, p6); } +#if defined(__BORLANDC__) // ==> BCB5.5.1 ?? F1004 Internal compiler error at 0x12548c1 with base 0x1200000 + /** Set up expectations with constraints. + * @param p1 mock method parameter 1 + * @param p2 mock method parameter 2 + * @param p3 mock method parameter 3 + * @param p4 mock method parameter 4 + * @param p5 mock method parameter 5 + * @param p6 mock method parameter 6 + */ + void forward (const ConstraintHolder<P1> &p1, const ConstraintHolder<P2> &p2, const ConstraintHolder<P3> &p3, const ConstraintHolder<P4> &p4, const ConstraintHolder<P5> &p5, const ConstraintHolder<P6> &p6) const + { + VisitableMockMethod6Common<void, P1, P2, P3, P4, P5, P6>::forward(p1, p2, p3, p4, p5, p6); + } +#else using VisitableMockMethod6Common<void, P1, P2, P3, P4, P5, P6>::forward; +#endif }; Index: VisitableMockMethod2.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/VisitableMockMethod2.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- VisitableMockMethod2.h 14 Nov 2005 17:25:14 -0000 1.10 +++ VisitableMockMethod2.h 19 Nov 2005 14:16:38 -0000 1.11 @@ -171,7 +171,8 @@ { } - /** Actually verifies the mocked method. Must be called by the client code. + /** Actually verifies the mocked method. + * Must be called by the client code. * @param p1 mock method parameter 1 * @param p2 mock method parameter 2 */ @@ -188,10 +189,21 @@ return this->determineReturnValue(); } else - return R(); // only dummy value + return R(); // only dummy value to make the compiler happy } +#if defined(__BORLANDC__) // ==> BCB5.5.1 ?? F1004 Internal compiler error at 0x12548c1 with base 0x1200000 + /** Set up expectations with constraints. + * @param p1 mock method parameter 1 + * @param p2 mock method parameter 2 + */ + void forward (const ConstraintHolder<P1> &p1, const ConstraintHolder<P2> &p2) const + { + VisitableMockMethod2Common<R, P1, P2>::forward(p1, p2); + } +#else using VisitableMockMethod2Common<R, P1, P2>::forward; +#endif /** Adds another response value. * Response values are determined on the parameters you pass. This way the @@ -246,7 +258,8 @@ { } - /** Actually verifies the mocked method. Must be called by the client code. + /** Actually verifies the mocked method. + * Must be called by the client code. * @param p1 mock method parameter 1 * @param p2 mock method parameter 2 */ @@ -255,7 +268,18 @@ this->forward_param(p1, p2); } +#if defined(__BORLANDC__) // ==> BCB5.5.1 ?? F1004 Internal compiler error at 0x12548c1 with base 0x1200000 + /** Set up expectations with constraints. + * @param p1 mock method parameter 1 + * @param p2 mock method parameter 2 + */ + void forward (const ConstraintHolder<P1> &p1, const ConstraintHolder<P2> &p2) const + { + VisitableMockMethod2Common<void, P1, P2>::forward(p1, p2); + } +#else using VisitableMockMethod2Common<void, P1, P2>::forward; +#endif }; Index: gen_visitablemethod_N.pl =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/gen_visitablemethod_N.pl,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- gen_visitablemethod_N.pl 14 Nov 2005 17:25:14 -0000 1.12 +++ gen_visitablemethod_N.pl 19 Nov 2005 14:16:38 -0000 1.13 @@ -381,7 +381,8 @@ { } - /** Actually verifies the mocked method. Must be called by the client code."; + /** Actually verifies the mocked method. + * Must be called by the client code."; for($p = 1; $p <= $numArgs; ++$p) { print OUT " * \@param p" . $p . " mock method parameter " . $p; } @@ -408,11 +409,30 @@ return this->determineReturnValue(); } else - return R(); // only dummy value - } + return R(); // only dummy value to make the compiler happy + }"; + +if ($numArgs > 0) +{ +print OUT " + +#if defined(__BORLANDC__) // ==> BCB5.5.1 ?? F1004 Internal compiler error at 0x12548c1 with base 0x1200000 + /** Set up expectations with constraints."; + +for($p = 1; $p <= $numArgs; ++$p) { print OUT " + * \@param p" . $p . " mock method parameter " . $p; } +print OUT " + */ + void forward (" . $holderParms . ") const + { + VisitableMockMethod" . $numArgs . "Common<R" . $templateArgs_colon . ">::forward(" . $args . "); + } +#else using VisitableMockMethod" . $numArgs . "Common<R" . $templateArgs_colon . ">::forward; +#endif "; +} if ($numArgs > 0) { @@ -484,7 +504,8 @@ { } - /** Actually verifies the mocked method. Must be called by the client code."; + /** Actually verifies the mocked method. + * Must be called by the client code."; for($p = 1; $p <= $numArgs; ++$p) { print OUT " * \@param p" . $p . " mock method parameter " . $p; } @@ -494,9 +515,30 @@ void forward(" . $parms . ") const { this->forward_param(" . $args . "); - } + }"; + +if ($numArgs > 0) +{ +print OUT " + +#if defined(__BORLANDC__) // ==> BCB5.5.1 ?? F1004 Internal compiler error at 0x12548c1 with base 0x1200000 + /** Set up expectations with constraints."; + +for($p = 1; $p <= $numArgs; ++$p) { print OUT " + * \@param p" . $p . " mock method parameter " . $p; } +print OUT " + */ + void forward (" . $holderParms . ") const + { + VisitableMockMethod" . $numArgs . "Common<void" . $templateArgs_colon . ">::forward(" . $args . "); + } +#else using VisitableMockMethod" . $numArgs . "Common<void" . $templateArgs_colon . ">::forward; +#endif"; +} + +print OUT " }; Index: VisitableMockMethod3.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/VisitableMockMethod3.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- VisitableMockMethod3.h 14 Nov 2005 17:25:14 -0000 1.10 +++ VisitableMockMethod3.h 19 Nov 2005 14:16:38 -0000 1.11 @@ -181,7 +181,8 @@ { } - /** Actually verifies the mocked method. Must be called by the client code. + /** Actually verifies the mocked method. + * Must be called by the client code. * @param p1 mock method parameter 1 * @param p2 mock method parameter 2 * @param p3 mock method parameter 3 @@ -199,10 +200,22 @@ return this->determineReturnValue(); } else - return R(); // only dummy value + return R(); // only dummy value to make the compiler happy } +#if defined(__BORLANDC__) // ==> BCB5.5.1 ?? F1004 Internal compiler error at 0x12548c1 with base 0x1200000 + /** Set up expectations with constraints. + * @param p1 mock method parameter 1 + * @param p2 mock method parameter 2 + * @param p3 mock method parameter 3 + */ + void forward (const ConstraintHolder<P1> &p1, const ConstraintHolder<P2> &p2, const ConstraintHolder<P3> &p3) const + { + VisitableMockMethod3Common<R, P1, P2, P3>::forward(p1, p2, p3); + } +#else using VisitableMockMethod3Common<R, P1, P2, P3>::forward; +#endif /** Adds another response value. * Response values are determined on the parameters you pass. This way the @@ -259,7 +272,8 @@ { } - /** Actually verifies the mocked method. Must be called by the client code. + /** Actually verifies the mocked method. + * Must be called by the client code. * @param p1 mock method parameter 1 * @param p2 mock method parameter 2 * @param p3 mock method parameter 3 @@ -269,7 +283,19 @@ this->forward_param(p1, p2, p3); } +#if defined(__BORLANDC__) // ==> BCB5.5.1 ?? F1004 Internal compiler error at 0x12548c1 with base 0x1200000 + /** Set up expectations with constraints. + * @param p1 mock method parameter 1 + * @param p2 mock method parameter 2 + * @param p3 mock method parameter 3 + */ + void forward (const ConstraintHolder<P1> &p1, const ConstraintHolder<P2> &p2, const ConstraintHolder<P3> &p3) const + { + VisitableMockMethod3Common<void, P1, P2, P3>::forward(p1, p2, p3); + } +#else using VisitableMockMethod3Common<void, P1, P2, P3>::forward; +#endif }; Index: VisitableMockMethod4.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/VisitableMockMethod4.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- VisitableMockMethod4.h 14 Nov 2005 17:25:14 -0000 1.10 +++ VisitableMockMethod4.h 19 Nov 2005 14:16:38 -0000 1.11 @@ -191,7 +191,8 @@ { } - /** Actually verifies the mocked method. Must be called by the client code. + /** Actually verifies the mocked method. + * Must be called by the client code. * @param p1 mock method parameter 1 * @param p2 mock method parameter 2 * @param p3 mock method parameter 3 @@ -210,10 +211,23 @@ return this->determineReturnValue(); } else - return R(); // only dummy value + return R(); // only dummy value to make the compiler happy } +#if defined(__BORLANDC__) // ==> BCB5.5.1 ?? F1004 Internal compiler error at 0x12548c1 with base 0x1200000 + /** Set up expectations with constraints. + * @param p1 mock method parameter 1 + * @param p2 mock method parameter 2 + * @param p3 mock method parameter 3 + * @param p4 mock method parameter 4 + */ + void forward (const ConstraintHolder<P1> &p1, const ConstraintHolder<P2> &p2, const ConstraintHolder<P3> &p3, const ConstraintHolder<P4> &p4) const + { + VisitableMockMethod4Common<R, P1, P2, P3, P4>::forward(p1, p2, p3, p4); + } +#else using VisitableMockMethod4Common<R, P1, P2, P3, P4>::forward; +#endif /** Adds another response value. * Response values are determined on the parameters you pass. This way the @@ -272,7 +286,8 @@ { } - /** Actually verifies the mocked method. Must be called by the client code. + /** Actually verifies the mocked method. + * Must be called by the client code. * @param p1 mock method parameter 1 * @param p2 mock method parameter 2 * @param p3 mock method parameter 3 @@ -283,7 +298,20 @@ this->forward_param(p1, p2, p3, p4); } +#if defined(__BORLANDC__) // ==> BCB5.5.1 ?? F1004 Internal compiler error at 0x12548c1 with base 0x1200000 + /** Set up expectations with constraints. + * @param p1 mock method parameter 1 + * @param p2 mock method parameter 2 + * @param p3 mock method parameter 3 + * @param p4 mock method parameter 4 + */ + void forward (const ConstraintHolder<P1> &p1, const ConstraintHolder<P2> &p2, const ConstraintHolder<P3> &p3, const ConstraintHolder<P4> &p4) const + { + VisitableMockMethod4Common<void, P1, P2, P3, P4>::forward(p1, p2, p3, p4); + } +#else using VisitableMockMethod4Common<void, P1, P2, P3, P4>::forward; +#endif }; Index: VisitableMockMethod0.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/VisitableMockMethod0.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- VisitableMockMethod0.h 14 Nov 2005 17:25:14 -0000 1.10 +++ VisitableMockMethod0.h 19 Nov 2005 14:16:38 -0000 1.11 @@ -104,7 +104,8 @@ { } - /** Actually verifies the mocked method. Must be called by the client code. + /** Actually verifies the mocked method. + * Must be called by the client code. */ R forward() const { @@ -115,11 +116,8 @@ return this->determineReturnValue(); } else - return R(); // only dummy value + return R(); // only dummy value to make the compiler happy } - - using VisitableMockMethod0Common<R>::forward; - }; @@ -142,14 +140,13 @@ { } - /** Actually verifies the mocked method. Must be called by the client code. + /** Actually verifies the mocked method. + * Must be called by the client code. */ void forward() const { this->forward_param(); } - - using VisitableMockMethod0Common<void>::forward; }; Index: VisitableMockMethod5.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/VisitableMockMethod5.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- VisitableMockMethod5.h 14 Nov 2005 17:25:14 -0000 1.10 +++ VisitableMockMethod5.h 19 Nov 2005 14:16:38 -0000 1.11 @@ -201,7 +201,8 @@ { } - /** Actually verifies the mocked method. Must be called by the client code. + /** Actually verifies the mocked method. + * Must be called by the client code. * @param p1 mock method parameter 1 * @param p2 mock method parameter 2 * @param p3 mock method parameter 3 @@ -221,10 +222,24 @@ return this->determineReturnValue(); } else - return R(); // only dummy value + return R(); // only dummy value to make the compiler happy } +#if defined(__BORLANDC__) // ==> BCB5.5.1 ?? F1004 Internal compiler error at 0x12548c1 with base 0x1200000 + /** Set up expectations with constraints. + * @param p1 mock method parameter 1 + * @param p2 mock method parameter 2 + * @param p3 mock method parameter 3 + * @param p4 mock method parameter 4 + * @param p5 mock method parameter 5 + */ + void forward (const ConstraintHolder<P1> &p1, const ConstraintHolder<P2> &p2, const ConstraintHolder<P3> &p3, const ConstraintHolder<P4> &p4, const ConstraintHolder<P5> &p5) const + { + VisitableMockMethod5Common<R, P1, P2, P3, P4, P5>::forward(p1, p2, p3, p4, p5); + } +#else using VisitableMockMethod5Common<R, P1, P2, P3, P4, P5>::forward; +#endif /** Adds another response value. * Response values are determined on the parameters you pass. This way the @@ -285,7 +300,8 @@ { } - /** Actually verifies the mocked method. Must be called by the client code. + /** Actually verifies the mocked method. + * Must be called by the client code. * @param p1 mock method parameter 1 * @param p2 mock method parameter 2 * @param p3 mock method parameter 3 @@ -297,7 +313,21 @@ this->forward_param(p1, p2, p3, p4, p5); } +#if defined(__BORLANDC__) // ==> BCB5.5.1 ?? F1004 Internal compiler error at 0x12548c1 with base 0x1200000 + /** Set up expectations with constraints. + * @param p1 mock method parameter 1 + * @param p2 mock method parameter 2 + * @param p3 mock method parameter 3 + * @param p4 mock method parameter 4 + * @param p5 mock method parameter 5 + */ + void forward (const ConstraintHolder<P1> &p1, const ConstraintHolder<P2> &p2, const ConstraintHolder<P3> &p3, const ConstraintHolder<P4> &p4, const ConstraintHolder<P5> &p5) const + { + VisitableMockMethod5Common<void, P1, P2, P3, P4, P5>::forward(p1, p2, p3, p4, p5); + } +#else using VisitableMockMethod5Common<void, P1, P2, P3, P4, P5>::forward; +#endif }; Index: VisitableMockMethod1.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/VisitableMockMethod1.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- VisitableMockMethod1.h 14 Nov 2005 17:25:14 -0000 1.10 +++ VisitableMockMethod1.h 19 Nov 2005 14:16:38 -0000 1.11 @@ -161,7 +161,8 @@ { } - /** Actually verifies the mocked method. Must be called by the client code. + /** Actually verifies the mocked method. + * Must be called by the client code. * @param p1 mock method parameter 1 */ R forward(const P1 &p1) const @@ -177,10 +178,20 @@ return this->determineReturnValue(); } else - return R(); // only dummy value + return R(); // only dummy value to make the compiler happy } +#if defined(__BORLANDC__) // ==> BCB5.5.1 ?? F1004 Internal compiler error at 0x12548c1 with base 0x1200000 + /** Set up expectations with constraints. + * @param p1 mock method parameter 1 + */ + void forward (const ConstraintHolder<P1> &p1) const + { + VisitableMockMethod1Common<R, P1>::forward(p1); + } +#else using VisitableMockMethod1Common<R, P1>::forward; +#endif /** Adds another response value. * Response values are determined on the parameters you pass. This way the @@ -233,7 +244,8 @@ { } - /** Actually verifies the mocked method. Must be called by the client code. + /** Actually verifies the mocked method. + * Must be called by the client code. * @param p1 mock method parameter 1 */ void forward(const P1 &p1) const @@ -241,7 +253,17 @@ this->forward_param(p1); } +#if defined(__BORLANDC__) // ==> BCB5.5.1 ?? F1004 Internal compiler error at 0x12548c1 with base 0x1200000 + /** Set up expectations with constraints. + * @param p1 mock method parameter 1 + */ + void forward (const ConstraintHolder<P1> &p1) const + { + VisitableMockMethod1Common<void, P1>::forward(p1); + } +#else using VisitableMockMethod1Common<void, P1>::forward; +#endif }; |