summaryrefslogtreecommitdiff
path: root/test/audiocachefiletest.cc
diff options
context:
space:
mode:
authorAndré Nusser <andre.nusser@googlemail.com>2017-01-15 21:22:12 +0100
committerAndré Nusser <andre.nusser@googlemail.com>2017-01-15 21:22:12 +0100
commitb502c26edcfae7a1ed8df928eb450d67223b7b0f (patch)
treed55455013a68d72250233cc8d6294c5d6d6c81b8 /test/audiocachefiletest.cc
parent25bf0872b6e3a28f93d222823b09e86549ea36d9 (diff)
Make all the tests use the drumkit_creator functions.
Diffstat (limited to 'test/audiocachefiletest.cc')
-rw-r--r--test/audiocachefiletest.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/test/audiocachefiletest.cc b/test/audiocachefiletest.cc
index b14ae28..7ae2f95 100644
--- a/test/audiocachefiletest.cc
+++ b/test/audiocachefiletest.cc
@@ -31,6 +31,8 @@
#include <audiocachefile.h>
#include <audiofile.h>
+#include "drumkit_creator.h"
+
class TestableAudioCacheFiles
: public AudioCacheFiles
{
@@ -65,8 +67,11 @@ public:
void refTest()
{
+ // Create the audio file
+ auto filename = drumkit_creator::createSingleChannelWav("single_channel.wav");
+
+ // Conduct tests
TestableAudioCacheFiles audiofiles;
- std::string filename = "kit/ride-single-channel.wav";
CPPUNIT_ASSERT_EQUAL(-1, audiofiles.getRef(filename));
audiofiles.getFile(filename);
@@ -86,7 +91,10 @@ public:
{
printf("Test buffer size: %d samples\n", (int)buffer_size);
- std::string filename = "kit/ride-multi-channel.wav";
+ // Create the audio file
+ auto filename = drumkit_creator::createMultiChannelWav("multi_channel.wav");
+
+ // Conduct tests
AudioFile* ref_file[13];
for(size_t c = 0; c < 13; ++c)
{