Update of /cvsroot/cppunit/cppunit2/src/cpput
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2135/src/cpput
Modified Files:
lighttestrunner.cpp
Log Message:
- flush stdout during test progress.
Index: lighttestrunner.cpp
===================================================================
RCS file: /cvsroot/cppunit/cppunit2/src/cpput/lighttestrunner.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** lighttestrunner.cpp 8 Nov 2005 20:25:49 -0000 1.10
--- lighttestrunner.cpp 9 Nov 2005 22:42:31 -0000 1.11
***************
*** 35,47 ****
if ( testFailed_ > 0 )
{
! printf( "Failure report:\n%s", report_.c_str() );
! printf( "%d/%d tests passed, %d tests failed.",
testRun_ - testFailed_,
testRun_,
testFailed_ );
}
else
{
! printf( "All %d tests passed.", testRun_ );
}
return testFailed_ == 0;
--- 35,50 ----
if ( testFailed_ > 0 )
{
! fprintf( stdout, "Failure report:\n%s", report_.c_str() );
! fflush( stdout );
! fprintf( stdout, "%d/%d tests passed, %d tests failed.",
testRun_ - testFailed_,
testRun_,
testFailed_ );
+ fflush( stdout );
}
else
{
! fprintf( stdout, "All %d tests passed.\n", testRun_ );
! fflush( stdout );
}
return testFailed_ == 0;
***************
*** 72,76 ****
LightTestRunner::runTestCase( const AbstractTestCasePtr &testCase )
{
! printf( "Testing %s : ", getTestPath().c_str() );
assertions_.clear();
logs_.clear();
--- 75,80 ----
LightTestRunner::runTestCase( const AbstractTestCasePtr &testCase )
{
! fprintf( stdout, "Testing %s : ", getTestPath().c_str() );
! fflush( stdout );
assertions_.clear();
logs_.clear();
***************
*** 79,83 ****
bool succeeded = testCase->runTest();
! printf( "%s\n", succeeded ? "OK" : "FAIL" );
if ( !succeeded )
{
--- 83,88 ----
bool succeeded = testCase->runTest();
! fprintf( stdout, "%s\n", succeeded ? "OK" : "FAIL" );
! fflush( stdout );
if ( !succeeded )
{
|