From: Tsuda Kageyu Date: Mon, 30 Jan 2017 03:56:53 +0000 (+0900) Subject: Add a few more test cases for invalid UTF-8 sequences. X-Git-Tag: v1.12-beta-1~70 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2c7ac6d6a9df1f6cead3a7b362e107490d7a4031;p=taglib Add a few more test cases for invalid UTF-8 sequences. --- diff --git a/tests/test_string.cpp b/tests/test_string.cpp index 0ade0113..1bd29ff5 100644 --- a/tests/test_string.cpp +++ b/tests/test_string.cpp @@ -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()); } };