22 #include <glibmm/fileutils.h>
23 #include <glibmm/miscutils.h>
33 #include <cppunit/extensions/HelperMacros.h>
44 CPPUNIT_ASSERT_EQUAL (q->
name(), p->
name());
51 CPPUNIT_ASSERT_EQUAL (qp.size(), pp.size());
53 XMLPropertyList::const_iterator i = pp.begin ();
54 XMLPropertyList::const_iterator j = qp.begin ();
55 while (i != pp.end ()) {
56 CPPUNIT_ASSERT_EQUAL ((*j)->name(), (*i)->name());
57 if (find (ignore_properties.begin(), ignore_properties.end(), (*i)->name ()) == ignore_properties.end ()) {
58 CPPUNIT_ASSERT_EQUAL_MESSAGE ((*j)->name(), (*i)->value(), (*i)->value());
67 CPPUNIT_ASSERT_EQUAL (qc.size(), pc.size());
68 XMLNodeList::const_iterator k = pc.begin ();
69 XMLNodeList::const_iterator l = qc.begin ();
71 while (k != pc.end ()) {
94 bool rv = ref.
write (ref_file);
104 CPPUNIT_ASSERT (AudioEngine::instance ());
105 CPPUNIT_ASSERT (engine);
106 CPPUNIT_ASSERT (engine->
set_backend (
"Dummy",
"",
""));
110 CPPUNIT_ASSERT (engine->
start () == 0);
116 AudioEngine::instance()->remove_session ();
117 AudioEngine::instance()->stop ();
118 AudioEngine::destroy ();
127 Session* session =
new Session (*AudioEngine::instance(), dir, state);
128 AudioEngine::instance ()->set_session (session);
135 #ifdef PLATFORM_WINDOWS
136 std::string wsp(g_win32_get_package_installation_directory_of_module(NULL));
137 return Glib::build_filename (wsp,
"ardour_testdata");
139 return Glib::getenv(
"ARDOUR_TEST_PATH");
const XMLPropertyList & properties() const
const std::string & content() const
Session * load_session(string dir, string state)
void check_xml(XMLNode *node, string ref_file, list< string > const &ignore_properties)
const std::string & name() const
void create_and_start_dummy_backend()
std::list< XMLProperty * > XMLPropertyList
bool write_ref(XMLNode *node, string ref_file)
int start(bool for_latency_measurement=false)
const XMLNodeList & children(const std::string &str=std::string()) const
std::list< XMLNode * > XMLNodeList
int get_test_sample_rate()
LIBARDOUR_API void init_post_engine()
XMLNode * set_root(XMLNode *n)
void stop_and_destroy_backend()
string tmp_writable_directory(const char *domain, const string &prefix)
boost::shared_ptr< AudioBackend > set_backend(const std::string &, const std::string &arg1, const std::string &arg2)
PBD::Searchpath test_search_path()
std::string new_test_output_dir(std::string prefix)
static void check_nodes(XMLNode const *p, XMLNode const *q, list< string > const &ignore_properties)