|
|
|
@ -64,6 +64,7 @@ static testing_pair testing_pairs[] = { |
|
|
|
|
/* Testing UTF-8 character "𝄞", U+11D1E. */ |
|
|
|
|
{"\"\xf0\x9d\x84\x9e\"", "\"\\ud834\\udd1e\""}, |
|
|
|
|
{"\"\\ud834\\udd1e\"", "\"\\ud834\\udd1e\""}, |
|
|
|
|
{"{\"\\ud834\\udd1e\":0}", "{\"\\ud834\\udd1e\":0}"}, |
|
|
|
|
/* Testing nested empty containers. */ |
|
|
|
|
{ |
|
|
|
|
" [ [ ] , { } , [ ] ] ", "[[],{},[]]", |
|
|
|
@ -85,20 +86,31 @@ static testing_pair testing_pairs[] = { |
|
|
|
|
/* Testing plain invalid things, exercising the state machine. */ |
|
|
|
|
{"\\", NULL}, |
|
|
|
|
{"nu ll", NULL}, |
|
|
|
|
{"{\"foo\": bar}", NULL}, |
|
|
|
|
{"{\"foo\": bar\"x\"}", NULL}, |
|
|
|
|
{"fals", NULL}, |
|
|
|
|
/* Testing unterminated string. */ |
|
|
|
|
{"\"\\x", NULL}, |
|
|
|
|
/* Testing invalid UTF-16 number. */ |
|
|
|
|
{"\"\\u123x", NULL}, |
|
|
|
|
{"{\"\\u123x", NULL}, |
|
|
|
|
/* Testing imbalanced surrogate pairs. */ |
|
|
|
|
{"\"\\ud834f", NULL}, |
|
|
|
|
{"{\"\\ud834f\":0}", NULL}, |
|
|
|
|
{"\"\\ud834\\n", NULL}, |
|
|
|
|
{"{\"\\ud834\\n\":0}", NULL}, |
|
|
|
|
{"\"\\udd1ef", NULL}, |
|
|
|
|
{"{\"\\udd1ef\":0}", NULL}, |
|
|
|
|
{"\"\\ud834\\ud834\"", NULL}, |
|
|
|
|
{"{\"\\ud834\\ud834\"\":0}", NULL}, |
|
|
|
|
{"\"\\ud834\\u1234\"", NULL}, |
|
|
|
|
{"{\"\\ud834\\u1234\"\":0}", NULL}, |
|
|
|
|
{"\"\\ud834]\"", NULL}, |
|
|
|
|
{"{\"\\ud834]\"\":0}", NULL}, |
|
|
|
|
{"\"\\ud834 \"", NULL}, |
|
|
|
|
{"{\"\\ud834 \"\":0}", NULL}, |
|
|
|
|
{"\"\\ud834\\\\\"", NULL}, |
|
|
|
|
{"{\"\\ud834\\\\\"\":0}", NULL}, |
|
|
|
|
/* Testing embedded invalid whitechars. */ |
|
|
|
|
{"\"\n\"", NULL}, |
|
|
|
|
{"\"\t\"", NULL}, |
|
|
|
|