summaryrefslogtreecommitdiff
path: root/test/audiocachetest.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2020-09-19 15:12:08 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2020-09-19 15:14:24 +0200
commit62e577cee9e199692d15cf741c0e29ae28f25c52 (patch)
tree3cfe20ce434b986e58efbc9bececcda41502ed33 /test/audiocachetest.cc
parent19ac4649f16621430b7d34635410fd67fd8ef49e (diff)
Make use of uUnit as a submodule (dgunit renamed).
Diffstat (limited to 'test/audiocachetest.cc')
-rw-r--r--test/audiocachetest.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/test/audiocachetest.cc b/test/audiocachetest.cc
index 74c7df4..823e9c4 100644
--- a/test/audiocachetest.cc
+++ b/test/audiocachetest.cc
@@ -24,7 +24,7 @@
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-#include "dgunit.h"
+#include <uunit.h>
#include <thread>
#include <chrono>
@@ -38,15 +38,15 @@
#define FRAMESIZE 64
class AudioCacheTest
- : public DGUnit
+ : public uUnit
{
public:
AudioCacheTest()
{
- DGUNIT_TEST(AudioCacheTest::singleChannelNonThreaded);
- DGUNIT_TEST(AudioCacheTest::singleChannelThreaded);
- DGUNIT_TEST(AudioCacheTest::multiChannelNonThreaded);
- DGUNIT_TEST(AudioCacheTest::multiChannelThreaded);
+ uUNIT_TEST(AudioCacheTest::singleChannelNonThreaded);
+ uUNIT_TEST(AudioCacheTest::singleChannelThreaded);
+ uUNIT_TEST(AudioCacheTest::multiChannelNonThreaded);
+ uUNIT_TEST(AudioCacheTest::multiChannelThreaded);
}
DrumkitCreator drumkit_creator;
@@ -95,7 +95,7 @@ public:
// Test pre cache:
for(size_t i = 0; i < size; ++i)
{
- DGUNIT_ASSERT_EQUAL(audio_file_ref.data[offset], samples[i]);
+ uUNIT_ASSERT_EQUAL(audio_file_ref.data[offset], samples[i]);
++offset;
}
@@ -111,7 +111,7 @@ public:
std::this_thread::sleep_for(std::chrono::milliseconds(1));
if(--timeout == 0)
{
- DGUNIT_ASSERT(false); // timeout
+ uUNIT_ASSERT(false); // timeout
}
}
}
@@ -119,7 +119,7 @@ public:
size = framesize;
samples = audio_cache.next(id, size);
- DGUNIT_ASSERT_EQUAL(std::size_t(0), settings.number_of_underruns.load());
+ uUNIT_ASSERT_EQUAL(std::size_t(0), settings.number_of_underruns.load());
for(size_t i = 0; (i < size) && (offset < audio_file_ref.size); ++i)
{
@@ -131,7 +131,7 @@ public:
(int)(audio_file_ref.size - offset),
(int)i, (int)size, (int)(size - i));
}
- DGUNIT_ASSERT_EQUAL(audio_file_ref.data[offset], samples[i]);
+ uUNIT_ASSERT_EQUAL(audio_file_ref.data[offset], samples[i]);
++offset;
}
}