mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-23 07:06:23 +01:00
Use test utility function to find evoral test files
either via EVORAL_TEST_PATH env var or on windows via directory relative to dll
This commit is contained in:
parent
f6e15a3b6b
commit
61f9ca9f3c
3 changed files with 23 additions and 12 deletions
|
|
@ -21,11 +21,24 @@ SMFTest::createNewFileTest ()
|
|||
CPPUNIT_ASSERT(Glib::file_test (new_file_path, Glib::FILE_TEST_IS_REGULAR));
|
||||
}
|
||||
|
||||
PBD::Searchpath
|
||||
test_search_path ()
|
||||
{
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
string wsp(g_win32_get_package_installation_directory_of_module(NULL));
|
||||
return Glib::build_filename (wsp, "evoral_testdata");
|
||||
#else
|
||||
return Glib::getenv("EVORAL_TEST_PATH");
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
SMFTest::takeFiveTest ()
|
||||
{
|
||||
TestSMF smf;
|
||||
smf.open("./test/testdata/TakeFive.mid");
|
||||
string testdata_path;
|
||||
CPPUNIT_ASSERT (find_file (test_search_path (), "TakeFive.mid", testdata_path));
|
||||
smf.open(testdata_path);
|
||||
CPPUNIT_ASSERT(!smf.is_empty());
|
||||
|
||||
seq->start_write();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue