mirror of
https://github.com/taglib/taglib.git
synced 2025-06-03 00:58:12 -04:00
parent
d248f77ab9
commit
451d23ca37
@ -760,6 +760,11 @@ MP4::Tag::setTrack(uint value)
|
||||
d->items["trkn"] = MP4::Item(value, 0);
|
||||
}
|
||||
|
||||
bool MP4::Tag::isEmpty() const
|
||||
{
|
||||
return d->items.isEmpty();
|
||||
}
|
||||
|
||||
MP4::ItemListMap &
|
||||
MP4::Tag::itemListMap()
|
||||
{
|
||||
|
@ -65,6 +65,8 @@ namespace TagLib {
|
||||
void setYear(uint value);
|
||||
void setTrack(uint value);
|
||||
|
||||
virtual bool isEmpty() const;
|
||||
|
||||
ItemListMap &itemListMap();
|
||||
|
||||
PropertyMap properties() const;
|
||||
|
@ -19,6 +19,7 @@ class TestMP4 : public CppUnit::TestFixture
|
||||
CPPUNIT_TEST(testPropertiesALAC);
|
||||
CPPUNIT_TEST(testFreeForm);
|
||||
CPPUNIT_TEST(testCheckValid);
|
||||
CPPUNIT_TEST(testIsEmpty);
|
||||
CPPUNIT_TEST(testUpdateStco);
|
||||
CPPUNIT_TEST(testSaveExisingWhenIlstIsLast);
|
||||
CPPUNIT_TEST(test64BitAtom);
|
||||
@ -62,6 +63,18 @@ public:
|
||||
CPPUNIT_ASSERT(f2.isValid());
|
||||
}
|
||||
|
||||
void testIsEmpty()
|
||||
{
|
||||
MP4::Tag t1;
|
||||
CPPUNIT_ASSERT(t1.isEmpty());
|
||||
t1.setArtist("Foo");
|
||||
CPPUNIT_ASSERT(!t1.isEmpty());
|
||||
|
||||
MP4::Tag t2;
|
||||
t2.itemListMap()["foo"] = "bar";
|
||||
CPPUNIT_ASSERT(!t2.isEmpty());
|
||||
}
|
||||
|
||||
void testUpdateStco()
|
||||
{
|
||||
ScopedFileCopy copy("no-tags", ".3g2");
|
||||
|
Loading…
x
Reference in New Issue
Block a user