projects
/
ardour.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Tests: ensure that libardour is initialized
[ardour.git]
/
libs
/
ardour
/
test
/
test_util.cc
diff --git
a/libs/ardour/test/test_util.cc
b/libs/ardour/test/test_util.cc
index 2cd7fb8bdef09fc60cbde837c42f7297ef90669c..99a9edd9c077b950815c42f3d81191473fac8683 100644
(file)
--- a/
libs/ardour/test/test_util.cc
+++ b/
libs/ardour/test/test_util.cc
@@
-92,7
+92,9
@@
write_ref (XMLNode* node, string ref_file)
{
XMLTree ref;
ref.set_root (node);
{
XMLTree ref;
ref.set_root (node);
- return ref.write (ref_file);
+ bool rv = ref.write (ref_file);
+ ref.set_root (0);
+ return rv;
}
class TestReceiver : public Receiver
}
class TestReceiver : public Receiver
@@
-132,6
+134,7
@@
protected:
};
TestReceiver test_receiver;
};
TestReceiver test_receiver;
+static const char* localedir = LOCALEDIR;
/** @param dir Session directory.
* @param state Session state file, without .ardour suffix.
/** @param dir Session directory.
* @param state Session state file, without .ardour suffix.
@@
-139,6
+142,7
@@
TestReceiver test_receiver;
Session *
load_session (string dir, string state)
{
Session *
load_session (string dir, string state)
{
+ ARDOUR::init (false, true, localedir);
SessionEvent::create_per_thread_pool ("test", 512);
test_receiver.listen_to (error);
SessionEvent::create_per_thread_pool ("test", 512);
test_receiver.listen_to (error);
@@
-153,7
+157,7
@@
load_session (string dir, string state)
AudioEngine* engine = AudioEngine::create ();
AudioEngine* engine = AudioEngine::create ();
- CPPUNIT_ASSERT (engine->set_
default_backend (
));
+ CPPUNIT_ASSERT (engine->set_
backend ("Dummy", "", ""
));
init_post_engine ();
init_post_engine ();