24 #include <cppunit/TextOutputter.h> 25 #include <cppunit/CompilerOutputter.h> 26 #include <cppunit/XmlOutputter.h> 27 #include <cppunit/TestResult.h> 28 #include <cppunit/TestResultCollector.h> 29 #include <cppunit/TestRunner.h> 30 #include <cppunit/extensions/TestFactoryRegistry.h> 46 CPPUNIT_NS::TestResult testresult;
49 CPPUNIT_NS::TestResultCollector collectedresults;
50 testresult.addListener(&collectedresults);
53 CPPUNIT_NS::TestRunner testrunner;
54 testrunner.addTest(CPPUNIT_NS::TestFactoryRegistry::getRegistry().makeTest());
62 testresult.addListener(&progress);
64 testrunner.run(testresult);
66 CPPUNIT_NS::TextOutputter textoutputter(&collectedresults, std::cerr);
67 textoutputter.write();
73 testresult.addListener(&progress);
75 testrunner.run(testresult);
77 CPPUNIT_NS::CompilerOutputter compileroutputter(&collectedresults, std::cerr);
78 compileroutputter.write();
83 testrunner.run(testresult);
85 CPPUNIT_NS::XmlOutputter xmloutputter(&collectedresults, std::cerr,
"UTF-8");
95 return collectedresults.wasSuccessful() ? 0 : 1;
99 #ifdef _IC_BUILDER_DEPRECATED_STYLE_
bool initialize(int &argc, char *argv[], bool remove_read_arguments)
int runCppunitTestSuite(TestResultOutputType outputType)
Contains icl_core::TestListener.
Contains global LXRT functions.