From a06ac0793379358eb8095a859b617c85f166c15e Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Wed, 23 Mar 2016 23:02:09 +0100 Subject: Fix tests. --- test/memcheckertest.cc | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'test/memcheckertest.cc') diff --git a/test/memcheckertest.cc b/test/memcheckertest.cc index d43a2e7..df5ca99 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; -- cgit v1.2.3