[Cppunit-cvs] cppunit2/examples/common examplecommon.h,NONE,1.1
Brought to you by:
blep
From: Baptiste L. <bl...@us...> - 2005-08-09 05:39:25
|
Update of /cvsroot/cppunit/cppunit2/examples/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30949/examples/common Added Files: examplecommon.h Log Message: * Centralized test running logic in examples/common/examplecommon.h --- NEW FILE: examplecommon.h --- #ifndef CPPUT_EXAMPLES_EXAMPLECOMMON_H_INCLUDED # define CPPUT_EXAMPLES_EXAMPLECOMMON_H_INCLUDED #include <cpput/testsuite.h> #include <cpput/lighttestrunner.h> //#include <cpput/testrunner.h> // cppunit2 testrunner for opentest #include <cpput/assert.h> inline int runExampleTests( int argc, const char *argv[], CppUT::Test *test ) { // CppUT::TestRunner runner; // runner.setRootSuite( allSuite.get() ); // OpenTest::TextTestDriver driver( runner ); // bool sucessful = driver.run(); CppUT::LightTestRunner runner; runner.addTest( test ); bool sucessful = runner.runAllTests(); return sucessful ? 0 : 1; } #endif // CPPUT_EXAMPLES_EXAMPLECOMMON_H_INCLUDED |