summaryrefslogtreecommitdiffstats
blob: ea4f0d9ae98d24fea9a92619a5d72fcc7685fd13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <string>
#include <cppunit/ui/text/TestRunner.h>
#include <cppunit/extensions/TestFactoryRegistry.h>
#include <cppunit/XmlOutputter.h>
#include <cppunit/TextTestResult.h>

int main(int argc, char* argv[])
{
	CppUnit::TestFactoryRegistry& registry = CppUnit::TestFactoryRegistry::getRegistry();
	CppUnit::TextUi::TestRunner runner;
	runner.addTest( registry.makeTest() );
	if (argc >= 2 && std::string(argv[1]) != std::string("--xml")) {
		runner.setOutputter(new CppUnit::XmlOutputter(&runner.result(), std::cout));
	}
	return (runner.run("") ? 0 : 1);
}