Fix state features array
[ardour.git] / libs / ardour / test / test_util.cc
index 9543bf58ae821ecb5bda5fdd2e6f441389fd0ce9..88c88c90752ec26d1994fa60c9d8b8229cb5db27 100644 (file)
@@ -16,7 +16,6 @@
     with this program; if not, write to the Free Software Foundation, Inc.,
     675 Mass Ave, Cambridge, MA 02139, USA.
 */
-#include <fstream>
 #include <sstream>
 
 #include <glibmm/fileutils.h>
@@ -27,6 +26,7 @@
 
 #include "ardour/session.h"
 #include "ardour/audioengine.h"
+#include "ardour/filesystem_paths.h"
 
 #include "test_util.h"
 
@@ -67,7 +67,7 @@ check_nodes (XMLNode const * p, XMLNode const * q, list<string> const & ignore_p
        CPPUNIT_ASSERT_EQUAL (qc.size(), pc.size());
        XMLNodeList::const_iterator k = pc.begin ();
        XMLNodeList::const_iterator l = qc.begin ();
-       
+
        while (k != pc.end ()) {
                check_nodes (*k, *l, ignore_properties);
                ++k;
@@ -103,7 +103,7 @@ create_and_start_dummy_backend ()
 
        CPPUNIT_ASSERT (AudioEngine::instance ());
        CPPUNIT_ASSERT (engine);
-       CPPUNIT_ASSERT (engine->set_backend ("Dummy", "", ""));
+       CPPUNIT_ASSERT (engine->set_backend ("None (Dummy)", "Unit-Test", ""));
 
        init_post_engine ();
 
@@ -133,11 +133,12 @@ PBD::Searchpath
 test_search_path ()
 {
 #ifdef PLATFORM_WINDOWS
-       std::string wsp(g_win32_get_package_installation_directory_of_module(NULL));
-       return Glib::build_filename (wsp, "ardour_testdata");
-#else
-       return Glib::getenv("ARDOUR_TEST_PATH");
+       if (!getenv("ARDOUR_TEST_PATH")) {
+               std::string wsp(windows_package_directory_path());
+               return Glib::build_filename (wsp, "ardour_testdata");
+       }
 #endif
+       return Glib::getenv("ARDOUR_TEST_PATH");
 }
 
 std::string