Add test for atom types with non-printable characters

This commit is contained in:
Stephen F. Booth
2024-05-16 09:38:16 -05:00
parent a5633cdb03
commit 3744e9979c
2 changed files with 12 additions and 0 deletions

Binary file not shown.

View File

@ -101,6 +101,7 @@ class TestMP4 : public CppUnit::TestFixture
CPPUNIT_TEST(testRemoveMetadata);
CPPUNIT_TEST(testNonFullMetaAtom);
CPPUNIT_TEST(testItemFactory);
CPPUNIT_TEST(testNonPrintableAtom);
CPPUNIT_TEST_SUITE_END();
public:
@ -847,6 +848,17 @@ public:
CPPUNIT_ASSERT_EQUAL(StringList("456"), properties.value("TESTINTEGER"));
}
}
void testNonPrintableAtom()
{
ScopedFileCopy copy("nonprintable-atom-type", ".m4a");
{
MP4::File f(copy.fileName().c_str());
CPPUNIT_ASSERT(f.isValid());
CPPUNIT_ASSERT_EQUAL(1, f.audioProperties()->channels());
CPPUNIT_ASSERT_EQUAL(32000, f.audioProperties()->sampleRate());
}
}
};
CPPUNIT_TEST_SUITE_REGISTRATION(TestMP4);