Merge branch 'master' into merge-master-to-talib2

# Conflicts:
#	taglib/asf/asfattribute.cpp
#	taglib/asf/asfpicture.cpp
#	taglib/mp4/mp4coverart.cpp
#	taglib/mp4/mp4item.cpp
#	taglib/mp4/mp4item.h
#	taglib/mpeg/id3v2/id3v2framefactory.cpp
#	taglib/toolkit/tstring.cpp
#	tests/test_string.cpp
This commit is contained in:
Tsuda Kageyu
2015-11-23 19:04:06 +09:00
21 changed files with 502 additions and 416 deletions

View File

@ -77,13 +77,18 @@ public:
void testDuplicateID3v2()
{
RIFF::AIFF::File f(TEST_FILE_PATH_C("duplicate_id3v2.aiff"));
ScopedFileCopy copy("duplicate_id3v2", ".aiff");
// duplicate_id3v2.aiff has duplicate ID3v2 tags.
// duplicate_id3v2.aiff has duplicate ID3v2 tag chunks.
// title() returns "Title2" if can't skip the second tag.
RIFF::AIFF::File f(copy.fileName().c_str());
CPPUNIT_ASSERT(f.hasID3v2Tag());
CPPUNIT_ASSERT_EQUAL(String("Title1"), f.tag()->title());
f.save();
CPPUNIT_ASSERT_EQUAL((offset_t)7030, f.length());
CPPUNIT_ASSERT_EQUAL((offset_t)-1, f.find("Title2"));
}
void testFuzzedFile1()

View File

@ -257,6 +257,12 @@ public:
String("9999999999").toInt(&ok);
CPPUNIT_ASSERT_EQUAL(ok, false);
String("2147483648").toInt(&ok);
CPPUNIT_ASSERT_EQUAL(ok, false);
String("-2147483649").toInt(&ok);
CPPUNIT_ASSERT_EQUAL(ok, false);
}
void testFromInt()