Changeset 44becc for molecuilder/src/unittests/infounittest.cpp
- Timestamp:
- Feb 25, 2010, 2:17:15 PM (16 years ago)
- Children:
- 0de871, 36c5cf
- Parents:
- 1aa81a
- File:
-
- 1 edited
-
molecuilder/src/unittests/infounittest.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/unittests/infounittest.cpp
r1aa81a r44becc 17 17 #include "info.hpp" 18 18 #include "infounittest.hpp" 19 20 #ifdef HAVE_TESTRUNNER 21 #include "UnitTestMain.hpp" 22 #endif /*HAVE_TESTRUNNER*/ 19 23 20 24 /********************************************** Test classes **************************************/ … … 43 47 CPPUNIT_ASSERT_EQUAL( 1, test.verbosity ); 44 48 }; 45 46 47 /********************************************** Main routine **************************************/48 49 int main(int argc, char **argv)50 {51 // Get the top level suite from the registry52 CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest();53 54 // Adds the test to the list of test to run55 CppUnit::TextUi::TestRunner runner;56 runner.addTest( suite );57 58 // Change the default outputter to a compiler error format outputter59 runner.setOutputter( new CppUnit::CompilerOutputter( &runner.result(),60 std::cerr ) );61 // Run the tests.62 bool wasSucessful = runner.run();63 64 // Return error code 1 if the one of test failed.65 return wasSucessful ? 0 : 1;66 };
Note:
See TracChangeset
for help on using the changeset viewer.
