Separate tests for fuzzed WAV files.

This commit is contained in:
Tsuda Kageyu 2015-01-01 23:18:43 +09:00
parent 0d2e01df61
commit 7adea3df22

View File

@ -15,7 +15,8 @@ class TestWAV : public CppUnit::TestFixture
CPPUNIT_TEST(testLength);
CPPUNIT_TEST(testZeroSizeDataChunk);
CPPUNIT_TEST(testStripTags);
CPPUNIT_TEST(testFuzzedFiles);
CPPUNIT_TEST(testFuzzedFile1);
CPPUNIT_TEST(testFuzzedFile2);
CPPUNIT_TEST_SUITE_END();
public:
@ -70,11 +71,14 @@ public:
delete f;
}
void testFuzzedFiles()
void testFuzzedFile1()
{
RIFF::WAV::File f1(TEST_FILE_PATH_C("infloop.wav"));
CPPUNIT_ASSERT(!f1.isValid());
}
void testFuzzedFile2()
{
RIFF::WAV::File f2(TEST_FILE_PATH_C("segfault.wav"));
CPPUNIT_ASSERT(f2.isValid());
}