aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_pcm_all.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-10-16 21:55:00 +0200
committerMax Kellermann <max@duempel.org>2013-10-16 23:36:36 +0200
commit401a799a1b5de5d70a6b4c1d49235af0d5618f37 (patch)
tree503db86df98400dac818fa3bbfbe20e2055a1fa4 /test/test_pcm_all.hxx
parentba98518c69d0501e67ef707f0d718cc678851415 (diff)
downloadmpd-401a799a1b5de5d70a6b4c1d49235af0d5618f37.tar.gz
mpd-401a799a1b5de5d70a6b4c1d49235af0d5618f37.tar.xz
mpd-401a799a1b5de5d70a6b4c1d49235af0d5618f37.zip
test: use the CPPUNIT framework for unit tests
Diffstat (limited to 'test/test_pcm_all.hxx')
-rw-r--r--test/test_pcm_all.hxx150
1 files changed, 94 insertions, 56 deletions
diff --git a/test/test_pcm_all.hxx b/test/test_pcm_all.hxx
index 18202454b..2a0aa8628 100644
--- a/test/test_pcm_all.hxx
+++ b/test/test_pcm_all.hxx
@@ -20,61 +20,99 @@
#ifndef MPD_TEST_PCM_ALL_HXX
#define MPD_TEST_PCM_ALL_HXX
-void
-test_pcm_dither_24();
-
-void
-test_pcm_dither_32();
-
-void
-test_pcm_pack_24();
-
-void
-test_pcm_unpack_24();
-
-void
-test_pcm_channels_16();
-
-void
-test_pcm_channels_32();
-
-void
-test_pcm_volume_8();
-
-void
-test_pcm_volume_16();
-
-void
-test_pcm_volume_24();
-
-void
-test_pcm_volume_32();
-
-void
-test_pcm_volume_float();
-
-void
-test_pcm_format_8_to_16();
-
-void
-test_pcm_format_16_to_24();
-
-void
-test_pcm_format_16_to_32();
-
-void
-test_pcm_format_float();
-
-void
-test_pcm_mix_8();
-
-void
-test_pcm_mix_16();
-
-void
-test_pcm_mix_24();
-
-void
-test_pcm_mix_32();
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+class PcmDitherTest : public CppUnit::TestFixture {
+ CPPUNIT_TEST_SUITE(PcmDitherTest);
+ CPPUNIT_TEST(TestDither24);
+ CPPUNIT_TEST(TestDither32);
+ CPPUNIT_TEST_SUITE_END();
+
+public:
+ void TestDither24();
+ void TestDither32();
+};
+
+CPPUNIT_TEST_SUITE_REGISTRATION(PcmDitherTest);
+
+class PcmPackTest : public CppUnit::TestFixture {
+ CPPUNIT_TEST_SUITE(PcmPackTest);
+ CPPUNIT_TEST(TestPack24);
+ CPPUNIT_TEST(TestUnpack24);
+ CPPUNIT_TEST_SUITE_END();
+
+public:
+ void TestPack24();
+ void TestUnpack24();
+};
+
+CPPUNIT_TEST_SUITE_REGISTRATION(PcmPackTest);
+
+class PcmChannelsTest : public CppUnit::TestFixture {
+ CPPUNIT_TEST_SUITE(PcmChannelsTest);
+ CPPUNIT_TEST(TestChannels16);
+ CPPUNIT_TEST(TestChannels32);
+ CPPUNIT_TEST_SUITE_END();
+
+public:
+ void TestChannels16();
+ void TestChannels32();
+};
+
+CPPUNIT_TEST_SUITE_REGISTRATION(PcmChannelsTest);
+
+class PcmVolumeTest : public CppUnit::TestFixture {
+ CPPUNIT_TEST_SUITE(PcmVolumeTest);
+ CPPUNIT_TEST(TestVolume8);
+ CPPUNIT_TEST(TestVolume16);
+ CPPUNIT_TEST(TestVolume24);
+ CPPUNIT_TEST(TestVolume32);
+ CPPUNIT_TEST(TestVolumeFloat);
+ CPPUNIT_TEST_SUITE_END();
+
+public:
+ void TestVolume8();
+ void TestVolume16();
+ void TestVolume24();
+ void TestVolume32();
+ void TestVolumeFloat();
+};
+
+CPPUNIT_TEST_SUITE_REGISTRATION(PcmVolumeTest);
+
+class PcmFormatTest : public CppUnit::TestFixture {
+ CPPUNIT_TEST_SUITE(PcmFormatTest);
+ CPPUNIT_TEST(TestFormat8to16);
+ CPPUNIT_TEST(TestFormat16to24);
+ CPPUNIT_TEST(TestFormat16to32);
+ CPPUNIT_TEST(TestFormatFloat);
+ CPPUNIT_TEST_SUITE_END();
+
+public:
+ void TestFormat8to16();
+ void TestFormat16to24();
+ void TestFormat16to32();
+ void TestFormatFloat();
+};
+
+CPPUNIT_TEST_SUITE_REGISTRATION(PcmFormatTest);
+
+class PcmMixTest : public CppUnit::TestFixture {
+ CPPUNIT_TEST_SUITE(PcmMixTest);
+ CPPUNIT_TEST(TestMix8);
+ CPPUNIT_TEST(TestMix16);
+ CPPUNIT_TEST(TestMix24);
+ CPPUNIT_TEST(TestMix32);
+ CPPUNIT_TEST_SUITE_END();
+
+public:
+ void TestMix8();
+ void TestMix16();
+ void TestMix24();
+ void TestMix32();
+};
+
+CPPUNIT_TEST_SUITE_REGISTRATION(PcmMixTest);
#endif