Backport a test from taglib2 branch.

This commit is contained in:
Tsuda Kageyu 2016-10-28 15:19:35 +09:00
parent 65a24bbc51
commit 935534aa53

View File

@ -46,6 +46,7 @@ class TestString : public CppUnit::TestFixture
CPPUNIT_TEST(testFromInt);
CPPUNIT_TEST(testSubstr);
CPPUNIT_TEST(testNewline);
CPPUNIT_TEST(testUpper);
CPPUNIT_TEST(testEncodeNonLatin1);
CPPUNIT_TEST(testEncodeEmpty);
CPPUNIT_TEST(testIterator);
@ -270,6 +271,14 @@ public:
CPPUNIT_ASSERT_EQUAL(L'\x0a', String(crlf)[4]);
}
void testUpper()
{
String s1 = "tagLIB 012 strING";
String s2 = s1.upper();
CPPUNIT_ASSERT_EQUAL(String("tagLIB 012 strING"), s1);
CPPUNIT_ASSERT_EQUAL(String("TAGLIB 012 STRING"), s2);
}
void testEncodeNonLatin1()
{
const String jpn(L"\u65E5\u672C\u8A9E");