Lines Matching +full:r +full:- +full:tile

19 	int r = func();  in test()  local
20 if (r == 0) { in test()
24 printf("FAILED: %s (at line %d)\n", name, r); in test()
34 (strncmp(js+(t).start, s, (t).end - (t).start) == 0 \
35 && strlen(s) == (t).end - (t).start)
46 int r; in test_empty() local
52 r = jsmn_parse(&p, js, strlen(js), t, 10); in test_empty()
53 check(r >= 0); in test_empty()
59 r = jsmn_parse(&p, js, strlen(js), t, 10); in test_empty()
60 check(r >= 0); in test_empty()
66 r = jsmn_parse(&p, js, strlen(js), t, 10); in test_empty()
67 check(r >= 0); in test_empty()
74 r = jsmn_parse(&p, js, strlen(js), t, 10); in test_empty()
75 check(r >= 0); in test_empty()
84 int r; in test_simple() local
91 r = jsmn_parse(&p, js, strlen(js), tokens, 10); in test_simple()
92 check(r >= 0); in test_simple()
103 r = jsmn_parse(&p, js, strlen(js), tokens, 10); in test_simple()
104 check(r >= 0); in test_simple()
108 r = jsmn_parse(&p, js, strlen(js), tokens, 10); in test_simple()
109 check(r >= 0); in test_simple()
116 int r; in test_primitive() local
122 r = jsmn_parse(&p, js, strlen(js), tok, 10); in test_primitive()
123 check(r >= 0 && tok[0].type == JSMN_STRING in test_primitive()
130 r = jsmn_parse(&p, js, strlen(js), tok, 10); in test_primitive()
131 check(r >= 0 && tok[0].type == JSMN_STRING in test_primitive()
138 r = jsmn_parse(&p, js, strlen(js), tok, 10); in test_primitive()
139 check(r >= 0 && tok[0].type == JSMN_STRING in test_primitive()
146 r = jsmn_parse(&p, js, strlen(js), tok, 10); in test_primitive()
147 check(r >= 0 && tok[0].type == JSMN_STRING in test_primitive()
154 r = jsmn_parse(&p, js, strlen(js), tok, 10); in test_primitive()
155 check(r >= 0 && tok[0].type == JSMN_STRING in test_primitive()
164 int r; in test_string() local
171 r = jsmn_parse(&p, js, strlen(js), tok, 10); in test_string()
172 check(r >= 0 && tok[0].type == JSMN_STRING in test_string()
177 js = "\"strVar\" : \"escapes: \\/\\r\\n\\t\\b\\f\\\"\\\\\""; in test_string()
179 r = jsmn_parse(&p, js, strlen(js), tok, 10); in test_string()
180 check(r >= 0 && tok[0].type == JSMN_STRING in test_string()
183 check(TOKEN_STRING(js, tok[1], "escapes: \\/\\r\\n\\t\\b\\f\\\"\\\\")); in test_string()
187 r = jsmn_parse(&p, js, strlen(js), tok, 10); in test_string()
188 check(r >= 0 && tok[0].type == JSMN_STRING in test_string()
197 int r; in test_partial_string() local
204 r = jsmn_parse(&p, js, strlen(js), tok, 10); in test_partial_string()
205 check(r == JSMN_ERROR_PART && tok[0].type == JSMN_STRING); in test_partial_string()
211 r = jsmn_parse(&p, js_slash, sizeof(js_slash), tok, 10); in test_partial_string()
212 check(r == JSMN_ERROR_PART); in test_partial_string()
216 r = jsmn_parse(&p, js_unicode, sizeof(js_unicode), tok, 10); in test_partial_string()
217 check(r == JSMN_ERROR_PART); in test_partial_string()
220 r = jsmn_parse(&p, js, strlen(js), tok, 10); in test_partial_string()
221 check(r == JSMN_ERROR_PART && tok[0].type == JSMN_STRING); in test_partial_string()
226 r = jsmn_parse(&p, js, strlen(js), tok, 10); in test_partial_string()
227 check(r >= 0 && tok[0].type == JSMN_STRING in test_partial_string()
233 r = jsmn_parse(&p, js, strlen(js), tok, 10); in test_partial_string()
234 check(r >= 0 && tok[0].type == JSMN_STRING in test_partial_string()
247 int r; in test_unquoted_keys() local
255 r = jsmn_parse(&p, js, strlen(js), tok, 10); in test_unquoted_keys()
256 check(r >= 0 && tok[0].type == JSMN_PRIMITIVE in test_unquoted_keys()
268 int r; in test_partial_array() local
275 r = jsmn_parse(&p, js, strlen(js), tok, 10); in test_partial_array()
276 check(r == JSMN_ERROR_PART && tok[0].type == JSMN_ARRAY in test_partial_array()
280 r = jsmn_parse(&p, js, strlen(js), tok, 10); in test_partial_array()
281 check(r == JSMN_ERROR_PART && tok[0].type == JSMN_ARRAY in test_partial_array()
286 r = jsmn_parse(&p, js, strlen(js), tok, 10); in test_partial_array()
287 check(r == JSMN_ERROR_PART && tok[0].type == JSMN_ARRAY in test_partial_array()
295 r = jsmn_parse(&p, js, strlen(js), tok, 10); in test_partial_array()
296 check(r >= 0 && tok[0].type == JSMN_ARRAY in test_partial_array()
307 int r; in test_array_nomem() local
318 r = jsmn_parse(&p, js, strlen(js), toksmall, i); in test_array_nomem()
319 check(r == JSMN_ERROR_NOMEM); in test_array_nomem()
323 r = jsmn_parse(&p, js, strlen(js), toklarge, 10); in test_array_nomem()
324 check(r >= 0); in test_array_nomem()
333 int r; in test_objects_arrays() local
340 r = jsmn_parse(&p, js, strlen(js), tokens, 10); in test_objects_arrays()
341 check(r == JSMN_ERROR_INVAL); in test_objects_arrays()
345 r = jsmn_parse(&p, js, strlen(js), tokens, 10); in test_objects_arrays()
346 check(r >= 0); in test_objects_arrays()
350 r = jsmn_parse(&p, js, strlen(js), tokens, 10); in test_objects_arrays()
351 check(r == JSMN_ERROR_INVAL); in test_objects_arrays()
355 r = jsmn_parse(&p, js, strlen(js), tokens, 10); in test_objects_arrays()
356 check(r >= 0); in test_objects_arrays()
362 int r; in test_issue_22() local
368 "\"name\":\"Calque de Tile 1\", \"opacity\":1, \"type\":\"tilelayer\", " in test_issue_22()
376 r = jsmn_parse(&p, js, strlen(js), tokens, 128); in test_issue_22()
377 check(r >= 0); in test_issue_22()
381 printf("%.*s\n", tokens[i].end - tokens[i].start, js + tokens[i].start); in test_issue_22()
399 int r; in test_unicode_characters() local
402 r = jsmn_parse(&p, js, strlen(js), tokens, 10); in test_unicode_characters()
403 check(r >= 0); in test_unicode_characters()
407 r = jsmn_parse(&p, js, strlen(js), tokens, 10); in test_unicode_characters()
408 check(r >= 0); in test_unicode_characters()
412 r = jsmn_parse(&p, js, strlen(js), tokens, 10); in test_unicode_characters()
413 check(r >= 0); in test_unicode_characters()
417 r = jsmn_parse(&p, js, strlen(js), tokens, 10); in test_unicode_characters()
418 check(r == JSMN_ERROR_INVAL); in test_unicode_characters()
422 r = jsmn_parse(&p, js, strlen(js), tokens, 10); in test_unicode_characters()
423 check(r == JSMN_ERROR_INVAL); in test_unicode_characters()
427 r = jsmn_parse(&p, js, strlen(js), tokens, 10); in test_unicode_characters()
428 check(r == JSMN_ERROR_INVAL); in test_unicode_characters()
432 r = jsmn_parse(&p, js, strlen(js), tokens, 10); in test_unicode_characters()
433 check(r >= 0); in test_unicode_characters()
440 int r; in test_input_length() local
447 r = jsmn_parse(&p, js, 8, tokens, 10); in test_input_length()
448 check(r == 3); in test_input_length()
505 int r; in test_keyvalue() local
512 r = jsmn_parse(&p, js, strlen(js), tokens, 10); in test_keyvalue()
513 check(r == 5); in test_keyvalue()
520 r = jsmn_parse(&p, js, strlen(js), tokens, 10); in test_keyvalue()
521 check(r == JSMN_ERROR_INVAL); in test_keyvalue()
525 r = jsmn_parse(&p, js, strlen(js), tokens, 10); in test_keyvalue()
526 check(r == JSMN_ERROR_INVAL); in test_keyvalue()
530 r = jsmn_parse(&p, js, strlen(js), tokens, 10); in test_keyvalue()
531 check(r == JSMN_ERROR_INVAL); in test_keyvalue()
535 r = jsmn_parse(&p, js, strlen(js), tokens, 10); in test_keyvalue()
536 check(r == JSMN_ERROR_INVAL); in test_keyvalue()
541 r = jsmn_parse(&p, js, strlen(js), tokens, 10); in test_keyvalue()
542 check(r == JSMN_ERROR_INVAL); in test_keyvalue()
546 /** A huge redefinition of everything to include jsmn in non-script mode */
570 int r; in test_nonstrict() local
577 r = jsmn_parse(&p, js, 4, tokens, 10); in test_nonstrict()
578 check(r == 2); in test_nonstrict()
584 r = jsmn_parse(&p, js, strlen(js), tokens, 10); in test_nonstrict()
585 check(r == 6); in test_nonstrict()
600 test(test_input_length, "test strings that are not null-terminated"); in main()
603 test(test_nonstrict, "test for non-strict mode"); in main()