mirror of
https://github.com/taglib/taglib.git
synced 2025-07-23 07:24:30 -04:00
Added some tests for fuzzed APE files.
This commit is contained in:
BIN
tests/data/longloop.ape
Normal file
BIN
tests/data/longloop.ape
Normal file
Binary file not shown.
BIN
tests/data/zerodiv.ape
Normal file
BIN
tests/data/zerodiv.ape
Normal file
Binary file not shown.
@ -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);
|
||||
|
Reference in New Issue
Block a user