Added some tests for fuzzed APE files.

This commit is contained in:
Tsuda Kageyu 2014-12-23 21:02:00 +09:00
parent 61543432c0
commit 16ac2cd240
3 changed files with 10 additions and 0 deletions

BIN
tests/data/longloop.ape Normal file

Binary file not shown.

BIN
tests/data/zerodiv.ape Normal file

Binary file not shown.

View File

@ -16,6 +16,7 @@ class TestAPE : public CppUnit::TestFixture
CPPUNIT_TEST(testProperties399);
CPPUNIT_TEST(testProperties396);
CPPUNIT_TEST(testProperties390);
CPPUNIT_TEST(testFuzzedFiles);
CPPUNIT_TEST_SUITE_END();
public:
@ -47,6 +48,15 @@ public:
CPPUNIT_ASSERT_EQUAL(44100, f.audioProperties()->sampleRate());
}
void testFuzzedFiles()
{
APE::File f1(TEST_FILE_PATH_C("longloop.ape"));
CPPUNIT_ASSERT(f1.isValid());
APE::File f2(TEST_FILE_PATH_C("zerodiv.ape"));
CPPUNIT_ASSERT(f2.isValid());
}
};
CPPUNIT_TEST_SUITE_REGISTRATION(TestAPE);