[Cppunit-cvs] cppunit2/src/cpputtest main.cpp,1.7,1.8
Brought to you by:
blep
From: Baptiste L. <bl...@us...> - 2004-11-15 08:39:31
|
Update of /cvsroot/cppunit/cppunit2/src/cpputtest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2891/cpputtest Modified Files: main.cpp Log Message: * disabled test failing on VC++ 6 * using OpenTest TextTestDriver instead of CppUnit runner stuff. Index: main.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit2/src/cpputtest/main.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** main.cpp 4 Aug 2004 21:21:56 -0000 1.7 --- main.cpp 15 Nov 2004 08:39:20 -0000 1.8 *************** *** 12,15 **** --- 12,18 ---- #include "testfixturetest.h" + #include <cpput/testrunner.h> // cppunit2 testrunner for opentest + #include <opentest/texttestdriver.h> + bool testBasicAssertions(); *************** *** 19,22 **** --- 22,26 ---- bool testTestCase(); bool testFunctors(); + //bool testFunctors2(); *************** *** 25,28 **** --- 29,33 ---- return testBasicAssertions() && testFunctors() && + // testFunctors2() && testTestRunResult() && testTestContext() && *************** *** 76,82 **** allSuite->add( EnumeratorTest::suite() ); allSuite->add( AssertEnumTest::suite() ); ! allSuite->add( CommandLineOptionsTest::suite() ); CppUT::TestContext context; CppUT::TestRunResult result; --- 81,88 ---- allSuite->add( EnumeratorTest::suite() ); allSuite->add( AssertEnumTest::suite() ); ! // allSuite->add( CommandLineOptionsTest::suite() ); + /* // Old stuff using CppUnit 2 CppUT::TestContext context; CppUT::TestRunResult result; *************** *** 88,90 **** --- 94,106 ---- dumpFailures( *allSuite, result ); return result.successful() ? 0 : 1; + */ + + CppUT::TestRunner runner; + CppUT::AbstractTestSuitePtr rootSuite = + CppUT::staticPointerCast<CppUT::AbstractTestSuite>( allSuite ); + runner.setRootSuite( rootSuite ); + + OpenTest::TextTestDriver driver( runner ); + bool sucessful = driver.run(); + return sucessful ? 0 : 1; } |