Thread: [Cppunit-cvs] cppunit2/src/cpputtest main.cpp,1.14,1.15 testbasicassertion.cpp,1.7,1.8 testfunctor.c
Brought to you by:
blep
From: Baptiste L. <bl...@us...> - 2005-02-27 16:30:49
|
Update of /cvsroot/cppunit/cppunit2/src/cpputtest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9420/src/cpputtest Modified Files: main.cpp testbasicassertion.cpp testfunctor.cpp testtestcase.cpp testtestsuite.cpp Log Message: * removed dependency on <iostream>. * added progress traces while running bootstrap tests. Index: testbasicassertion.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit2/src/cpputtest/testbasicassertion.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** testbasicassertion.cpp 23 Feb 2005 23:09:29 -0000 1.7 --- testbasicassertion.cpp 27 Feb 2005 16:30:34 -0000 1.8 *************** *** 1,4 **** #include <cpput/assert.h> ! #include <iostream> #include <stdexcept> --- 1,4 ---- #include <cpput/assert.h> ! #include <stdio.h> #include <stdexcept> *************** *** 13,17 **** catch ( ... ) { ! std::cout << "Test 1: CPPUT_ASSERT_THROW should not have thrown an exception" << std::endl; return false; } --- 13,17 ---- catch ( ... ) { ! printf( "Test 1: CPPUT_ASSERT_THROW should not have thrown an exception\n" ); return false; } *************** *** 21,25 **** { CPPUT_ASSERT_THROW( 1234, std::exception ); ! std::cout << "Test 2: expected AbortingAssertionException not thrown by CPPUT_ASSERT_THROW." << std::endl; return false; } --- 21,25 ---- { CPPUT_ASSERT_THROW( 1234, std::exception ); ! printf( "Test 2: expected AbortingAssertionException not thrown by CPPUT_ASSERT_THROW.\n" ); return false; } *************** *** 41,47 **** catch ( CppUT::AbortingAssertionException &e ) { ! std::cout << "Test 3: CPPUT_ASSERT_NO_THROW should not " ! "have thrown an exception." << std::endl ! << e.what() << std::endl; return false; } --- 41,46 ---- catch ( CppUT::AbortingAssertionException &e ) { ! printf( "Test 3: CPPUT_ASSERT_NO_THROW should not " ! "have thrown an exception.\n%s\n", e.what() ); return false; } *************** *** 51,56 **** { CPPUT_ASSERT_NO_THROW( throw std::runtime_error( "dummy" ) ); ! std::cout << "Test 4: expected AbortingAssertionException " ! "not thrown by CPPUT_ASSERT_THROW." << std::endl; return false; } --- 50,55 ---- { CPPUT_ASSERT_NO_THROW( throw std::runtime_error( "dummy" ) ); ! printf( "Test 4: expected AbortingAssertionException " ! "not thrown by CPPUT_ASSERT_THROW.\n" ); return false; } *************** *** 72,75 **** --- 71,75 ---- bool testBasicAssertions() { + printf( "Running bootstrap test: testBasicAssertions()...\n" ); if ( !testAssertThrow() ) return false; *************** *** 128,132 **** catch ( CppUT::AbortingAssertionException &e ) { ! std::cout << "testAssertions() failed: " << e.what() << std::endl; return false; } --- 128,132 ---- catch ( CppUT::AbortingAssertionException &e ) { ! printf( "testBasicAssertions() failed: %s\n", e.what() ); return false; } Index: main.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit2/src/cpputtest/main.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** main.cpp 27 Feb 2005 16:12:07 -0000 1.14 --- main.cpp 27 Feb 2005 16:30:28 -0000 1.15 *************** *** 1,5 **** #include <cpput/test.h> #include <cpput/testsuite.h> ! #include <iostream> #include "assertenumtest.h" #include "assertstringtest.h" --- 1,5 ---- #include <cpput/test.h> #include <cpput/testsuite.h> ! #include <stdio.h> #include "assertenumtest.h" #include "assertstringtest.h" *************** *** 38,46 **** if ( !bootStrapSuccess ) { ! std::cout << "bootstrap tests failed..." << std::endl; return 1; } ! std::cout << "All bootstrap tests passed successfuly..." << std::endl; CppUT::TestSuitePtr allSuite = CppUT::makeTestSuite( "All tests" ); --- 38,46 ---- if ( !bootStrapSuccess ) { ! printf( "bootstrap tests failed...\n" ); return 1; } ! printf( "All bootstrap tests passed successfuly...\n" ); CppUT::TestSuitePtr allSuite = CppUT::makeTestSuite( "All tests" ); Index: testtestsuite.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit2/src/cpputtest/testtestsuite.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** testtestsuite.cpp 20 Nov 2004 15:26:38 -0000 1.6 --- testtestsuite.cpp 27 Feb 2005 16:30:34 -0000 1.7 *************** *** 2,6 **** #include <cpput/testcase.h> #include <cpput/testsuite.h> ! #include <iostream> #include "mocktestvisitor.h" --- 2,6 ---- #include <cpput/testcase.h> #include <cpput/testsuite.h> ! #include <stdio.h> #include "mocktestvisitor.h" *************** *** 30,33 **** --- 30,34 ---- bool testTestSuite() { + printf( "Running bootstrap test: testTestSuite()...\n" ); try { *************** *** 57,61 **** catch ( CppUT::AbortingAssertionException &e ) { ! std::cout << "testTestsuite() failed: " << e.what() << std::endl; return false; } --- 58,62 ---- catch ( CppUT::AbortingAssertionException &e ) { ! printf( "testTestsuite() failed: %s\n", e.what() ); return false; } Index: testtestcase.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit2/src/cpputtest/testtestcase.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** testtestcase.cpp 27 Feb 2005 14:38:28 -0000 1.13 --- testtestcase.cpp 27 Feb 2005 16:30:34 -0000 1.14 *************** *** 1,5 **** #include <cpput/assert.h> #include <cpput/testcase.h> ! #include <iostream> #include <stdexcept> #include "mocktestvisitor.h" --- 1,5 ---- #include <cpput/assert.h> #include <cpput/testcase.h> ! #include <stdio.h> #include <stdexcept> #include "mocktestvisitor.h" *************** *** 231,234 **** --- 231,235 ---- bool testTestCase() { + printf( "Running bootstrap test: testTestCase()...\n" ); try { *************** *** 244,248 **** catch ( CppUT::AbortingAssertionException &e ) { ! std::cout << "testTestCase() failed: " << e.what() << std::endl; return false; } --- 245,249 ---- catch ( CppUT::AbortingAssertionException &e ) { ! printf( "testTestCase() failed: %s\n", e.what() ); return false; } Index: testfunctor.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit2/src/cpputtest/testfunctor.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** testfunctor.cpp 27 Feb 2005 14:38:28 -0000 1.8 --- testfunctor.cpp 27 Feb 2005 16:30:34 -0000 1.9 *************** *** 1,5 **** #include <cpput/assert.h> #include <cpptl/functor.h> ! #include <iostream> --- 1,5 ---- #include <cpput/assert.h> #include <cpptl/functor.h> ! #include <stdio.h> *************** *** 227,230 **** --- 227,231 ---- bool testFunctors() { + printf( "Running bootstrap test: testFunctors()...\n" ); try { *************** *** 242,246 **** catch ( CppUT::AbortingAssertionException &e ) { ! std::cout << "testFunctors() failed: " << e.what() << std::endl; return false; } --- 243,247 ---- catch ( CppUT::AbortingAssertionException &e ) { ! printf( "testFunctors() failed: %s\n", e.what() ); return false; } |