Branch Coverage

json-perl.c
Criterion Covered Total %
branch 204 532 38.3


line true false branch
121 0 0 FAILNUMBER (unexpected_character);
0 0 FAILNUMBER (unexpected_character);
0 0 FAILNUMBER (unexpected_character);
0 0 FAILNUMBER (unexpected_character);
0 0 FAILNUMBER (unexpected_character);
0 0 FAILNUMBER (unexpected_character);
0 0 FAILNUMBER (unexpected_character);
0 0 FAILNUMBER (unexpected_character);
0 0 FAILNUMBER (unexpected_character);
139 0 4 if (parser->top_level_value) {
0 0 if (parser->top_level_value) {
0 0 if (parser->top_level_value) {
142 2 2 FAILNUMBER (unexpected_character);
0 2 FAILNUMBER (unexpected_character);
0 0 FAILNUMBER (unexpected_character);
0 0 FAILNUMBER (unexpected_character);
0 0 FAILNUMBER (unexpected_character);
0 0 FAILNUMBER (unexpected_character);
0 0 FAILNUMBER (unexpected_character);
0 0 FAILNUMBER (unexpected_character);
0 0 FAILNUMBER (unexpected_character);
159 0 2 if (parser->top_level_value) {
0 0 if (parser->top_level_value) {
0 1 if (parser->top_level_value) {
162 0 2 FAILNUMBER (unexpected_character);
0 0 FAILNUMBER (unexpected_character);
0 0 FAILNUMBER (unexpected_character);
0 0 FAILNUMBER (unexpected_character);
0 0 FAILNUMBER (unexpected_character);
0 0 FAILNUMBER (unexpected_character);
0 1 FAILNUMBER (unexpected_character);
0 0 FAILNUMBER (unexpected_character);
0 0 FAILNUMBER (unexpected_character);
174 0 4 FAILNUMBER (unexpected_character);
0 0 FAILNUMBER (unexpected_character);
0 0 FAILNUMBER (unexpected_character);
0 0 FAILNUMBER (unexpected_character);
0 0 FAILNUMBER (unexpected_character);
0 0 FAILNUMBER (unexpected_character);
0 0 FAILNUMBER (unexpected_character);
0 0 FAILNUMBER (unexpected_character);
0 0 FAILNUMBER (unexpected_character);
181 23 4 switch (NEXTBYTE) {
0 0 switch (NEXTBYTE) {
17 1 switch (NEXTBYTE) {
186 2 2 FAILNUMBER (unexpected_character);
0 2 FAILNUMBER (unexpected_character);
0 0 FAILNUMBER (unexpected_character);
0 0 FAILNUMBER (unexpected_character);
0 0 FAILNUMBER (unexpected_character);
0 0 FAILNUMBER (unexpected_character);
0 1 FAILNUMBER (unexpected_character);
0 0 FAILNUMBER (unexpected_character);
0 0 FAILNUMBER (unexpected_character);
202 2 0 if (parser->top_level_value) {
0 0 if (parser->top_level_value) {
2 0 if (parser->top_level_value) {
205 2 0 FAILNUMBER (unexpected_character);
2 0 FAILNUMBER (unexpected_character);
2 0 FAILNUMBER (unexpected_character);
0 0 FAILNUMBER (unexpected_character);
0 0 FAILNUMBER (unexpected_character);
0 0 FAILNUMBER (unexpected_character);
2 0 FAILNUMBER (unexpected_character);
2 0 FAILNUMBER (unexpected_character);
2 0 FAILNUMBER (unexpected_character);
220 0 0 FAILNUMBER (unexpected_character);
0 0 FAILNUMBER (unexpected_character);
0 0 FAILNUMBER (unexpected_character);
0 0 FAILNUMBER (unexpected_character);
0 0 FAILNUMBER (unexpected_character);
0 0 FAILNUMBER (unexpected_character);
0 0 FAILNUMBER (unexpected_character);
0 0 FAILNUMBER (unexpected_character);
0 0 FAILNUMBER (unexpected_character);
225 6 6 switch (NEXTBYTE) {
0 0 switch (NEXTBYTE) {
5 0 switch (NEXTBYTE) {
230 0 6 FAILNUMBER (unexpected_character);
0 0 FAILNUMBER (unexpected_character);
0 0 FAILNUMBER (unexpected_character);
0 0 FAILNUMBER (unexpected_character);
0 0 FAILNUMBER (unexpected_character);
0 0 FAILNUMBER (unexpected_character);
0 0 FAILNUMBER (unexpected_character);
0 0 FAILNUMBER (unexpected_character);
0 0 FAILNUMBER (unexpected_character);
243 0 6 if (parser->top_level_value) {
0 0 if (parser->top_level_value) {
0 0 if (parser->top_level_value) {
246 0 6 FAILNUMBER (unexpected_character);
0 0 FAILNUMBER (unexpected_character);
0 0 FAILNUMBER (unexpected_character);
0 0 FAILNUMBER (unexpected_character);
0 0 FAILNUMBER (unexpected_character);
0 0 FAILNUMBER (unexpected_character);
0 0 FAILNUMBER (unexpected_character);
0 0 FAILNUMBER (unexpected_character);
0 0 FAILNUMBER (unexpected_character);
276 9 0 if (parser->end - (unsigned char *) start < INT_MAX_DIGITS + minus) {
10 0 if (parser->end - (unsigned char *) start < INT_MAX_DIGITS + minus) {
405 5 if (parser->end - (unsigned char *) start < INT_MAX_DIGITS + minus) {
277 0 9 if (minus) {
0 10 if (minus) {
0 405 if (minus) {
362 0 20 if (prefixlen > 0) {
371 0 0 if (prefixlen > BUFSIZE - MARGIN) {
386 2 13492 if (size >= BUFSIZE - MARGIN) {
388 0 2 if (STRINGEND) {
396 2 0 COPYBUFFER;
0 0 COPYBUFFER;
0 0 COPYBUFFER;
0 0 COPYBUFFER;
407 0 13494 if (c < 0x20) {
410 13494 0 else if (c >= 0x20 && c <= 0x80) {
13493 1 else if (c >= 0x20 && c <= 0x80) {
414 20 13473 if (c == '"') {
417 52 13421 if (c == '\\') {
418 52 0 HANDLE_ESCAPES (parser->end, start - 1);
52 0 HANDLE_ESCAPES (parser->end, start - 1);
32 20 HANDLE_ESCAPES (parser->end, start - 1);
0 20 HANDLE_ESCAPES (parser->end, start - 1);
0 20 HANDLE_ESCAPES (parser->end, start - 1);
6 14 HANDLE_ESCAPES (parser->end, start - 1);
0 14 HANDLE_ESCAPES (parser->end, start - 1);
3 11 HANDLE_ESCAPES (parser->end, start - 1);
11 0 HANDLE_ESCAPES (parser->end, start - 1);
446 0 20 if (STRINGEND) {
450 18 2 COPYBUFFER;
0 2 COPYBUFFER;
0 0 COPYBUFFER;
0 0 COPYBUFFER;
561 42 51 if (parser->unicode || parser->force_unicode || parser->upgrade_utf8) {
34 8 if (parser->unicode || parser->force_unicode || parser->upgrade_utf8) {
1 33 if (parser->unicode || parser->force_unicode || parser->upgrade_utf8) {
588 7 1 if (* parser->end++ == 'r') {
2 0 if (* parser->end++ == 'r') {
21 1 if (* parser->end++ == 'r') {
589 7 0 if (* parser->end++ == 'u') {
2 0 if (* parser->end++ == 'u') {
21 0 if (* parser->end++ == 'u') {
590 5 2 if (* parser->end++ == 'e') {
2 0 if (* parser->end++ == 'e') {
21 0 if (* parser->end++ == 'e') {
592 3 18 if (parser->user_true) {
595 4 14 else if (parser->copy_literals) {
620 2 0 if (* parser->end++ == 'a') {
0 0 if (* parser->end++ == 'a') {
17 0 if (* parser->end++ == 'a') {
621 2 0 if (* parser->end++ == 'l') {
0 0 if (* parser->end++ == 'l') {
17 0 if (* parser->end++ == 'l') {
622 2 0 if (* parser->end++ == 's') {
0 0 if (* parser->end++ == 's') {
17 0 if (* parser->end++ == 's') {
623 2 0 if (* parser->end++ == 'e') {
0 0 if (* parser->end++ == 'e') {
17 0 if (* parser->end++ == 'e') {
625 3 14 if (parser->user_false) {
628 4 10 else if (parser->copy_literals) {
655 3 0 if (* parser->end++ == 'u') {
0 0 if (* parser->end++ == 'u') {
10 0 if (* parser->end++ == 'u') {
656 3 0 if (* parser->end++ == 'l') {
0 0 if (* parser->end++ == 'l') {
10 0 if (* parser->end++ == 'l') {
657 3 0 if (* parser->end++ == 'l') {
0 0 if (* parser->end++ == 'l') {
10 0 if (* parser->end++ == 'l') {
659 3 7 if (parser->user_null) {
662 3 4 else if (parser->copy_literals) {
762 0 1 PARSE (array_start, XARRAY_END);
0 2 PARSE (array_start, XARRAY_END);
0 0 PARSE (array_start, XARRAY_END);
0 0 PARSE (array_start, XARRAY_END);
0 4 PARSE (array_start, XARRAY_END);
1 2 PARSE (array_start, XARRAY_END);
810 0 1 PARSE (array_next, XARRAY_END);
0 0 PARSE (array_next, XARRAY_END);
0 0 PARSE (array_next, XARRAY_END);
0 0 PARSE (array_next, XARRAY_END);
0 2 PARSE (array_next, XARRAY_END);
0 30 PARSE (array_next, XARRAY_END);
872 41 20 if (parser->unicode || parser->upgrade_utf8) {
1 40 if (parser->unicode || parser->upgrade_utf8) {
992 0 10 PARSE (hash_value, XOBJECT_END);
0 2 PARSE (hash_value, XOBJECT_END);
0 4 PARSE (hash_value, XOBJECT_END);
0 2 PARSE (hash_value, XOBJECT_END);
0 11 PARSE (hash_value, XOBJECT_END);
0 9 PARSE (hash_value, XOBJECT_END);
998 2 392 if (key.contains_escapes) {
0 24 if (key.contains_escapes) {
3 195 if (key.contains_escapes) {
1014 21 177 if (parser->detect_collisions) {
1018 3 18 if (sv_ptr) {
1059 4 9 if (parser->user_true) {
1069 4 0 if (! SvTRUE (user_true) && ! parser->no_warn_literals) {
0 4 if (! SvTRUE (user_true) && ! parser->no_warn_literals) {
0 0 if (! SvTRUE (user_true) && ! parser->no_warn_literals) {
1 3 if (! SvTRUE (user_true) && ! parser->no_warn_literals) {
1 0 if (! SvTRUE (user_true) && ! parser->no_warn_literals) {
0 1 if (! SvTRUE (user_true) && ! parser->no_warn_literals) {
1 2 if (! SvTRUE (user_true) && ! parser->no_warn_literals) {
1 0 if (! SvTRUE (user_true) && ! parser->no_warn_literals) {
1 0 if (! SvTRUE (user_true) && ! parser->no_warn_literals) {
0 1 if (! SvTRUE (user_true) && ! parser->no_warn_literals) {
0 0 if (! SvTRUE (user_true) && ! parser->no_warn_literals) {
1 0 if (! SvTRUE (user_true) && ! parser->no_warn_literals) {
1 1 if (! SvTRUE (user_true) && ! parser->no_warn_literals) {
1 0 if (! SvTRUE (user_true) && ! parser->no_warn_literals) {
1 0 if (! SvTRUE (user_true) && ! parser->no_warn_literals) {
0 1 if (! SvTRUE (user_true) && ! parser->no_warn_literals) {
0 0 if (! SvTRUE (user_true) && ! parser->no_warn_literals) {
1 0 if (! SvTRUE (user_true) && ! parser->no_warn_literals) {
0 1 if (! SvTRUE (user_true) && ! parser->no_warn_literals) {
3 0 if (! SvTRUE (user_true) && ! parser->no_warn_literals) {
1072 0 4 if (parser->copy_literals && ! parser->no_warn_literals) {
0 0 if (parser->copy_literals && ! parser->no_warn_literals) {
1082 5 9 if (parser->user_false) {
1092 5 0 if (SvTRUE (user_false) && ! parser->no_warn_literals) {
0 5 if (SvTRUE (user_false) && ! parser->no_warn_literals) {
1 4 if (SvTRUE (user_false) && ! parser->no_warn_literals) {
1 0 if (SvTRUE (user_false) && ! parser->no_warn_literals) {
0 1 if (SvTRUE (user_false) && ! parser->no_warn_literals) {
2 2 if (SvTRUE (user_false) && ! parser->no_warn_literals) {
2 0 if (SvTRUE (user_false) && ! parser->no_warn_literals) {
1 1 if (SvTRUE (user_false) && ! parser->no_warn_literals) {
0 1 if (SvTRUE (user_false) && ! parser->no_warn_literals) {
0 0 if (SvTRUE (user_false) && ! parser->no_warn_literals) {
1 1 if (SvTRUE (user_false) && ! parser->no_warn_literals) {
1 0 if (SvTRUE (user_false) && ! parser->no_warn_literals) {
1 0 if (SvTRUE (user_false) && ! parser->no_warn_literals) {
0 1 if (SvTRUE (user_false) && ! parser->no_warn_literals) {
0 0 if (SvTRUE (user_false) && ! parser->no_warn_literals) {
1 4 if (SvTRUE (user_false) && ! parser->no_warn_literals) {
1 0 if (SvTRUE (user_false) && ! parser->no_warn_literals) {
1095 0 5 if (parser->copy_literals && ! parser->no_warn_literals) {
0 0 if (parser->copy_literals && ! parser->no_warn_literals) {
1105 4 9 if (parser->user_null) {
1114 0 4 if (parser->copy_literals && ! parser->no_warn_literals) {
0 0 if (parser->copy_literals && ! parser->no_warn_literals) {
1127 0 8 if (parser->depth < 0) {
1139 3 1 if (! parser->no_warn_literals &&
3 0 if (! parser->no_warn_literals &&
1140 3 0 (parser->user_true || parser->user_false || parser->user_null)) {
0 3 (parser->user_true || parser->user_false || parser->user_null)) {
1143 4 0 parser->copy_literals = SvTRUE (onoff) ? 1 : 0;
0 4 parser->copy_literals = SvTRUE (onoff) ? 1 : 0;
0 0 parser->copy_literals = SvTRUE (onoff) ? 1 : 0;
0 4 parser->copy_literals = SvTRUE (onoff) ? 1 : 0;
0 0 parser->copy_literals = SvTRUE (onoff) ? 1 : 0;
0 0 parser->copy_literals = SvTRUE (onoff) ? 1 : 0;
0 4 parser->copy_literals = SvTRUE (onoff) ? 1 : 0;
0 0 parser->copy_literals = SvTRUE (onoff) ? 1 : 0;
0 0 parser->copy_literals = SvTRUE (onoff) ? 1 : 0;
0 0 parser->copy_literals = SvTRUE (onoff) ? 1 : 0;
0 0 parser->copy_literals = SvTRUE (onoff) ? 1 : 0;
0 0 parser->copy_literals = SvTRUE (onoff) ? 1 : 0;
4 0 parser->copy_literals = SvTRUE (onoff) ? 1 : 0;
4 0 parser->copy_literals = SvTRUE (onoff) ? 1 : 0;
2 2 parser->copy_literals = SvTRUE (onoff) ? 1 : 0;
0 2 parser->copy_literals = SvTRUE (onoff) ? 1 : 0;
0 0 parser->copy_literals = SvTRUE (onoff) ? 1 : 0;
2 2 parser->copy_literals = SvTRUE (onoff) ? 1 : 0;
0 0 parser->copy_literals = SvTRUE (onoff) ? 1 : 0;