From c3131d05a6db72c1ddefb1ad4c95ddbc604d1fa6 Mon Sep 17 00:00:00 2001 From: pt300 Date: Sun, 2 Oct 2016 10:37:29 +0200 Subject: [PATCH] Changed unmatched bracket tests --- test/tests.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/test/tests.c b/test/tests.c index 4247035..d5f0c53 100644 --- a/test/tests.c +++ b/test/tests.c @@ -369,12 +369,10 @@ int test_unmatched_brackets(void) { check(parse(js, JSMN_ERROR_INVAL, 3)); js = "\"key {1\": 1234"; check(parse(js, 2, 2, - JSMN_PRIMITIVE, "\"key {1\"", + JSMN_STRING, "key {1", 1, JSMN_PRIMITIVE, "1234")); - js = "\"key 1\": {1234}"; - check(parse(js, JSMN_ERROR_INVAL, 3)); - js = "{\"key 1\"}: 1234"; - check(parse(js, JSMN_ERROR_INVAL, 3)); + js = "{{\"key 1\": 1234}"; + check(parse(js, JSMN_ERROR_PART, 4)); return 0; }