Add unit test to assert that using locale_from_utf8/::open will fail for some file...
[ardour.git] / libs / pbd / test / testrunner.cc
index ea8f0aa115a709528ec69c3e371a41774237e274..11f60f46a2ddc7b2962be3df5281157cf7936990 100644 (file)
@@ -7,11 +7,21 @@
 #include <glibmm/thread.h>
 #include "scalar_properties.h"
 
+#include "pbd/pbd.h"
+#include "pbd/error.h"
+#include "pbd/textreceiver.h"
 
 int
 main ()
 {
-       Glib::thread_init();
+       TextReceiver text_receiver ("pbd_test");
+
+       if (!PBD::init ()) return 1;
+
+       text_receiver.listen_to (PBD::error);
+       text_receiver.listen_to (PBD::info);
+       text_receiver.listen_to (PBD::fatal);
+       text_receiver.listen_to (PBD::warning);
 
        ScalarPropertiesTest::make_property_quarks ();
        
@@ -29,6 +39,8 @@ main ()
        
        CppUnit::CompilerOutputter compileroutputter (&collectedresults, std::cerr);
        compileroutputter.write ();
-       
+
+       PBD::cleanup ();
+
        return collectedresults.wasSuccessful () ? 0 : 1;
 }