]> granicus.if.org Git - taglib/commitdiff
Backport a test from taglib2 branch.
authorTsuda Kageyu <tsuda.kageyu@gmail.com>
Fri, 28 Oct 2016 06:19:35 +0000 (15:19 +0900)
committerTsuda Kageyu <tsuda.kageyu@gmail.com>
Fri, 28 Oct 2016 06:19:35 +0000 (15:19 +0900)
tests/test_string.cpp

index 3fa28b69760ef500eb953a93beec60593c217b1c..f9f1a2dd8fb56a7a28e8e309ad91b1f5cbcb099b 100644 (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");