[Mockpp-commits] mockpp/mockpp/examples/tutorial basicmock.cpp,1.10,1.11 chainmock.cpp,1.15,1.16 cha
Brought to you by:
ewald-arnold
Update of /cvsroot/mockpp/mockpp/mockpp/examples/tutorial In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19970/mockpp/examples/tutorial Modified Files: basicmock.cpp chainmock.cpp chainmock2.cpp poormock-se.cpp poormock.cpp verifying.cpp visitmock.cpp visitmock2.cpp Log Message: more namespace disabling Index: verifying.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/examples/tutorial/verifying.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- verifying.cpp 15 Mar 2006 21:34:04 -0000 1.15 +++ verifying.cpp 5 Apr 2006 17:03:39 -0000 1.16 @@ -122,7 +122,7 @@ runner.addTest(registry.makeTest()); return runner.run() ? 0 : 1; #else - std::cout << "CppUnit was not available at compile time.\n"; + MOCKPP_STD_NS::cout << "CppUnit was not available at compile time.\n"; return 0; #endif } Index: visitmock2.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/examples/tutorial/visitmock2.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- visitmock2.cpp 15 Mar 2006 21:34:04 -0000 1.5 +++ visitmock2.cpp 5 Apr 2006 17:03:39 -0000 1.6 @@ -130,25 +130,25 @@ mock.activate(); // Run Consumer object - std::cout << "Tests starting" << std::endl; + MOCKPP_STD_NS::cout << "Tests starting" << MOCKPP_STD_NS::endl; Consumer consumer(&mock); consumer.load(); consumer.process(); consumer.save(); - std::cout << "Tests finished" << std::endl; + MOCKPP_STD_NS::cout << "Tests finished" << MOCKPP_STD_NS::endl; // Check pending expectations mock.verify(); - std::cout << "All tests have passed successfully" << std::endl; + MOCKPP_STD_NS::cout << "All tests have passed successfully" << MOCKPP_STD_NS::endl; } - catch(std::exception &ex) + catch(MOCKPP_STD_NS::exception &ex) { - std::cout << std::endl - << "Error occured.\n" << ex.what() << std::endl - << std::endl; + MOCKPP_STD_NS::cout << MOCKPP_STD_NS::endl + << "Error occured.\n" << ex.what() << MOCKPP_STD_NS::endl + << MOCKPP_STD_NS::endl; return 1; } Index: poormock-se.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/examples/tutorial/poormock-se.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- poormock-se.cpp 15 Mar 2006 21:34:04 -0000 1.8 +++ poormock-se.cpp 5 Apr 2006 17:03:39 -0000 1.9 @@ -77,7 +77,7 @@ { PoorMockSecondEdition mock; - std::cout << "Tests starting" << std::endl; + MOCKPP_STD_NS::cout << "Tests starting" << MOCKPP_STD_NS::endl; try { @@ -96,18 +96,18 @@ consumer.save(); mock.verify(); - std::cout << "Tests finished" << std::endl; + MOCKPP_STD_NS::cout << "Tests finished" << MOCKPP_STD_NS::endl; } - catch(std::exception &ex) + catch(MOCKPP_STD_NS::exception &ex) { - std::cout << std::endl - << "Error occured.\n" << ex.what() << std::endl - << std::endl; + MOCKPP_STD_NS::cout << MOCKPP_STD_NS::endl + << "Error occured.\n" << ex.what() << MOCKPP_STD_NS::endl + << MOCKPP_STD_NS::endl; return 1; } - std::cout << "All tests have passed successfully" << std::endl; + MOCKPP_STD_NS::cout << "All tests have passed successfully" << MOCKPP_STD_NS::endl; return 0; } Index: visitmock.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/examples/tutorial/visitmock.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- visitmock.cpp 15 Mar 2006 21:34:04 -0000 1.18 +++ visitmock.cpp 5 Apr 2006 17:03:39 -0000 1.19 @@ -101,25 +101,25 @@ mock.activate(); // Run Consumer object - std::cout << "Tests starting" << std::endl; + MOCKPP_STD_NS::cout << "Tests starting" << MOCKPP_STD_NS::endl; Consumer consumer(&mock); consumer.load(); consumer.process(); consumer.save(); - std::cout << "Tests finished" << std::endl; + MOCKPP_STD_NS::cout << "Tests finished" << MOCKPP_STD_NS::endl; // Check pending expectations mock.verify(); - std::cout << "All tests have passed successfully" << std::endl; + MOCKPP_STD_NS::cout << "All tests have passed successfully" << MOCKPP_STD_NS::endl; } - catch(std::exception &ex) + catch(MOCKPP_STD_NS::exception &ex) { - std::cout << std::endl - << "Error occured.\n" << ex.what() << std::endl - << std::endl; + MOCKPP_STD_NS::cout << MOCKPP_STD_NS::endl + << "Error occured.\n" << ex.what() << MOCKPP_STD_NS::endl + << MOCKPP_STD_NS::endl; return 1; } Index: chainmock2.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/examples/tutorial/chainmock2.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- chainmock2.cpp 15 Mar 2006 21:34:04 -0000 1.5 +++ chainmock2.cpp 5 Apr 2006 17:03:39 -0000 1.6 @@ -123,24 +123,24 @@ // Run Consumer object - std::cout << "Tests starting" << std::endl; + MOCKPP_STD_NS::cout << "Tests starting" << MOCKPP_STD_NS::endl; Consumer consumer(&mock); consumer.load(); consumer.process(); consumer.save(); - std::cout << "Tests finished" << std::endl; + MOCKPP_STD_NS::cout << "Tests finished" << MOCKPP_STD_NS::endl; // Check pending expectations mock.verify(); - std::cout << "All tests have passed successfully" << std::endl; + MOCKPP_STD_NS::cout << "All tests have passed successfully" << MOCKPP_STD_NS::endl; } - catch(std::exception &ex) + catch(MOCKPP_STD_NS::exception &ex) { - std::cout << std::endl - << "Error occured.\n" << ex.what() << std::endl - << std::endl; + MOCKPP_STD_NS::cout << MOCKPP_STD_NS::endl + << "Error occured.\n" << ex.what() << MOCKPP_STD_NS::endl + << MOCKPP_STD_NS::endl; return 1; } Index: poormock.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/examples/tutorial/poormock.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- poormock.cpp 29 Dec 2005 19:29:51 -0000 1.10 +++ poormock.cpp 5 Apr 2006 17:03:39 -0000 1.11 @@ -16,7 +16,7 @@ #include <iostream> #ifndef _MSC_VER -using std::exit; +using MOCKPP_STD_NS::exit; #endif /** Quick-n-dirty asserter. @@ -25,10 +25,10 @@ */ #define ASSERTER(x) \ if (!(x) ) { \ - std::cout << std::endl \ - << "Error occured.\n" << #x << std::endl \ - << std::endl \ - << std::flush; \ + MOCKPP_STD_NS::cout << MOCKPP_STD_NS::endl \ + << "Error occured.\n" << #x << MOCKPP_STD_NS::endl \ + << MOCKPP_STD_NS::endl \ + << MOCKPP_STD_NS::flush; \ exit(1); \ } @@ -84,7 +84,7 @@ { PoorMock mock; - std::cout << "Tests starting" << std::endl; + MOCKPP_STD_NS::cout << "Tests starting" << MOCKPP_STD_NS::endl; // Run Consumer object Consumer consumer(&mock); @@ -101,9 +101,9 @@ ASSERTER(mock.write_counter == 9); ASSERTER(mock.close_counter == 10); - std::cout << "Tests finished" << std::endl; + MOCKPP_STD_NS::cout << "Tests finished" << MOCKPP_STD_NS::endl; - std::cout << "All tests have passed successfully" << std::endl; + MOCKPP_STD_NS::cout << "All tests have passed successfully" << MOCKPP_STD_NS::endl; return 0; } Index: basicmock.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/examples/tutorial/basicmock.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- basicmock.cpp 15 Mar 2006 21:34:04 -0000 1.10 +++ basicmock.cpp 5 Apr 2006 17:03:39 -0000 1.11 @@ -113,24 +113,24 @@ mock.calculate_output.addObjectToReturn(30); // Run Consumer object - std::cout << "Tests starting" << std::endl; + MOCKPP_STD_NS::cout << "Tests starting" << MOCKPP_STD_NS::endl; Consumer consumer(&mock); consumer.load(); consumer.process(); consumer.save(); - std::cout << "Tests finished" << std::endl; + MOCKPP_STD_NS::cout << "Tests finished" << MOCKPP_STD_NS::endl; // Check pending expectations mock.verify(); - std::cout << "All tests have passed successfully" << std::endl; + MOCKPP_STD_NS::cout << "All tests have passed successfully" << MOCKPP_STD_NS::endl; } - catch(std::exception &ex) + catch(MOCKPP_STD_NS::exception &ex) { - std::cout << std::endl - << "Error occured.\n" << ex.what() << std::endl - << std::endl; + MOCKPP_STD_NS::cout << MOCKPP_STD_NS::endl + << "Error occured.\n" << ex.what() << MOCKPP_STD_NS::endl + << MOCKPP_STD_NS::endl; return 1; } Index: chainmock.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/examples/tutorial/chainmock.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- chainmock.cpp 15 Mar 2006 21:34:04 -0000 1.15 +++ chainmock.cpp 5 Apr 2006 17:03:39 -0000 1.16 @@ -113,24 +113,24 @@ // Run Consumer object - std::cout << "Tests starting" << std::endl; + MOCKPP_STD_NS::cout << "Tests starting" << MOCKPP_STD_NS::endl; Consumer consumer(&mock); consumer.load(); consumer.process(); consumer.save(); - std::cout << "Tests finished" << std::endl; + MOCKPP_STD_NS::cout << "Tests finished" << MOCKPP_STD_NS::endl; // Check pending expectations mock.verify(); - std::cout << "All tests have passed successfully" << std::endl; + MOCKPP_STD_NS::cout << "All tests have passed successfully" << MOCKPP_STD_NS::endl; } - catch(std::exception &ex) + catch(MOCKPP_STD_NS::exception &ex) { - std::cout << std::endl - << "Error occured.\n" << ex.what() << std::endl - << std::endl; + MOCKPP_STD_NS::cout << MOCKPP_STD_NS::endl + << "Error occured.\n" << ex.what() << MOCKPP_STD_NS::endl + << MOCKPP_STD_NS::endl; return 1; } |