00001
00013 #include <cppunit/CompilerOutputter.h>
00014 #include <cppunit/extensions/TestFactoryRegistry.h>
00015 #include <cppunit/ui/text/TestRunner.h>
00016
00017 #ifndef UNICODE
00018 #define MAIN main(int argc, char* argv[])
00019 #else
00020 #define MAIN wmain(int argc, wchar_t* argv[])
00021 #endif // UNICODE
00022
00023 int MAIN
00024 {
00025
00026 CppUnit::Test* pSuite =
00027 CppUnit::TestFactoryRegistry::getRegistry().makeTest();
00028
00029
00030 CppUnit::TextUi::TestRunner runner;
00031 runner.addTest(pSuite);
00032
00033 CppUnit::CompilerOutputter* pOutputter =
00034 new CppUnit::CompilerOutputter(&runner.result(), std::cerr);
00035
00036 runner.setOutputter(pOutputter);
00037
00038
00039 bool bWasSucessful = runner.run();
00040
00041 system("Pause");
00042
00043
00044 return (bWasSucessful ? 0 : 1);
00045 }
00046