Condition Coverage

blib/lib/Compression/Util.pm
Criterion Covered Total %
condition 208 327 63.6


and 3 conditions

line !l l&&!r l&&r condition
304 98 149 29 $size % 8 == 0 and ($$buffer // "") eq ""
317 5057 379 146 $size % 8 == 0 and ($$buffer // "") eq ""
426 12558 6051 2438 $bit eq 1 and $prev_bit eq 1
585 3693 1291 2916 ($low >> 30 & 1) == 1 and ($high >> 30 & 1) == 0
667 3640 1265 2840 ($low >> 30 & 1) == 1 and ($high >> 30 & 1) == 0
767 3754 1238 2854 ($low >> 30 & 1) == 1 and ($high >> 30 & 1) == 0
827 0 40027 4992 $cf->[$j] <= $ss and $ss < $$cf[$j + 1]
849 3665 1160 2743 ($low >> 30 & 1) == 1 and ($high >> 30 & 1) == 0
888 36286 2 450934 $curr_value == $prev_value and defined $max_run ? $result[-1][1] < $max_run : 1
1127 18 87 440312 $run < $max_run and $i <= $end
105 3173 437139 $run < $max_run and $i <= $end and $symbols->[$i] == $prev
1203 33769 4268 876 $c < 0 and not $has_negative
1518 229 1 0 defined $alphabet and ref $alphabet eq ""
1594 104 44225 67965 $i <= $end and $symbols->[$i] == 0
1626 107 17337 7142 $i <= $end and $k == 0 || $k == 1
2049 556 158 6186 @LENGTH_SYMBOLS and $LENGTH_SYMBOLS[-1][0] >= $max_len
2305 100 930 28446 $la + $n <= $end and $$symbols[$la + $n - 1] == $$symbols[$p + $n - 1]
1030 0 28446 $la + $n <= $end and $$symbols[$la + $n - 1] == $$symbols[$p + $n - 1] and $n <= $max_len
2427 169 89978 686664 $la + $n <= $end and $symbols[$la + $n - 1] == $symbols[$p + $n - 1]
90147 9 686655 $la + $n <= $end and $symbols[$la + $n - 1] == $symbols[$p + $n - 1] and $n <= $max_len
2542 2391 0 374 exists $table{$lookahead} and $la - $table{$lookahead} <= $max_dist
2547 4 370 3218 $la + $n <= $end and $$symbols[$la + $n - 1] == $$symbols[$p + $n - 1]
374 0 3218 $la + $n <= $end and $$symbols[$la + $n - 1] == $$symbols[$p + $n - 1] and $n <= $max_len
2605 15127 0 10518 exists $table{$lookahead} and $la - $table{$lookahead} <= $max_dist
2610 32 10479 131523 $la + $n <= $end and $symbols[$la + $n - 1] == $symbols[$p + $n - 1]
10511 7 131516 $la + $n <= $end and $symbols[$la + $n - 1] == $symbols[$p + $n - 1] and $n <= $max_len
2660 124 4321 11215 $i <= $literals_end and defined $literals->[$i]
2898 26 3575 5515 $i <= $literals_end and defined $literals->[$i]
3301 0 0 26 bytes2int($fh, 2) == 16986 and getc $fh eq "h"
3375 0 0 1109 $clen > 0 and $clen <= $MaxHuffmanBits
3507 807 396 251 $v == 0 and $run >= 3
3516 152 17 82 $run >= 3 and $run < 11
3658 0 54 90 scalar @CL_code_lenghts > 4 and $CL_code_lenghts[-1] == 0
4449 26 3568 5577 $i <= $literals_end and defined $literals->[$i]

or 2 conditions

line l !l condition
214 168282 0 $$bitstring // ""
223 89466 0 $$bitstring // ""
304 177 1 $$buffer // ""
310 3627 0 $$buffer // ""
317 524 1 $$buffer // ""
323 28855 0 $$buffer // ""
540 1630 0 $freq->{$i} // (next)
556 75 4 &max(@$symbols) // 0
635 1808 720 getc $fh // 1
644 79 0 &max(keys %$freq) // 0
651 4984 0 $table[$ss] // (last)
670 10578 704 getc $fh // 1
676 2446 394 getc $fh // 1
819 3232 2112 getc $fh // 1
852 9041 1257 getc $fh // 1
858 2199 544 getc $fh // 1
1212 4897 2482 $has_zero ||= 1
1303 964 34 &sum(map({$_->[1];} @$rl)) // 0
1477 177 13 $alphabet->[-1] // -1
1743 0 0 &max(@$alphabet) // 0
1781 66 0 &max(keys %$freq) // 0
1785 745 41410 $freq->{$k} // 0
1879 10823 223 $node->[0] // (return $h)
1892 1138 78 &max(@$code_lengths) // 0
1987 402 72 &max(keys %$dict) // 0
2078 90 7 &max(@$distances) // 0
2079 90 7 &max(@$lengths) // 0
2080 90 7 &max(grep({defined $_;} @$literals)) // -1
2665 4321 124 $lengths->[$i] // 0
2686 4321 124 $distances->[$i] // 0
2903 3575 26 $lengths->[$i] // 0
2924 3575 26 $distances->[$i] // 0
2999 224 30 &max(@$distances) // 0
3184 12 0 &max(keys %$dict) // 0
3489 102 6 &max(keys %$dict) // 0
4471 3568 26 $distances->[$i] // (last)

or 3 conditions

line l !l&&r !l&&!r condition
215 22115 0 0 getc $fh // confess("can't read bit")
224 14388 0 0 getc $fh // confess("can't read bit")
232 1005 0 0 read($fh, my $data, $bits_len >> 3) // confess("Read error: $!")
236 512 0 0 getc $fh // confess("can't read bits")
248 1 0 0 read($fh, my $data, $bits_len >> 3) // confess("Read error: $!")
252 0 0 0 getc $fh // confess("can't read bits")
339 66 0 0 getc $fh // confess("can't read character")
1501 190 0 0 getc $fh // confess("error")
1624 6667 2124 35721 $k == 0 or $k == 1
1626 10983 4812 8684 $k == 0 || $k == 1
2282 0 153 0 $params{'min_len'} // $LZ_MIN_LEN
2283 0 153 0 $params{'max_len'} // $LZ_MAX_LEN
2284 0 153 0 $params{'max_dist'} // $LZ_MAX_DIST
2285 0 153 0 $params{'max_chain_len'} // $LZ_MAX_CHAIN_LEN
2372 389 0 0 $lengths->[$i] // confess("bad input")
2373 389 0 0 $distances->[$i] // confess("bad input")
2403 4 125 0 $params{'min_len'} // $LZ_MIN_LEN
2404 4 125 0 $params{'max_len'} // $LZ_MAX_LEN
2405 4 125 0 $params{'max_dist'} // $LZ_MAX_DIST
2406 0 129 0 $params{'max_chain_len'} // $LZ_MAX_CHAIN_LEN
2494 3797 0 0 $lengths->[$i] // confess("bad input")
2495 3797 0 0 $distances->[$i] // confess("bad input")
2498 3620 0 0 substr($data, $data_len - $dist, $length) // confess("bad input")
2505 2532 0 0 substr($data, $data_len + $i - $dist - 1, 1) // confess("bad input")
2528 0 19 0 $params{'min_len'} // $LZ_MIN_LEN
2529 0 19 0 $params{'max_len'} // $LZ_MAX_LEN
2530 0 19 0 $params{'max_dist'} // $LZ_MAX_DIST
2592 0 85 0 $params{'min_len'} // $LZ_MIN_LEN
2593 0 85 0 $params{'max_len'} // $LZ_MAX_LEN
2594 0 85 0 $params{'max_dist'} // $LZ_MAX_DIST
2706 3899 0 0 shift @match_symbols // confess("bad input")
2713 324 0 0 shift @len_symbols // confess("bad input")
2726 620 0 0 shift @match_symbols // confess("bad input")
2732 3899 0 0 shift @dist_symbols // confess("bad input")
2735 3728 0 0 substr($data, $data_len - $dist, $match_len) // confess("bad input")
2742 2510 0 0 substr($data, $data_len + $i - $dist - 1, 1) // confess("bad input")
2764 546 0 0 shift @match_symbols // confess("bad input")
2771 146 0 0 shift @len_symbols // confess("bad input")
2784 38 0 0 shift @match_symbols // confess("bad input")
2790 546 0 0 shift @dist_symbols // confess("bad input")
2941 28 0 0 fibonacci_decode($fh)->[0] // confess("decompression error")
2943 28 0 0 read($fh, my $block, $block_size) // confess("Read error: $!")
3886 4 0 0 read($in_fh, my $chunk, $len) // confess("Read error: $!")
4137 49 0 0 getc $in_fh // confess("error")
49 0 0 getc $in_fh // confess("error")
4143 49 0 0 getc $in_fh // confess("error")
4144 49 0 0 getc $in_fh // confess("error")
4145 196 0 0 getc $in_fh // confess("error")
4146 49 0 0 getc $in_fh // confess("error")
4147 49 0 0 getc $in_fh // confess("error")
4179 0 0 0 read($in_fh, my $extra_field_data, $size) // confess("can't read extra field data: $!")