mirror of
https://github.com/taglib/taglib.git
synced 2025-07-14 02:54:27 -04:00
Add some test cases for invalid UTF-8 sequences.
This commit is contained in:
@ -354,6 +354,12 @@ public:
|
||||
CPPUNIT_ASSERT(String(ByteVector("\xF8\x80\x80\x80\x80"), String::UTF8).isEmpty());
|
||||
CPPUNIT_ASSERT(String(ByteVector("\xFC\x80\x80\x80\x80\x80"), String::UTF8).isEmpty());
|
||||
|
||||
CPPUNIT_ASSERT(String(ByteVector("\xC2"), String::UTF8).isEmpty());
|
||||
CPPUNIT_ASSERT(String(ByteVector("\xE0\x80"), String::UTF8).isEmpty());
|
||||
CPPUNIT_ASSERT(String(ByteVector("\xF0\x80\x80"), String::UTF8).isEmpty());
|
||||
CPPUNIT_ASSERT(String(ByteVector("\xF8\x80\x80\x80"), String::UTF8).isEmpty());
|
||||
CPPUNIT_ASSERT(String(ByteVector("\xFC\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());
|
||||
|
Reference in New Issue
Block a user