Condition Coverage

blib/lib/JSON/JSONFold.pm
Criterion Covered Total %
condition 85 139 61.1


and 3 conditions

line !l l&&!r l&&r condition
199 0 0 19 $indent and $json->can("indent_length")
390 45 0 39 @_ == 1 && ref $_[0]
642 0 0 45 $self->[0] == $other->[0] && $self->[4] + $other->[4] <= $item_limit && $self->[0] + $self->[2] + 1 + $other->[2] <= $width_limit
820 6 0 26 $cfg->[11] > 0 && $self->[11] <= $self->[8]
838 11 9 6 $prev->[9] and $line->[9]
9 0 6 $prev->[9] and $line->[9] and $prev->can_merge($line, $self->[7], $cfg->[1])
1024 0 0 2 $fh and $fh->can("flush")
1100 32 23 35 $line->[10] and $prev->[10]
23 0 35 $line->[10] and $prev->[10] and $self->_try_pack($frame, $prev, $line)
1101 27 24 4 $line->[9] and $prev->[9]
24 0 4 $line->[9] and $prev->[9] and $self->_try_join($frame, $prev, $line)
1115 13 59 0 $frame->[13] and $line->width > $self->[2][1]
1120 9 50 8 $frame->[13] and not $frame->check_fold_limits($self->[2])
1124 50 17 0 $frame->[14] and not $line->[11]
1148 6 33 0 $frame->[13] and not $frame->check_fold_limits($self->[2])
1188 0 0 0 defined $line_sig and $line_sig eq $sig
1243 9 5 18 @{$self->[4];} and $frame->[3][0][11]

or 2 conditions

line l !l condition
25 5 0 $backend || 'JSON::PP'
43 1 18 delete $overrides{'gold'} // 1
47 19 0 ref $class || $class || __PACKAGE__
188 19 0 $BACKEND || 'JSON::PP'
190 1 18 $opt{'sort_keys'} // 1
193 0 19 $indent //= 2
401 46 0 ref $base || __PACKAGE__
408 18 1 $config // ""
609 47 122 $JSON::JSONFold::Kind::OPENING_KIND{$last} // undef
610 47 122 $JSON::JSONFold::Kind::CLOSING_KIND{$body} // undef
752 47 0 $arg{'kind'} // 0
753 47 0 $arg{'indent'} // 0
754 47 0 $arg{'depth'} // 0
755 0 47 $arg{'lines'} // []
757 47 0 $arg{'pack_limit'} // 0
758 47 0 $arg{'fold_limit'} // 0
759 47 0 $arg{'join_limit'} // 0
760 47 0 $arg{'grid_limit'} // 0
761 47 0 $arg{'grid_min_items'} // 0
1455 0 0 $JSON::JSONFold::BACKEND || '-'

or 3 conditions

line l !l&&r !l&&!r condition
45 0 19 0 delete $overrides{'json'} // _json_coder($gold, $indent, %overrides)
125 0 0 0 $width //= $overrides{'width'}
131 0 0 1 $width //= $overrides{'width'}
611 47 47 75 $opener || $closer
788 52 52 62 $line->[7] or $line->[8]
1097 4 0 13 $frame->[13] || $line->[10] || $line->[9]
1130 51 2 19 $frame->[13] or $frame->[14]
1138 4 0 35 $prev->[4] >= $frame->[5] or $prev->[6] >= $self->[2][4]
1142 4 0 35 $prev->[4] >= $frame->[7] or $prev->[6] >= $self->[2][16]
1168 0 1 0 $line_count < 2 or $line_count < $self->[2][10]
1 0 0 $line_count < 2 or $line_count < $self->[2][10] or $line_count > $self->[2][11]
1177 0 0 0 $part_count < 4 or $part_count - 2 < $frame->[9]
1258 0 3 32 not $frame->[13] or $frame->[10] != 1
3 0 32 not $frame->[13] or $frame->[10] != 1 or @{$frame->[3];} != 3
3 0 32 not $frame->[13] or $frame->[10] != 1 or @{$frame->[3];} != 3 or $frame->[1] + $frame->[4] > $self->[2][1]
1271 8 0 11 $last->[10] || $last->[9]