CPPUNIT_TEST(testUpdateID3v2);
CPPUNIT_TEST(testEmptyID3v2);
CPPUNIT_TEST(testStripTags);
+ CPPUNIT_TEST(testRemoveXiphField);
CPPUNIT_TEST_SUITE_END();
public:
}
}
+ void testRemoveXiphField()
+ {
+ ScopedFileCopy copy("silence-44-s", ".flac");
+
+ {
+ FLAC::File f(copy.fileName().c_str());
+ f.xiphComment(true)->setTitle("XiphComment Title");
+ f.ID3v2Tag(true)->setTitle("ID3v2 Title");
+ f.save();
+ }
+ {
+ FLAC::File f(copy.fileName().c_str());
+ CPPUNIT_ASSERT_EQUAL(String("XiphComment Title"), f.xiphComment()->title());
+ f.xiphComment()->removeFields("TITLE");
+ f.save();
+ }
+ {
+ FLAC::File f(copy.fileName().c_str());
+ CPPUNIT_ASSERT_EQUAL(String(), f.xiphComment()->title());
+ }
+ }
+
};
CPPUNIT_TEST_SUITE_REGISTRATION(TestFLAC);