Add String::clear() method to clear the string.

This commit is contained in:
Tsuda Kageyu
2015-11-17 11:29:52 +09:00
parent 3128f425b8
commit 1a942627bf
3 changed files with 15 additions and 0 deletions

View File

@ -67,6 +67,10 @@ public:
CPPUNIT_ASSERT(s != L"taglib");
CPPUNIT_ASSERT(s != L"taglib string taglib");
s.clear();
CPPUNIT_ASSERT(s.isEmpty());
CPPUNIT_ASSERT(!s.isNull());
String unicode("José Carlos", String::UTF8);
CPPUNIT_ASSERT(strcmp(unicode.toCString(), "Jos\xe9 Carlos") == 0);