#include <tstringlist.h>
#include <tbytevectorlist.h>
#include <apefile.h>
+#include <apetag.h>
+#include <apeitem.h>
+#include <tpropertymap.h>
#include "utils.h"
using namespace std;
CPPUNIT_TEST(testProperties399);
CPPUNIT_TEST(testProperties396);
CPPUNIT_TEST(testProperties390);
+ CPPUNIT_TEST(testPropertyinterface);
CPPUNIT_TEST_SUITE_END();
public:
CPPUNIT_ASSERT_EQUAL(44100, f.audioProperties()->sampleRate());
}
+ void testPropertyinterface()
+ {
+ APE::Tag tag;
+ APE::Item item1 = APE::Item("TRACK", "17");
+ tag.setItem("TRACK", item1);
+
+ APE::Item item2 = APE::Item();
+ item2.setType(APE::Item::Binary);
+ tag.setItem("TESTBINARY", item2);
+
+ PropertyMap properties = tag.properties();
+ CPPUNIT_ASSERT_EQUAL(1u, properties.unsupportedData().size());
+ CPPUNIT_ASSERT(properties.contains("TRACKNUMBER"));
+ CPPUNIT_ASSERT(!properties.contains("TRACK"));
+ CPPUNIT_ASSERT(tag.itemListMap().contains("TESTBINARY"));
+
+ tag.removeUnsupportedProperties(properties.unsupportedData());
+ CPPUNIT_ASSERT(!tag.itemListMap().contains("TESTBINARY"));
+
+ }
+
};
CPPUNIT_TEST_SUITE_REGISTRATION(TestAPE);