summaryrefslogtreecommitdiffstats
path: root/kpilot/tests/main.cc
blob: c6ddd23c97b7f346ad8a1d01793592cecd386e96 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <cppunit/extensions/TestFactoryRegistry.h>
#include <cppunit/ui/text/TestRunner.h>

int main( int argc, char **argv)
{
	CppUnit::TestFactoryRegistry &registry =
		CppUnit::TestFactoryRegistry::getRegistry();

	CppUnit::TextUi::TestRunner runner;
	runner.addTest( registry.makeTest() );

	// Run the tests.
	bool wasSucessful = runner.run();

	// Return error code 1 if the one of test failed.
	return wasSucessful ? 0 : 1;
}