9 #include <cppunit/XmlOutputter.h> 10 #include <cppunit/extensions/TestFactoryRegistry.h> 11 #include <cppunit/ui/text/TestRunner.h> 15 int main(
int argc,
char** argv)
18 CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest();
21 CppUnit::TextUi::TestRunner runner;
22 runner.addTest( suite );
24 std::ofstream outputFile(std::string(suite->getName()+
"-result.xml").c_str());
26 std::ofstream outputFile((std::string(TESTNAME)+std::string(
"-result.xml")).c_str());
29 runner.setOutputter(
new CppUnit::XmlOutputter( &runner.result(),outputFile ) );
32 bool wasSucessful = runner.run();
36 return wasSucessful ? 0 : 1;
int main(int argc, char **argv)