summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2016-03-23 23:02:09 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2016-03-29 22:43:33 +0200
commite584e1b0343542e08ba834307dab8aa3a745d0cf (patch)
tree555da38c379e0dc853475110dc910e0cae94d712
parent9d49d51a85f86f516427e337e77a60bf8bd8edf1 (diff)
Fix tests.
-rw-r--r--test/engine.cc3
-rw-r--r--test/memcheckertest.cc13
2 files changed, 9 insertions, 7 deletions
diff --git a/test/engine.cc b/test/engine.cc
index 86f4f4d..89c0158 100644
--- a/test/engine.cc
+++ b/test/engine.cc
@@ -40,9 +40,10 @@ public:
void tearDown() {}
void loading() {
+ Settings settings;
AudioOutputEngine *oe = NULL;
AudioInputEngine *ie = NULL;
- DrumGizmo dg(oe, ie);
+ DrumGizmo dg(settings, oe, ie);
dg.setFrameSize(100);
// Switch kits emmidiately with giving the loader time to work:
diff --git a/test/memcheckertest.cc b/test/memcheckertest.cc
index 3a02372..e312ca7 100644
--- a/test/memcheckertest.cc
+++ b/test/memcheckertest.cc
@@ -52,6 +52,7 @@ class MemCheckerTest
CPPUNIT_TEST(check_free_ram);
CPPUNIT_TEST_SUITE_END();
private:
+ Settings settings;
DrumKit kit;
const std::string small_kit_path = "kit/small_kit.xml";
@@ -70,8 +71,8 @@ public:
void small_drumkit()
{
// load the small kit
- DrumKitParser parser(small_kit_path, kit);
- CPPUNIT_ASSERT(!parser.parse());
+ DrumKitParser parser(settings, kit);
+ CPPUNIT_ASSERT(!parser.parseFile(small_kit_path));
// check if the memchecker thinks it fits into memory
CPPUNIT_ASSERT(enoughFreeMemory(kit));
@@ -80,8 +81,8 @@ public:
void huge_drumkit()
{
// load the huge kit
- DrumKitParser parser(huge_kit_path, kit);
- CPPUNIT_ASSERT(!parser.parse());
+ DrumKitParser parser(settings, kit);
+ CPPUNIT_ASSERT(!parser.parseFile(huge_kit_path));
// check if the memchecker thinks it doesn't fit into memory
CPPUNIT_ASSERT(!enoughFreeMemory(kit));
@@ -94,8 +95,8 @@ public:
CPPUNIT_ASSERT_EQUAL(bytes_per_channel, calcBytesPerChannel(audiofile));
// load the huge kit
- DrumKitParser parser(huge_kit_path, kit);
- CPPUNIT_ASSERT(!parser.parse());
+ DrumKitParser parser(settings, kit);
+ CPPUNIT_ASSERT(!parser.parseFile(huge_kit_path));
// check if the protected method of the memchecker reports the correct size
uint64_t needed_memory = 71478290000;