summaryrefslogtreecommitdiff
path: root/test/dgxmlparsertest.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2018-06-17 15:26:07 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2018-08-12 11:11:44 +0200
commitbd0e48a876f25751ae7e0d025178b19d773ca00e (patch)
treea503de41fbae079d2ea8084d2d4d716482413896 /test/dgxmlparsertest.cc
parent8dd1ea54a2d2198004c82fe75b45714917b440a1 (diff)
Finished DOMLoader and fixed the broken unit-tests.
Diffstat (limited to 'test/dgxmlparsertest.cc')
-rw-r--r--test/dgxmlparsertest.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/dgxmlparsertest.cc b/test/dgxmlparsertest.cc
index 16bcbd2..30bcfa7 100644
--- a/test/dgxmlparsertest.cc
+++ b/test/dgxmlparsertest.cc
@@ -43,7 +43,7 @@ public:
{
ScopedFile scoped_file(
"<?xml version='1.0' encoding='UTF-8'?>\n" \
- "<instrument version=\"2.0\" name=\"Snare\">\n" \
+ "<instrument version=\"2.0\" name=\"Snare\" description=\"A nice snare\">\n" \
" <channels>\n" \
" <channel name=\"AmbLeft\" main=\"true\"/>\n" \
" <channel name=\"AmbRight\" main=\"false\"/>\n" \
@@ -70,6 +70,8 @@ public:
DGUNIT_ASSERT(parseInstrumentFile(scoped_file.filename(), dom));
DGUNIT_ASSERT_EQUAL(std::string("Snare"), dom.name);
+ DGUNIT_ASSERT_EQUAL(std::string("2.0"), dom.version);
+ DGUNIT_ASSERT_EQUAL(std::string("A nice snare"), dom.description);
DGUNIT_ASSERT_EQUAL(std::size_t(2), dom.samples.size());
{
@@ -130,7 +132,7 @@ public:
{
ScopedFile scoped_file(
"<?xml version='1.0' encoding='UTF-8'?>\n" \
- "<drumkit name=\"CrocellKit\" description=\"my description\" samplerate=\"48000\" version=\"2.0.0\">\n" \
+ "<drumkit name=\"CrocellKit\" description=\"my description\" samplerate=\"48000\" version=\"2.0\">\n" \
" <channels>\n" \
" <channel name=\"AmbLeft\"/>\n" \
" <channel name=\"AmbRight\"/>\n" \
@@ -158,6 +160,7 @@ public:
DGUNIT_ASSERT(parseDrumkitFile(scoped_file.filename(), dom));
DGUNIT_ASSERT_EQUAL(std::string("CrocellKit"), dom.name);
+ DGUNIT_ASSERT_EQUAL(std::string("2.0"), dom.version);
DGUNIT_ASSERT_EQUAL(std::string("my description"), dom.description);
DGUNIT_ASSERT_EQUAL(48000.0, dom.samplerate);
DGUNIT_ASSERT_EQUAL(std::size_t(2), dom.instruments.size());