2008-06-16 11:59:34 +00:00
|
|
|
#include "Platform.h"
|
2008-03-03 11:30:12 +00:00
|
|
|
#include <iostream>
|
2006-02-17 13:35:04 +00:00
|
|
|
#include <cppunit/CompilerOutputter.h>
|
|
|
|
#include <cppunit/extensions/TestFactoryRegistry.h>
|
|
|
|
#include <cppunit/ui/text/TestRunner.h>
|
|
|
|
|
|
|
|
int main(int argc, char* argv[]) {
|
2008-06-16 11:59:34 +00:00
|
|
|
aria2::Platform platform;
|
|
|
|
|
|
|
|
#ifdef ENABLE_NLS
|
|
|
|
// Set locale to C to prevent the messages to be localized.
|
|
|
|
setlocale (LC_CTYPE, "C");
|
|
|
|
setlocale (LC_MESSAGES, "C");
|
|
|
|
#endif // ENABLE_NLS
|
|
|
|
|
2006-02-17 13:35:04 +00:00
|
|
|
CppUnit::Test* suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest();
|
|
|
|
CppUnit::TextUi::TestRunner runner;
|
|
|
|
runner.addTest(suite);
|
|
|
|
|
|
|
|
runner.setOutputter(new CppUnit::CompilerOutputter(&runner.result(), std::cerr));
|
2007-06-10 07:55:43 +00:00
|
|
|
|
2006-02-17 13:35:04 +00:00
|
|
|
// Run the tests.
|
|
|
|
bool successfull = runner.run();
|
|
|
|
|
|
|
|
return successfull ? 0 : 1;
|
|
|
|
}
|