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>
|
|
|
|
|
|
|
|
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
|
|
|
|
CookieBoxFactoryHandle cookieBoxFactory = new CookieBoxFactory();
|
|
|
|
CookieBoxFactorySingletonHolder::instance(cookieBoxFactory);
|
|
|
|
|
2006-02-17 13:35:04 +00:00
|
|
|
// Run the tests.
|
|
|
|
bool successfull = runner.run();
|
|
|
|
|
|
|
|
return successfull ? 0 : 1;
|
|
|
|
}
|