#ifdef NICE_USELIB_CPPUNIT #include #include #include #include #include #include #endif /** * CppUnit-Testrunner */ int main(int argc, char* argv[]) { // shut up warnings (void)argc; (void)argv; #ifdef NICE_USELIB_CPPUNIT CppUnit::TestResult controller; CppUnit::TestResultCollector result; controller.addListener(&result); // Get the top level suite from the registry CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest(); // Adds the test to the list of test to run CppUnit::TestRunner runner; runner.addTest( suite ); // Change the default outputter to a compiler error format outputter // Print test in a compiler compatible format. CppUnit::CompilerOutputter outputter( &result, std::cerr ); outputter.write(); // Run the tests runner.run( controller ); std::string sTestName = suite->getName(); //std::string sTestName = runner.getName(); sTestName.append( "_testresults.xml"); //std::cout << sTestName <