Lines Matching refs:check
10 check(parse("{}", 1, 1, JSMN_OBJECT, 0, 2, 0)); in test_empty()
11 check(parse("[]", 1, 1, JSMN_ARRAY, 0, 2, 0)); in test_empty()
12 check(parse("[{},{}]", 3, 3, JSMN_ARRAY, 0, 7, 2, JSMN_OBJECT, 1, 3, 0, in test_empty()
18 check(parse("{\"a\":0}", 3, 3, JSMN_OBJECT, 0, 7, 1, JSMN_STRING, "a", 1, in test_object()
20 check(parse("{\"a\":[]}", 3, 3, JSMN_OBJECT, 0, 8, 1, JSMN_STRING, "a", 1, in test_object()
22 check(parse("{\"a\":{},\"b\":{}}", 5, 5, JSMN_OBJECT, -1, -1, 2, JSMN_STRING, in test_object()
25 check(parse("{\n \"Day\": 26,\n \"Month\": 9,\n \"Year\": 12\n }", 7, 7, in test_object()
29 check(parse("{\"a\": 0, \"b\": \"c\"}", 5, 5, JSMN_OBJECT, -1, -1, 2, in test_object()
34 check(parse("{\"a\"\n0}", JSMN_ERROR_INVAL, 3)); in test_object()
35 check(parse("{\"a\", 0}", JSMN_ERROR_INVAL, 3)); in test_object()
36 check(parse("{\"a\": {2}}", JSMN_ERROR_INVAL, 3)); in test_object()
37 check(parse("{\"a\": {2: 3}}", JSMN_ERROR_INVAL, 3)); in test_object()
38 check(parse("{\"a\": {\"a\": 2 3}}", JSMN_ERROR_INVAL, 5)); in test_object()
54 check(parse("[10]", 2, 2, JSMN_ARRAY, -1, -1, 1, JSMN_PRIMITIVE, "10")); in test_array()
55 check(parse("{\"a\": 1]", JSMN_ERROR_INVAL, 3)); in test_array()
62 check(parse("{\"boolVar\" : true }", 3, 3, JSMN_OBJECT, -1, -1, 1, in test_primitive()
64 check(parse("{\"boolVar\" : false }", 3, 3, JSMN_OBJECT, -1, -1, 1, in test_primitive()
66 check(parse("{\"nullVar\" : null }", 3, 3, JSMN_OBJECT, -1, -1, 1, in test_primitive()
68 check(parse("{\"intVar\" : 12}", 3, 3, JSMN_OBJECT, -1, -1, 1, JSMN_STRING, in test_primitive()
70 check(parse("{\"floatVar\" : 12.345}", 3, 3, JSMN_OBJECT, -1, -1, 1, in test_primitive()
76 check(parse("{\"strVar\" : \"hello world\"}", 3, 3, JSMN_OBJECT, -1, -1, 1, in test_string()
78 check(parse("{\"strVar\" : \"escapes: \\/\\r\\n\\t\\b\\f\\\"\\\\\"}", 3, 3, in test_string()
81 check(parse("{\"strVar\": \"\"}", 3, 3, JSMN_OBJECT, -1, -1, 1, JSMN_STRING, in test_string()
83 check(parse("{\"a\":\"\\uAbcD\"}", 3, 3, JSMN_OBJECT, -1, -1, 1, JSMN_STRING, in test_string()
85 check(parse("{\"a\":\"str\\u0000\"}", 3, 3, JSMN_OBJECT, -1, -1, 1, in test_string()
87 check(parse("{\"a\":\"\\uFFFFstr\"}", 3, 3, JSMN_OBJECT, -1, -1, 1, in test_string()
89 check(parse("{\"a\":[\"\\u0280\"]}", 4, 4, JSMN_OBJECT, -1, -1, 1, in test_string()
93 check(parse("{\"a\":\"str\\uFFGFstr\"}", JSMN_ERROR_INVAL, 3)); in test_string()
94 check(parse("{\"a\":\"str\\u@FfF\"}", JSMN_ERROR_INVAL, 3)); in test_string()
95 check(parse("{{\"a\":[\"\\u028\"]}", JSMN_ERROR_INVAL, 4)); in test_string()
110 check(r == 5); in test_partial_string()
111 check(tokeq(js, tok, 5, JSMN_OBJECT, -1, -1, 2, JSMN_STRING, "x", 1, in test_partial_string()
115 check(r == JSMN_ERROR_PART); in test_partial_string()
133 check(r == 6); in test_partial_array()
134 check(tokeq(js, tok, 6, JSMN_ARRAY, -1, -1, 3, JSMN_PRIMITIVE, "1", in test_partial_array()
138 check(r == JSMN_ERROR_PART); in test_partial_array()
159 check(r == JSMN_ERROR_NOMEM); in test_array_nomem()
164 check(r >= 0); in test_array_nomem()
165 check(tokeq(js, toklarge, 4, JSMN_ARRAY, -1, -1, 3, JSMN_PRIMITIVE, "1", in test_array_nomem()
183 check(r >= 0); in test_unquoted_keys()
184 check(tokeq(js, tok, 4, JSMN_PRIMITIVE, "key1", JSMN_STRING, "value", 0, in test_unquoted_keys()
209 check(r >= 0); in test_issue_22()
216 check(parse(js, JSMN_ERROR_PART, 8)); in test_issue_27()
230 check(r == 3); in test_input_length()
231 check(tokeq(js, tokens, 3, JSMN_OBJECT, -1, -1, 1, JSMN_STRING, "a", 1, in test_input_length()
242 check(jsmn_parse(&p, js, strlen(js), NULL, 0) == 1); in test_count()
246 check(jsmn_parse(&p, js, strlen(js), NULL, 0) == 1); in test_count()
250 check(jsmn_parse(&p, js, strlen(js), NULL, 0) == 2); in test_count()
254 check(jsmn_parse(&p, js, strlen(js), NULL, 0) == 3); in test_count()
258 check(jsmn_parse(&p, js, strlen(js), NULL, 0) == 3); in test_count()
262 check(jsmn_parse(&p, js, strlen(js), NULL, 0) == 7); in test_count()
266 check(jsmn_parse(&p, js, strlen(js), NULL, 0) == 5); in test_count()
270 check(jsmn_parse(&p, js, strlen(js), NULL, 0) == 5); in test_count()
274 check(jsmn_parse(&p, js, strlen(js), NULL, 0) == 4); in test_count()
278 check(jsmn_parse(&p, js, strlen(js), NULL, 0) == 7); in test_count()
287 check(parse(js, 2, 2, JSMN_PRIMITIVE, "a", JSMN_PRIMITIVE, "0garbage")); in test_nonstrict()
290 check(parse(js, 6, 6, JSMN_PRIMITIVE, "Day", JSMN_PRIMITIVE, "26", in test_nonstrict()
296 check(parse(js, 2, 2, JSMN_STRING, "key {1", 1, JSMN_PRIMITIVE, "1234")); in test_nonstrict()
305 check(parse(js, JSMN_ERROR_INVAL, 2)); in test_unmatched_brackets()
307 check(parse(js, JSMN_ERROR_PART, 3)); in test_unmatched_brackets()
309 check(parse(js, JSMN_ERROR_INVAL, 3)); in test_unmatched_brackets()
311 check(parse(js, JSMN_ERROR_INVAL, 3)); in test_unmatched_brackets()
313 check(parse(js, 3, 3, JSMN_OBJECT, 0, 16, 1, JSMN_STRING, "key {1", 1, in test_unmatched_brackets()
316 check(parse(js, JSMN_ERROR_PART, 5)); in test_unmatched_brackets()
324 check(parse(js, 3, 3, JSMN_OBJECT, 0, 10, 1, JSMN_STRING, "key", 1, in test_object_key()
328 check(parse(js, JSMN_ERROR_INVAL, 3)); in test_object_key()
330 check(parse(js, JSMN_ERROR_INVAL, 3)); in test_object_key()
332 check(parse(js, JSMN_ERROR_INVAL, 5)); in test_object_key()
334 check(parse(js, JSMN_ERROR_INVAL, 5)); in test_object_key()