aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/json
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-03-17 16:35:21 -0700
committerGravatar Craig Tiller <ctiller@google.com>2016-03-17 16:35:21 -0700
commitcbca1a6c1292e33b3915e40b2021a33519e6bfb9 (patch)
tree58b24a067899010ef8cb3d42d9bf386588c21133 /test/core/json
parenta4134159ab7a6084ff7692d6dfb744428c0df958 (diff)
parentc90886096a4530562f22ba9708c2a6caef14cde1 (diff)
Merge branch 'what-the-fuzz' of github.com:nicolasnoble/grpc into fuzzy-bits
Diffstat (limited to 'test/core/json')
-rw-r--r--test/core/json/json_test.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/core/json/json_test.c b/test/core/json/json_test.c
index 5add80d753..035265a6be 100644
--- a/test/core/json/json_test.c
+++ b/test/core/json/json_test.c
@@ -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},