2007-06-10 07:55:43 +00:00
|
|
|
#include "CookieBoxFactory.h"
|
2006-02-17 13:35:04 +00:00
|
|
|
#include <cppunit/CompilerOutputter.h>
|
|
|
|
#include <cppunit/extensions/TestFactoryRegistry.h>
|
|
|
|
#include <cppunit/ui/text/TestRunner.h>
|
|
|
|
|
2008-02-08 15:53:45 +00:00
|
|
|
using aria2::SharedHandle;
|
|
|
|
using aria2::SingletonHolder;
|
|
|
|
|
2006-02-17 13:35:04 +00:00
|
|
|
int main(int argc, char* argv[]) {
|
|
|
|
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
|
|
|
// setup
|
2008-02-08 15:53:45 +00:00
|
|
|
SharedHandle<aria2::CookieBoxFactory> cookieBoxFactory = new aria2::CookieBoxFactory();
|
|
|
|
SingletonHolder<SharedHandle<aria2::CookieBoxFactory> >::instance(cookieBoxFactory);
|
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;
|
|
|
|
}
|