[Cppunit-cvs] cppunit2/examples/log_demo SConscript,NONE,1.1 main.cpp,NONE,1.1
Brought to you by:
blep
From: Baptiste L. <bl...@us...> - 2005-08-11 07:18:31
|
Update of /cvsroot/cppunit/cppunit2/examples/log_demo In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23769/examples/log_demo Added Files: SConscript main.cpp Log Message: * Added log support in test result output * Removed unsued method in TestResultUpdater * Added CppUT::log demo example. --- NEW FILE: main.cpp --- #include <examples/common/examplecommon.h> #include <cpput/testcase.h> #include <opentest/texttestdriver.h> #include <opentest/properties.h> #include <cpptl/stringtools.h> // Checking assertion do not abort the test uppon failure: // all the failing assertions below will be reported by the test framework static void testLogDemo() { for ( int index =0; index < 5; ++index ) { CppUT::log( "index is " + CppTL::toString(index) ); CPPUT_CHECK_EXPR( index % 2 == 0 ); } } int main( int argc, const char *argv[] ) { CppUT::TestSuitePtr allSuite = CppUT::makeTestSuite( "All tests" ); allSuite->add( CppUT::makeTestCase( CppTL::cfn0( &testLogDemo ), "testLogDemo" ) ); return runExampleTests( argc, argv, allSuite.get() ); } --- NEW FILE: SConscript --- Import( 'env_testing buildCppUnitExample' ) buildCppUnitExample( env_testing, Split( """ main.cpp """ ), 'log_demo' ) |