mirror of
https://github.com/taglib/taglib.git
synced 2025-05-27 21:20:26 -04:00
Add a test about handing "COMMENT" and "DESCIPRION" fields in XiphComment.
This commit is contained in:
parent
ba5137bf2d
commit
8f147034d6
@ -17,6 +17,7 @@ class TestXiphComment : public CppUnit::TestFixture
|
||||
CPPUNIT_TEST(testSetYear);
|
||||
CPPUNIT_TEST(testTrack);
|
||||
CPPUNIT_TEST(testSetTrack);
|
||||
CPPUNIT_TEST(testSetComment);
|
||||
CPPUNIT_TEST(testInvalidKeys);
|
||||
CPPUNIT_TEST(testClearComment);
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
@ -63,6 +64,16 @@ public:
|
||||
CPPUNIT_ASSERT_EQUAL(String("3"), cmt.fieldListMap()["TRACKNUMBER"].front());
|
||||
}
|
||||
|
||||
void testSetComment()
|
||||
{
|
||||
Ogg::XiphComment cmt;
|
||||
cmt.addField("DESCRIPTION", "Test Comment 1");
|
||||
cmt.addField("COMMENT", "Test Comment 2");
|
||||
cmt.setComment("Test Comment 3");
|
||||
CPPUNIT_ASSERT(cmt.fieldListMap()["DESCRIPTION"].isEmpty());
|
||||
CPPUNIT_ASSERT_EQUAL(String("Test Comment 3"), cmt.fieldListMap()["COMMENT"].front());
|
||||
}
|
||||
|
||||
void testInvalidKeys()
|
||||
{
|
||||
PropertyMap map;
|
||||
|
Loading…
Reference in New Issue
Block a user