diff options
author | Tsuda Kageyu <tsuda.kageyu@gmail.com> | 2017-01-30 12:56:53 +0900 |
---|---|---|
committer | Tsuda Kageyu <tsuda.kageyu@gmail.com> | 2017-01-30 12:56:53 +0900 |
commit | 2c7ac6d6a9df1f6cead3a7b362e107490d7a4031 (patch) | |
tree | 761b5130011b3f2e7e0cc88b7b5e74e223310433 /tests | |
parent | 6a61f02f85340cb6e9ea12a160f2ad16a9fe640e (diff) |
Add a few more test cases for invalid UTF-8 sequences.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_string.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
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()); } }; |