2009-02-06 19:52:19 -05:00
|
|
|
#include <cppunit/CompilerOutputter.h>
|
|
|
|
#include <cppunit/extensions/TestFactoryRegistry.h>
|
|
|
|
#include <cppunit/TestResult.h>
|
|
|
|
#include <cppunit/TestResultCollector.h>
|
|
|
|
#include <cppunit/TestRunner.h>
|
|
|
|
#include <cppunit/BriefTestProgressListener.h>
|
|
|
|
|
2014-12-02 00:48:23 -05:00
|
|
|
#include "pbd/pbd.h"
|
2009-02-06 19:52:19 -05:00
|
|
|
|
|
|
|
int
|
|
|
|
main()
|
|
|
|
{
|
2014-12-02 00:48:23 -05:00
|
|
|
if (!PBD::init ()) return 1;
|
2009-10-19 11:26:56 -04:00
|
|
|
|
2011-11-22 19:17:31 -05:00
|
|
|
CppUnit::TestResult testresult;
|
2009-02-06 19:52:19 -05:00
|
|
|
|
2011-11-22 19:17:31 -05:00
|
|
|
CppUnit::TestResultCollector collectedresults;
|
|
|
|
testresult.addListener (&collectedresults);
|
2009-02-06 19:52:19 -05:00
|
|
|
|
2011-11-22 19:17:31 -05:00
|
|
|
CppUnit::BriefTestProgressListener progress;
|
|
|
|
testresult.addListener (&progress);
|
2009-02-06 19:52:19 -05:00
|
|
|
|
2011-11-22 19:17:31 -05:00
|
|
|
CppUnit::TestRunner testrunner;
|
|
|
|
testrunner.addTest (CppUnit::TestFactoryRegistry::getRegistry ().makeTest ());
|
|
|
|
testrunner.run (testresult);
|
2009-02-06 19:52:19 -05:00
|
|
|
|
2011-11-22 19:17:31 -05:00
|
|
|
CppUnit::CompilerOutputter compileroutputter (&collectedresults, std::cerr);
|
|
|
|
compileroutputter.write ();
|
2009-02-06 19:52:19 -05:00
|
|
|
|
2011-11-22 19:17:31 -05:00
|
|
|
return collectedresults.wasSuccessful () ? 0 : 1;
|
2009-02-06 19:52:19 -05:00
|
|
|
}
|