Skip to content

Commit 6694c99

Browse files
author
Lars Klein
committed
Add test case for low surrogate handling
1 parent ed73d7b commit 6694c99

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/unittest/readertest.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -944,6 +944,9 @@ TEST(Reader, ParseString_Error) {
944944
TEST_STRING_ERROR(kParseErrorStringUnicodeSurrogateInvalid, "[\"\\uD800X\"]", 2u, 8u);
945945
TEST_STRING_ERROR(kParseErrorStringUnicodeSurrogateInvalid, "[\"\\uD800\\uFFFF\"]", 2u, 14u);
946946

947+
// Single low surrogate pair in string is invalid.
948+
TEST_STRING_ERROR(kParseErrorStringUnicodeSurrogateInvalid, "[\"\\udc4d\"]", 2u, 8u);
949+
947950
// Missing a closing quotation mark in string.
948951
TEST_STRING_ERROR(kParseErrorStringMissQuotationMark, "[\"Test]", 7u, 7u);
949952

0 commit comments

Comments
 (0)