25 #include <cppunit/CompilerOutputter.h> 26 #include <cppunit/extensions/TestFactoryRegistry.h> 27 #include <cppunit/ui/text/TestRunner.h> 30 #define TESTSUITE_IMPLEMENTATION 31 #include "ColorTest.h" 34 #include "IndexTest.h" 35 #include "FlagsTest.h" 36 #include "BitBoardTest.h" 37 #include "PieceTest.h" 38 #include "ChessPositionTest.h" 42 Debug(NAMESPACE_DEBUG::init());
45 CppUnit::Test* suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest();
48 CppUnit::TextUi::TestRunner runner;
49 runner.addTest(suite);
52 runner.setOutputter(
new CppUnit::CompilerOutputter(&runner.result(), std::cerr));
54 bool wasSucessful = runner.run();
57 return wasSucessful ? 0 : 1;