2010-04-02 11:37:11 -04: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>
|
2013-07-13 17:00:18 -04:00
|
|
|
#include <glibmm/thread.h>
|
2010-04-02 12:38:23 -04:00
|
|
|
#include "scalar_properties.h"
|
2010-04-02 11:37:11 -04:00
|
|
|
|
2014-06-24 05:33:10 -04:00
|
|
|
#include "pbd/pbd.h"
|
2014-06-24 20:59:34 -04:00
|
|
|
#include "pbd/error.h"
|
|
|
|
#include "pbd/textreceiver.h"
|
2013-07-13 17:00:18 -04:00
|
|
|
|
2010-04-02 11:37:11 -04:00
|
|
|
int
|
|
|
|
main ()
|
|
|
|
{
|
2014-06-24 20:59:34 -04:00
|
|
|
TextReceiver text_receiver ("pbd_test");
|
|
|
|
|
2014-06-24 05:33:10 -04:00
|
|
|
if (!PBD::init ()) return 1;
|
2013-07-13 17:00:18 -04:00
|
|
|
|
2014-06-24 20:59:34 -04:00
|
|
|
text_receiver.listen_to (PBD::info);
|
|
|
|
text_receiver.listen_to (PBD::warning);
|
2020-10-13 15:46:52 -04:00
|
|
|
text_receiver.listen_to (PBD::error);
|
|
|
|
text_receiver.listen_to (PBD::fatal);
|
2014-06-24 20:59:34 -04:00
|
|
|
|
2010-04-02 12:38:23 -04:00
|
|
|
ScalarPropertiesTest::make_property_quarks ();
|
2015-10-05 10:17:49 -04:00
|
|
|
|
2010-04-02 11:37:11 -04:00
|
|
|
CppUnit::TestResult testresult;
|
|
|
|
|
|
|
|
CppUnit::TestResultCollector collectedresults;
|
|
|
|
testresult.addListener (&collectedresults);
|
2015-10-05 10:17:49 -04:00
|
|
|
|
2010-04-02 11:37:11 -04:00
|
|
|
CppUnit::BriefTestProgressListener progress;
|
|
|
|
testresult.addListener (&progress);
|
2015-10-05 10:17:49 -04:00
|
|
|
|
2010-04-02 11:37:11 -04:00
|
|
|
CppUnit::TestRunner testrunner;
|
|
|
|
testrunner.addTest (CppUnit::TestFactoryRegistry::getRegistry ().makeTest ());
|
|
|
|
testrunner.run (testresult);
|
2015-10-05 10:17:49 -04:00
|
|
|
|
2010-04-02 11:37:11 -04:00
|
|
|
CppUnit::CompilerOutputter compileroutputter (&collectedresults, std::cerr);
|
|
|
|
compileroutputter.write ();
|
2014-06-24 05:33:10 -04:00
|
|
|
|
|
|
|
PBD::cleanup ();
|
|
|
|
|
2010-04-02 11:37:11 -04:00
|
|
|
return collectedresults.wasSuccessful () ? 0 : 1;
|
|
|
|
}
|