Changes in src/unittests/infounittest.cpp [8725ed:e6fdbe]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/unittests/infounittest.cpp
r8725ed re6fdbe 17 17 #include "info.hpp" 18 18 #include "infounittest.hpp" 19 #include "log.hpp" 20 21 #ifdef HAVE_TESTRUNNER 22 #include "UnitTestMain.hpp" 23 #endif /*HAVE_TESTRUNNER*/ 19 24 20 25 /********************************************** Test classes **************************************/ … … 31 36 void InfoTest::tearDown() 32 37 { 38 logger::purgeInstance(); 33 39 }; 34 40 … … 43 49 CPPUNIT_ASSERT_EQUAL( 1, test.verbosity ); 44 50 }; 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.