[Mockpp-commits] mockpp/mockpp/examples/tutorial visitmock.cpp,1.12,1.13
Brought to you by:
ewald-arnold
From: Ewald A. <ewa...@us...> - 2005-04-06 19:25:25
|
Update of /cvsroot/mockpp/mockpp/mockpp/examples/tutorial In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14521/mockpp/examples/tutorial Modified Files: visitmock.cpp Log Message: patch msvc6 Index: visitmock.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/examples/tutorial/visitmock.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- visitmock.cpp 5 Apr 2005 18:44:05 -0000 1.12 +++ visitmock.cpp 6 Apr 2005 19:25:16 -0000 1.13 @@ -73,13 +73,22 @@ read_controller.addReturnValue("record-2"); read_controller.addReturnValue("record-3"); - // processing is not exactly defined - mock.calculate(eq<unsigned>((unsigned)5, (unsigned)5)); - mock.calculate(eq<unsigned>(5, 5)); + // processing is not exactly defined +#if defined(_MSC_VER) && _MSC_VER <= 1300 + mock.calculate(new mockpp::IsCloseTo<unsigned>(5, 5)); + mock.calculate(new mockpp::IsCloseTo<unsigned>(5, 5)); + mock.calculate(new mockpp::IsCloseTo<unsigned>(5, 5)); + calculate_controller.addResponseValue(10, new mockpp::IsCloseTo<unsigned>(2, 2)); + calculate_controller.addResponseValue(20, new mockpp::IsCloseTo<unsigned>(4, 2)); + calculate_controller.addResponseValue(30, new mockpp::IsCloseTo<unsigned>(6, 2)); +#else + mock.calculate(eq<unsigned>(5, 5)); + mock.calculate(eq<unsigned>(5, 5)); mock.calculate(eq<unsigned>(5, 5)); - calculate_controller.addResponseValue(10, eq<unsigned>(2, 2)); - calculate_controller.addResponseValue(20, eq<unsigned>(4, 2)); - calculate_controller.addResponseValue(30, eq<unsigned>(6, 2)); + calculate_controller.addResponseValue(10, eq<unsigned>(2, 2)); + calculate_controller.addResponseValue(20, eq<unsigned>(4, 2)); + calculate_controller.addResponseValue(30, eq<unsigned>(6, 2)); +#endif // record program flow while writing data mock.open("file1.lst"); |