3 #include <cppunit/TestResult.h>
4 #include <cppunit/TestResultCollector.h>
5 #include <cppunit/BriefTestProgressListener.h>
6 #include <cppunit/TextOutputter.h>
7 #include <cppunit/extensions/TestFactoryRegistry.h>
8 #include <cppunit/TestRunner.h>
12 CppUnit::TestResult test
;
13 CppUnit::TestResultCollector result
;
14 CppUnit::BriefTestProgressListener progress
;
15 test
.addListener(&result
);
16 test
.addListener(&progress
);
18 CppUnit::TextOutputter
outputter(&result
, std::clog
);
20 CppUnit::TestRunner runner
;
21 runner
.addTest(CppUnit::TestFactoryRegistry::getRegistry().makeTest());
26 return result
.wasSuccessful() ? 0 : 1;