mirror of
https://github.com/taglib/taglib.git
synced 2025-05-27 21:20:26 -04:00
More tests for WavPack audio properties
git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@1201478 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
This commit is contained in:
parent
56343767ce
commit
d21d8f9f3c
@ -12,15 +12,27 @@ using namespace TagLib;
|
||||
class TestWavPack : public CppUnit::TestFixture
|
||||
{
|
||||
CPPUNIT_TEST_SUITE(TestWavPack);
|
||||
CPPUNIT_TEST(testBasic);
|
||||
CPPUNIT_TEST(testLengthScan);
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
|
||||
public:
|
||||
|
||||
void testBasic()
|
||||
{
|
||||
WavPack::File f("data/no_length.wv");
|
||||
WavPack::Properties *props = f.audioProperties();
|
||||
CPPUNIT_ASSERT_EQUAL(44100, props->sampleRate());
|
||||
CPPUNIT_ASSERT_EQUAL(2, props->channels());
|
||||
CPPUNIT_ASSERT_EQUAL(1, props->bitrate());
|
||||
CPPUNIT_ASSERT_EQUAL(0x407, props->version());
|
||||
}
|
||||
|
||||
void testLengthScan()
|
||||
{
|
||||
WavPack::File f("data/no_length.wv");
|
||||
CPPUNIT_ASSERT_EQUAL(4, f.audioProperties()->length());
|
||||
WavPack::Properties *props = f.audioProperties();
|
||||
CPPUNIT_ASSERT_EQUAL(4, props->length());
|
||||
}
|
||||
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user