mirror of
https://github.com/taglib/taglib.git
synced 2025-06-04 01:28:21 -04:00
Add some tests for M4V files.
This commit is contained in:
parent
d1ceffd1f0
commit
59088096e6
BIN
tests/data/blank_video.m4v
Normal file
BIN
tests/data/blank_video.m4v
Normal file
Binary file not shown.
@ -153,6 +153,11 @@ public:
|
||||
fileRefSave("no-tags", ".3g2");
|
||||
}
|
||||
|
||||
void testMP4_4()
|
||||
{
|
||||
fileRefSave("blank_video", ".m4v");
|
||||
}
|
||||
|
||||
void testWav()
|
||||
{
|
||||
fileRefSave("empty", ".wav");
|
||||
|
@ -17,6 +17,7 @@ class TestMP4 : public CppUnit::TestFixture
|
||||
CPPUNIT_TEST_SUITE(TestMP4);
|
||||
CPPUNIT_TEST(testPropertiesAAC);
|
||||
CPPUNIT_TEST(testPropertiesALAC);
|
||||
CPPUNIT_TEST(testPropertiesM4V);
|
||||
CPPUNIT_TEST(testFreeForm);
|
||||
CPPUNIT_TEST(testCheckValid);
|
||||
CPPUNIT_TEST(testHasTag);
|
||||
@ -64,6 +65,21 @@ public:
|
||||
CPPUNIT_ASSERT_EQUAL(MP4::Properties::ALAC, f.audioProperties()->codec());
|
||||
}
|
||||
|
||||
void testPropertiesM4V()
|
||||
{
|
||||
MP4::File f(TEST_FILE_PATH_C("blank_video.m4v"));
|
||||
CPPUNIT_ASSERT(f.audioProperties());
|
||||
CPPUNIT_ASSERT_EQUAL(0, f.audioProperties()->length());
|
||||
CPPUNIT_ASSERT_EQUAL(0, f.audioProperties()->lengthInSeconds());
|
||||
CPPUNIT_ASSERT_EQUAL(975, f.audioProperties()->lengthInMilliseconds());
|
||||
CPPUNIT_ASSERT_EQUAL(96, f.audioProperties()->bitrate());
|
||||
CPPUNIT_ASSERT_EQUAL(2, f.audioProperties()->channels());
|
||||
CPPUNIT_ASSERT_EQUAL(44100, f.audioProperties()->sampleRate());
|
||||
CPPUNIT_ASSERT_EQUAL(16, f.audioProperties()->bitsPerSample());
|
||||
CPPUNIT_ASSERT_EQUAL(false, f.audioProperties()->isEncrypted());
|
||||
CPPUNIT_ASSERT_EQUAL(MP4::Properties::AAC, f.audioProperties()->codec());
|
||||
}
|
||||
|
||||
void testCheckValid()
|
||||
{
|
||||
MP4::File f(TEST_FILE_PATH_C("empty.aiff"));
|
||||
|
Loading…
x
Reference in New Issue
Block a user