diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2019-03-14 15:02:40 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2019-03-14 17:21:50 (GMT) |
commit | bba2b1c89b32030289623cd9f5cc68d7c40ab0bb (patch) | |
tree | 5f6a50ab31d3f0f2dd94a3e6c8abb6d075d80d25 /Tests/CMakeLib | |
parent | e58e38f2fbd31fd1527c19c2a33151a6c23ff22f (diff) | |
download | CMake-bba2b1c89b32030289623cd9f5cc68d7c40ab0bb.zip CMake-bba2b1c89b32030289623cd9f5cc68d7c40ab0bb.tar.gz CMake-bba2b1c89b32030289623cd9f5cc68d7c40ab0bb.tar.bz2 |
testUTF8: comment why sequences are invalid
Diffstat (limited to 'Tests/CMakeLib')
-rw-r--r-- | Tests/CMakeLib/testUTF8.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Tests/CMakeLib/testUTF8.cxx b/Tests/CMakeLib/testUTF8.cxx index c99c46d..eb37c7e 100644 --- a/Tests/CMakeLib/testUTF8.cxx +++ b/Tests/CMakeLib/testUTF8.cxx @@ -30,8 +30,12 @@ static test_utf8_entry const good_entry[] = { }; static test_utf8_char const bad_chars[] = { - "\x80\x00\x00\x00", "\xC0\x00\x00\x00", "\xE0\x00\x00\x00", - "\xE0\x80\x80\x00", "\xF0\x80\x80\x80", { 0, 0, 0, 0, 0 } + "\x80\x00\x00\x00", /* Leading continuation byte. */ + "\xC0\x00\x00\x00", /* Overlong encoding and missing continuation byte. */ + "\xE0\x00\x00\x00", /* Missing continuation bytes. */ + "\xE0\x80\x80\x00", /* Overlong encoding. */ + "\xF0\x80\x80\x80", /* Overlong encoding. */ + { 0, 0, 0, 0, 0 } }; static void report_good(bool passed, test_utf8_char const c) |