Add a few more test cases for invalid UTF-8 sequences.

This commit is contained in:
Tsuda Kageyu 2017-01-30 12:56:53 +09:00
parent 6a61f02f85
commit 2c7ac6d6a9

View File

@ -350,6 +350,9 @@ public:
CPPUNIT_ASSERT(String(ByteVector("\xFC\x80\x80\x80\x80\x80"), String::UTF8).isEmpty());
CPPUNIT_ASSERT(String('\x80', String::UTF8).isEmpty());
CPPUNIT_ASSERT(String(ByteVector("\xED\xA0\x80\xED\xB0\x80"), String::UTF8).isEmpty());
CPPUNIT_ASSERT(String(ByteVector("\xED\xB0\x80\xED\xA0\x80"), String::UTF8).isEmpty());
}
};