24 #include <cppunit/XmlOutputter.h> 25 #include <cppunit/extensions/TestFactoryRegistry.h> 26 #include <cppunit/ui/text/TestRunner.h> 30 int main(
int argc,
char** argv)
33 CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest();
36 CppUnit::TextUi::TestRunner runner;
37 runner.addTest( suite );
39 std::ofstream outputFile(std::string(suite->getName()+
"-result.xml").c_str());
41 std::ofstream outputFile((std::string(TESTNAME)+std::string(
"-result.xml")).c_str());
44 runner.setOutputter(
new CppUnit::XmlOutputter( &runner.result(),outputFile ) );
47 bool wasSucessful = runner.run();
51 return wasSucessful ? 0 : 1;
int main(int argc, char **argv)