tst_utf8: Fix one of the overlong sequences to be what we meant

C0 to DF take one continuation byte; E0 to EF take two.

It's invalid UTF-8 anyway, but at least this is what the test row meant:
overlong sequence with 3 bytes of what should have been two.

This updates the comment to match the character that we were actually
testing.

Change-Id: I85a8bd6da2c44f52b4e3fffd14a75df2600487aa
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
bb10
Thiago Macieira 2017-02-27 21:58:17 -08:00 committed by Edward Welbourne
parent 9c7ef72c87
commit fe2ab724de
1 changed files with 2 additions and 2 deletions

View File

@ -85,10 +85,10 @@ void loadInvalidUtf8Rows()
// overlong 6: xxxx:xxz0 xz00:0000 xz00:0000 xz00:0000 xz00:0001 xz00:0001
QTest::newRow("overlong-1-6") << QByteArray("\xFC\x80\x80\x80\x81\x81");
// NBSP: U+00A0: 10 00 0000
// U+0080: 10 00 0000
// proper encoding: xxz0:0010 xz00:0000
// overlong 3: xxxz:0000 xz00:0010 xz00:0000
QTest::newRow("overlong-2-3") << QByteArray("\xC0\x82\x80");
QTest::newRow("overlong-2-3") << QByteArray("\xE0\x82\x80");
// overlong 4: xxxx:z000 xz00:0000 xz00:0010 xz00:0000
QTest::newRow("overlong-2-4") << QByteArray("\xF0\x80\x82\x80");
// overlong 5: xxxx:xz00 xz00:0000 xz00:0000 xz00:0010 xz00:0000