13
0
livetrax/libs/evoral/test/testrunner.cc
Robin Gareus d70ebde1dc
Fix compilation of evoral unit-test
Some of these tests should be moved to libtemoral.
On 64bit Linux the tests pass, except various RangeTests.
2022-09-30 04:04:48 +02:00

34 lines
875 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 "pbd/pbd.h"
#include "temporal/tempo.h"
int
main()
{
if (!PBD::init ()) return 1;
Temporal::init ();
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;
}