Merge branch 'master' into taglib2

Conflicts:
	taglib/ogg/opus/opusfile.cpp
	taglib/riff/wav/wavfile.cpp
	taglib/toolkit/tstring.h
This commit is contained in:
Lukáš Lalinský
2013-07-11 10:14:09 +02:00
30 changed files with 449 additions and 103 deletions

BIN
tests/data/no-extension Normal file

Binary file not shown.

Binary file not shown.

View File

@ -27,6 +27,7 @@ class TestFileRef : public CppUnit::TestFixture
CPPUNIT_TEST(testTrueAudio);
CPPUNIT_TEST(testAPE);
CPPUNIT_TEST(testWav);
CPPUNIT_TEST(testUnsupported);
CPPUNIT_TEST_SUITE_END();
public:
@ -172,6 +173,15 @@ public:
{
fileRefSave("mac-399", ".ape");
}
void testUnsupported()
{
FileRef f1(TEST_FILE_PATH_C("no-extension"));
CPPUNIT_ASSERT(f1.isNull());
FileRef f2(TEST_FILE_PATH_C("unsupported-extension.xxx"));
CPPUNIT_ASSERT(f2.isNull());
}
};
CPPUNIT_TEST_SUITE_REGISTRATION(TestFileRef);

View File

@ -72,6 +72,9 @@ public:
String unicode2(unicode.to8Bit(true), String::UTF8);
CPPUNIT_ASSERT(unicode == unicode2);
String unicode3(L"\u65E5\u672C\u8A9E");
CPPUNIT_ASSERT(*(unicode3.toCWString() + 1) == L'\u672C');
CPPUNIT_ASSERT(strcmp(String::number(0).toCString(), "0") == 0);
CPPUNIT_ASSERT(strcmp(String::number(12345678).toCString(), "12345678") == 0);
CPPUNIT_ASSERT(strcmp(String::number(-12345678).toCString(), "-12345678") == 0);