summaryrefslogtreecommitdiff
path: root/libs/midi++2/test
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2013-01-20 18:23:42 +0000
committerDavid Robillard <d@drobilla.net>2013-01-20 18:23:42 +0000
commitfa8d0268eb9488530a9544bd0ed2631636b129b7 (patch)
tree6d313405b9be4a2a61eae6c40ce4d85bbfb521e6 /libs/midi++2/test
parentfc7b4b7f627e5238ee1cb48d1bbb36811b85b9ed (diff)
Fix compilation with --test.
Make midnam test suite pass again. The Ardour test suite does not pass. I commented out old crossfade stuff, but I am not familiar enough with the parts that fail to fix it. It might be a good idea for someone to look into this. Ideally we'd have the test integrated into everyone's workflow, but they add quite a few files to compile... git-svn-id: svn://localhost/ardour2/branches/3.0@13931 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/midi++2/test')
-rw-r--r--libs/midi++2/test/MidnamTest.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/libs/midi++2/test/MidnamTest.cpp b/libs/midi++2/test/MidnamTest.cpp
index 9a4ba04800..ba96d318c4 100644
--- a/libs/midi++2/test/MidnamTest.cpp
+++ b/libs/midi++2/test/MidnamTest.cpp
@@ -17,7 +17,7 @@ static string const prefix = "../../../patchfiles/";
void
MidnamTest::protools_patchfile_test()
{
- XMLTree xmldoc(prefix + "ProtoolsPatchFile.midnam");
+ XMLTree xmldoc(prefix + "Roland_SC-88_Pro.midnam");
boost::shared_ptr<XMLSharedNodeList> result = xmldoc.find(
"//MIDINameDocument");
CPPUNIT_ASSERT(result->size() == 1);
@@ -25,18 +25,18 @@ MidnamTest::protools_patchfile_test()
result = xmldoc.find("//ChannelNameSet");
CPPUNIT_ASSERT(result->size() == 2);
- MIDINameDocument doc(prefix + "ProtoolsPatchFile.midnam");
+ MIDINameDocument doc(prefix + "Roland_SC-88_Pro.midnam");
CPPUNIT_ASSERT(doc.all_models().size() == 1);
CPPUNIT_ASSERT(doc.author().find("Mark of the Unicorn") == 0);
- const string model = doc.all_models().front();
+ const string model = *doc.all_models().begin();
CPPUNIT_ASSERT_EQUAL(string("SC-88 Pro"), model);
boost::shared_ptr<MasterDeviceNames> masterDeviceNames =
doc.master_device_names_by_model().find(model)->second;
CPPUNIT_ASSERT_EQUAL(string("Roland"), masterDeviceNames->manufacturer());
string modename = masterDeviceNames->custom_device_mode_names().front();
- CPPUNIT_ASSERT_EQUAL(string("Mode 1"), modename);
+ CPPUNIT_ASSERT_EQUAL(string("Default"), modename);
boost::shared_ptr<CustomDeviceMode> mode =
masterDeviceNames->custom_device_mode_by_name(modename);
@@ -72,7 +72,7 @@ MidnamTest::protools_patchfile_test()
boost::shared_ptr<PatchBank> bank = banks1.front();
CPPUNIT_ASSERT_EQUAL(string("Piano"), bank->name());
- const PatchBank::PatchNameList& plist1 = bank->patch_name_list();
+ const PatchNameList& plist1 = bank->patch_name_list();
CPPUNIT_ASSERT(plist1.size() == 110);
bank = banks2.front();
@@ -84,7 +84,7 @@ MidnamTest::protools_patchfile_test()
void
MidnamTest::yamaha_PSRS900_patchfile_test()
{
- XMLTree xmldoc(prefix + "Yamaha-PSR-S900.midnam");
+ XMLTree xmldoc(prefix + "Yamaha_PSR-S900.midnam");
boost::shared_ptr<XMLSharedNodeList> result = xmldoc.find(
"//MIDINameDocument");
CPPUNIT_ASSERT(result->size() == 1);
@@ -92,15 +92,15 @@ MidnamTest::yamaha_PSRS900_patchfile_test()
result = xmldoc.find("//ChannelNameSet");
CPPUNIT_ASSERT(result->size() == 3);
- MIDINameDocument doc(prefix + "Yamaha-PSR-S900.midnam");
+ MIDINameDocument doc(prefix + "Yamaha_PSR-S900.midnam");
CPPUNIT_ASSERT(doc.all_models().size() == 1);
CPPUNIT_ASSERT(doc.author().find("Hans Baier") == 0);
- const string model = doc.all_models().front();
+ const string model = *doc.all_models().begin();
CPPUNIT_ASSERT_EQUAL(string("PSR-S900"), model);
boost::shared_ptr<MasterDeviceNames> masterDeviceNames =
doc.master_device_names_by_model().find(model)->second;
- CPPUNIT_ASSERT_EQUAL(string("YAMAHA"), masterDeviceNames->manufacturer());
+ CPPUNIT_ASSERT_EQUAL(string("Yamaha"), masterDeviceNames->manufacturer());
const MasterDeviceNames::CustomDeviceModeNames& modes = masterDeviceNames->custom_device_mode_names();
CPPUNIT_ASSERT(masterDeviceNames->custom_device_mode_names().size() == 3);