mirror of
https://github.com/taglib/taglib.git
synced 2025-07-18 21:14:23 -04:00
Added FLAC::Properties::signature()
BUG:160172 git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@1148630 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
This commit is contained in:
@ -37,6 +37,7 @@ class TestByteVector : public CppUnit::TestFixture
|
||||
CPPUNIT_TEST(testFind2);
|
||||
CPPUNIT_TEST(testRfind1);
|
||||
CPPUNIT_TEST(testRfind2);
|
||||
CPPUNIT_TEST(testToHex);
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
|
||||
public:
|
||||
@ -173,6 +174,13 @@ public:
|
||||
CPPUNIT_ASSERT_EQUAL(10, r4.rfind("OggS", 12));
|
||||
}
|
||||
|
||||
void testToHex()
|
||||
{
|
||||
ByteVector v("\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f", 16);
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(ByteVector("f0e1d2c3b4a5968778695a4b3c2d1e0f"), v.toHex());
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
CPPUNIT_TEST_SUITE_REGISTRATION(TestByteVector);
|
||||
|
@ -13,11 +13,18 @@ using namespace TagLib;
|
||||
class TestFLAC : public CppUnit::TestFixture
|
||||
{
|
||||
CPPUNIT_TEST_SUITE(TestFLAC);
|
||||
CPPUNIT_TEST(testSignature);
|
||||
CPPUNIT_TEST(testMultipleCommentBlocks);
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
|
||||
public:
|
||||
|
||||
void testSignature()
|
||||
{
|
||||
FLAC::File f("data/no-tags.flac");
|
||||
CPPUNIT_ASSERT_EQUAL(ByteVector("a1b141f766e9849ac3db1030a20a3c77"), f.audioProperties()->signature().toHex());
|
||||
}
|
||||
|
||||
void testMultipleCommentBlocks()
|
||||
{
|
||||
ScopedFileCopy copy("multiple-vc", ".flac");
|
||||
|
Reference in New Issue
Block a user