test/test_pcm_all: move CPPUNIT_TEST_SUITE_REGISTRATION() to test_pcm_main.cxx
Run each unit test only once. Using CPPUNIT_TEST_SUITE_REGISTRATION from within the header meant that each unit class was registered again for each source file that includes the header.
This commit is contained in:
parent
bb6ee71f08
commit
40cce050e7
@ -34,8 +34,6 @@ public:
|
|||||||
void TestDither32();
|
void TestDither32();
|
||||||
};
|
};
|
||||||
|
|
||||||
CPPUNIT_TEST_SUITE_REGISTRATION(PcmDitherTest);
|
|
||||||
|
|
||||||
class PcmPackTest : public CppUnit::TestFixture {
|
class PcmPackTest : public CppUnit::TestFixture {
|
||||||
CPPUNIT_TEST_SUITE(PcmPackTest);
|
CPPUNIT_TEST_SUITE(PcmPackTest);
|
||||||
CPPUNIT_TEST(TestPack24);
|
CPPUNIT_TEST(TestPack24);
|
||||||
@ -47,8 +45,6 @@ public:
|
|||||||
void TestUnpack24();
|
void TestUnpack24();
|
||||||
};
|
};
|
||||||
|
|
||||||
CPPUNIT_TEST_SUITE_REGISTRATION(PcmPackTest);
|
|
||||||
|
|
||||||
class PcmChannelsTest : public CppUnit::TestFixture {
|
class PcmChannelsTest : public CppUnit::TestFixture {
|
||||||
CPPUNIT_TEST_SUITE(PcmChannelsTest);
|
CPPUNIT_TEST_SUITE(PcmChannelsTest);
|
||||||
CPPUNIT_TEST(TestChannels16);
|
CPPUNIT_TEST(TestChannels16);
|
||||||
@ -60,8 +56,6 @@ public:
|
|||||||
void TestChannels32();
|
void TestChannels32();
|
||||||
};
|
};
|
||||||
|
|
||||||
CPPUNIT_TEST_SUITE_REGISTRATION(PcmChannelsTest);
|
|
||||||
|
|
||||||
class PcmVolumeTest : public CppUnit::TestFixture {
|
class PcmVolumeTest : public CppUnit::TestFixture {
|
||||||
CPPUNIT_TEST_SUITE(PcmVolumeTest);
|
CPPUNIT_TEST_SUITE(PcmVolumeTest);
|
||||||
CPPUNIT_TEST(TestVolume8);
|
CPPUNIT_TEST(TestVolume8);
|
||||||
@ -79,8 +73,6 @@ public:
|
|||||||
void TestVolumeFloat();
|
void TestVolumeFloat();
|
||||||
};
|
};
|
||||||
|
|
||||||
CPPUNIT_TEST_SUITE_REGISTRATION(PcmVolumeTest);
|
|
||||||
|
|
||||||
class PcmFormatTest : public CppUnit::TestFixture {
|
class PcmFormatTest : public CppUnit::TestFixture {
|
||||||
CPPUNIT_TEST_SUITE(PcmFormatTest);
|
CPPUNIT_TEST_SUITE(PcmFormatTest);
|
||||||
CPPUNIT_TEST(TestFormat8to16);
|
CPPUNIT_TEST(TestFormat8to16);
|
||||||
@ -96,8 +88,6 @@ public:
|
|||||||
void TestFormatFloat();
|
void TestFormatFloat();
|
||||||
};
|
};
|
||||||
|
|
||||||
CPPUNIT_TEST_SUITE_REGISTRATION(PcmFormatTest);
|
|
||||||
|
|
||||||
class PcmMixTest : public CppUnit::TestFixture {
|
class PcmMixTest : public CppUnit::TestFixture {
|
||||||
CPPUNIT_TEST_SUITE(PcmMixTest);
|
CPPUNIT_TEST_SUITE(PcmMixTest);
|
||||||
CPPUNIT_TEST(TestMix8);
|
CPPUNIT_TEST(TestMix8);
|
||||||
@ -113,6 +103,4 @@ public:
|
|||||||
void TestMix32();
|
void TestMix32();
|
||||||
};
|
};
|
||||||
|
|
||||||
CPPUNIT_TEST_SUITE_REGISTRATION(PcmMixTest);
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -25,6 +25,13 @@
|
|||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
CPPUNIT_TEST_SUITE_REGISTRATION(PcmDitherTest);
|
||||||
|
CPPUNIT_TEST_SUITE_REGISTRATION(PcmPackTest);
|
||||||
|
CPPUNIT_TEST_SUITE_REGISTRATION(PcmChannelsTest);
|
||||||
|
CPPUNIT_TEST_SUITE_REGISTRATION(PcmVolumeTest);
|
||||||
|
CPPUNIT_TEST_SUITE_REGISTRATION(PcmFormatTest);
|
||||||
|
CPPUNIT_TEST_SUITE_REGISTRATION(PcmMixTest);
|
||||||
|
|
||||||
int
|
int
|
||||||
main(gcc_unused int argc, gcc_unused char **argv)
|
main(gcc_unused int argc, gcc_unused char **argv)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user