mirror of
https://github.com/taglib/taglib.git
synced 2025-05-27 21:20:26 -04:00
Add a (failing) test for reading ALAC audio properties
This commit is contained in:
parent
dc062a0844
commit
0a790f0017
BIN
tests/data/empty_alac.m4a
Normal file
BIN
tests/data/empty_alac.m4a
Normal file
Binary file not shown.
@ -14,7 +14,8 @@ using namespace TagLib;
|
||||
class TestMP4 : public CppUnit::TestFixture
|
||||
{
|
||||
CPPUNIT_TEST_SUITE(TestMP4);
|
||||
CPPUNIT_TEST(testProperties);
|
||||
CPPUNIT_TEST(testPropertiesAAC);
|
||||
CPPUNIT_TEST(testPropertiesALAC);
|
||||
CPPUNIT_TEST(testFreeForm);
|
||||
CPPUNIT_TEST(testCheckValid);
|
||||
CPPUNIT_TEST(testUpdateStco);
|
||||
@ -28,7 +29,7 @@ class TestMP4 : public CppUnit::TestFixture
|
||||
|
||||
public:
|
||||
|
||||
void testProperties()
|
||||
void testPropertiesAAC()
|
||||
{
|
||||
MP4::File f(TEST_FILE_PATH_C("has-tags.m4a"));
|
||||
CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->length());
|
||||
@ -38,6 +39,16 @@ public:
|
||||
CPPUNIT_ASSERT_EQUAL(16, ((MP4::Properties *)f.audioProperties())->bitsPerSample());
|
||||
}
|
||||
|
||||
void testPropertiesALAC()
|
||||
{
|
||||
MP4::File f(TEST_FILE_PATH_C("empty_alac.m4a"));
|
||||
CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->length());
|
||||
CPPUNIT_ASSERT_EQUAL(3, f.audioProperties()->bitrate());
|
||||
CPPUNIT_ASSERT_EQUAL(2, f.audioProperties()->channels());
|
||||
CPPUNIT_ASSERT_EQUAL(44100, f.audioProperties()->sampleRate());
|
||||
CPPUNIT_ASSERT_EQUAL(16, ((MP4::Properties *)f.audioProperties())->bitsPerSample());
|
||||
}
|
||||
|
||||
void testCheckValid()
|
||||
{
|
||||
MP4::File f(TEST_FILE_PATH_C("empty.aiff"));
|
||||
|
Loading…
Reference in New Issue
Block a user