mirror of
https://github.com/taglib/taglib.git
synced 2025-06-04 01:28:21 -04:00
Add a test case for the return value of setProperties()
This commit is contained in:
parent
4140c5f2eb
commit
9eb0f2941f
@ -24,6 +24,7 @@ class TestFLAC : public CppUnit::TestFixture
|
||||
CPPUNIT_TEST(testRepeatedSave);
|
||||
CPPUNIT_TEST(testSaveMultipleValues);
|
||||
CPPUNIT_TEST(testDict);
|
||||
CPPUNIT_TEST(testInvalid);
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
|
||||
public:
|
||||
@ -231,6 +232,17 @@ public:
|
||||
CPPUNIT_ASSERT_EQUAL(String("artöst 2"), dict["ARTIST"][1]);
|
||||
}
|
||||
|
||||
void testInvalid()
|
||||
{
|
||||
ScopedFileCopy copy("silence-44-s", ".flac");
|
||||
PropertyMap map;
|
||||
map["HÄÖ"] = String("bla");
|
||||
FLAC::File f(copy.fileName().c_str());
|
||||
PropertyMap invalid = f.setProperties(map);
|
||||
CPPUNIT_ASSERT_EQUAL(uint(1), invalid.size());
|
||||
CPPUNIT_ASSERT_EQUAL(uint(0), f.properties().size());
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
CPPUNIT_TEST_SUITE_REGISTRATION(TestFLAC);
|
||||
|
Loading…
x
Reference in New Issue
Block a user