Skip to content

Commit

Permalink
added another test of invalid array
Browse files Browse the repository at this point in the history
  • Loading branch information
zserge committed Oct 17, 2015
1 parent e5fb875 commit f7e6dcb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ int test_object(void) {
check(parse("{\"a\": {2}}", JSMN_ERROR_INVAL, 3));
check(parse("{\"a\": {2: 3}}", JSMN_ERROR_INVAL, 3));
check(parse("{\"a\": {\"a\": 2 3}}", JSMN_ERROR_INVAL, 5));
check(parse("{\"a\"}", JSMN_ERROR_INVAL, 2));
check(parse("{\"a\": 1, \"b\"}", JSMN_ERROR_INVAL, 4));
check(parse("{\"a\",\"b\":1}", JSMN_ERROR_INVAL, 4));
check(parse("{\"a\":1,}", JSMN_ERROR_INVAL, 4));
check(parse("{\"a\":\"b\":\"c\"}", JSMN_ERROR_INVAL, 4));
check(parse("{,}", JSMN_ERROR_INVAL, 4));
#endif
return 0;
}
Expand Down

0 comments on commit f7e6dcb

Please sign in to comment.