mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-11 16:06:25 +01:00
Build unit tests against libardour itself rather than compiling in bits. git-svn-id: svn://localhost/ardour2/branches/3.0@5949 d708f5d6-7413-0410-9779-e7cbd77b26cf
32 lines
907 B
C++
32 lines
907 B
C++
#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>
|
|
#include "ardour/ardour.h"
|
|
|
|
int
|
|
main()
|
|
{
|
|
Glib::thread_init ();
|
|
PBD::ID::init ();
|
|
ARDOUR::init (false, false);
|
|
|
|
CppUnit::TestResult testresult;
|
|
|
|
CppUnit::TestResultCollector collectedresults;
|
|
testresult.addListener (&collectedresults);
|
|
|
|
CppUnit::BriefTestProgressListener progress;
|
|
testresult.addListener (&progress);
|
|
|
|
CppUnit::TestRunner testrunner;
|
|
testrunner.addTest (CppUnit::TestFactoryRegistry::getRegistry ().makeTest ());
|
|
testrunner.run (testresult);
|
|
|
|
CppUnit::CompilerOutputter compileroutputter (&collectedresults, std::cerr);
|
|
compileroutputter.write ();
|
|
|
|
return collectedresults.wasSuccessful () ? 0 : 1;
|
|
}
|