Condition Coverage

blib/lib/Compression/Util.pm
Criterion Covered Total %
condition 222 347 63.9


and 3 conditions

line !l l&&!r l&&r condition
304 98 149 29 $size % 8 == 0 and ($$buffer // "") eq ""
317 5062 371 154 $size % 8 == 0 and ($$buffer // "") eq ""
426 12540 6027 2436 $bit eq 1 and $prev_bit eq 1
585 3699 1285 2915 ($low >> 30 & 1) == 1 and ($high >> 30 & 1) == 0
667 3645 1260 2843 ($low >> 30 & 1) == 1 and ($high >> 30 & 1) == 0
767 3767 1225 2849 ($low >> 30 & 1) == 1 and ($high >> 30 & 1) == 0
827 0 40334 4992 $cf->[$j] <= $ss and $ss < $$cf[$j + 1]
849 3678 1147 2742 ($low >> 30 & 1) == 1 and ($high >> 30 & 1) == 0
888 36778 2 450628 $curr_value == $prev_value and defined $max_run ? $result[-1][1] < $max_run : 1
1143 18 86 440287 $run < $max_run and $i <= $end
104 3164 437123 $run < $max_run and $i <= $end and $symbols->[$i] == $prev
1219 34172 4330 876 $c < 0 and not $has_negative
1534 229 1 0 defined $alphabet and ref $alphabet eq ""
1610 104 44221 67969 $i <= $end and $symbols->[$i] == 0
1642 107 17345 7142 $i <= $end and $k == 0 || $k == 1
1934 0 0 12835 defined $length and $length > 0
1956 0 0 12835 defined $length and $length != 0
1993 7026 5364 24854 $l < $n and $heap->[$l][1] < $heap->[$s][1]
1994 8378 16585 12281 $r < $n and $heap->[$r][1] < $heap->[$s][1]
2018 78 425 145 @heap == 1 and not ref $heap[0][0]
2117 556 158 6186 @LENGTH_SYMBOLS and $LENGTH_SYMBOLS[-1][0] >= $max_len
2373 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
2495 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
2610 2391 0 374 exists $table{$lookahead} and $la - $table{$lookahead} <= $max_dist
2615 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
2673 15127 0 10518 exists $table{$lookahead} and $la - $table{$lookahead} <= $max_dist
2678 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
2728 124 4321 11215 $i <= $literals_end and defined $literals->[$i]
2966 26 3575 5515 $i <= $literals_end and defined $literals->[$i]
3369 0 0 26 bytes2int($fh, 2) == 16986 and getc $fh eq "h"
3443 0 0 1125 $clen > 0 and $clen <= $MaxHuffmanBits
3575 834 396 251 $v == 0 and $run >= 3
3584 152 17 82 $run >= 3 and $run < 11
3726 0 54 84 scalar @CL_code_lenghts > 4 and $CL_code_lenghts[-1] == 0
4517 26 3568 5577 $i <= $literals_end and defined $literals->[$i]

or 2 conditions

line l !l condition
214 168638 0 $$bitstring // ""
223 89521 0 $$bitstring // ""
304 177 1 $$buffer // ""
310 3627 0 $$buffer // ""
317 524 1 $$buffer // ""
323 28807 0 $$buffer // ""
540 1650 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 10607 698 getc $fh // 1
676 2449 394 getc $fh // 1
819 3232 2112 getc $fh // 1
852 9105 1220 getc $fh // 1
858 2167 575 getc $fh // 1
1228 4830 2487 $has_zero ||= 1
1319 964 34 &sum(map({$_->[1];} @$rl)) // 0
1493 177 13 $alphabet->[-1] // -1
1759 0 0 &max(@$alphabet) // 0
1797 66 0 &max(keys %$freq) // 0
1801 753 41406 $freq->{$k} // 0
1883 15892 7337 $node->{$bit} //= {}
1908 10911 223 $node->[0] // (return $h)
1928 1063 153 &max(map({$_->[1];} @code_lengths)) // 0
2055 402 72 &max(keys %$dict) // 0
2146 90 7 &max(@$distances) // 0
2147 90 7 &max(@$lengths) // 0
2148 90 7 &max(grep({defined $_;} @$literals)) // -1
2733 4321 124 $lengths->[$i] // 0
2754 4321 124 $distances->[$i] // 0
2971 3575 26 $lengths->[$i] // 0
2992 3575 26 $distances->[$i] // 0
3067 224 30 &max(@$distances) // 0
3252 12 0 &max(keys %$dict) // 0
3557 102 6 &max(keys %$dict) // 0
4539 3568 26 $distances->[$i] // (last)

or 3 conditions

line l !l&&r !l&&!r condition
215 22156 0 0 getc $fh // confess("can't read bit")
224 14390 0 0 getc $fh // confess("can't read bit")
232 1005 0 0 read($fh, my $data, $bits_len >> 3) // confess("Read error: $!")
236 517 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")
1517 190 0 0 getc $fh // confess("error")
1640 6671 2124 35713 $k == 0 or $k == 1
1642 10987 4812 8688 $k == 0 || $k == 1
2350 0 153 0 $params{'min_len'} // $LZ_MIN_LEN
2351 0 153 0 $params{'max_len'} // $LZ_MAX_LEN
2352 0 153 0 $params{'max_dist'} // $LZ_MAX_DIST
2353 0 153 0 $params{'max_chain_len'} // $LZ_MAX_CHAIN_LEN
2440 389 0 0 $lengths->[$i] // confess("bad input")
2441 389 0 0 $distances->[$i] // confess("bad input")
2471 4 125 0 $params{'min_len'} // $LZ_MIN_LEN
2472 4 125 0 $params{'max_len'} // $LZ_MAX_LEN
2473 4 125 0 $params{'max_dist'} // $LZ_MAX_DIST
2474 0 129 0 $params{'max_chain_len'} // $LZ_MAX_CHAIN_LEN
2562 3797 0 0 $lengths->[$i] // confess("bad input")
2563 3797 0 0 $distances->[$i] // confess("bad input")
2566 3620 0 0 substr($data, $data_len - $dist, $length) // confess("bad input")
2572 140 0 0 substr($data, $data_len - $dist, $dist) // confess("bad input")
2574 140 0 0 substr($pattern x $full_reps, 0, $length) // confess("bad input")
2596 0 19 0 $params{'min_len'} // $LZ_MIN_LEN
2597 0 19 0 $params{'max_len'} // $LZ_MAX_LEN
2598 0 19 0 $params{'max_dist'} // $LZ_MAX_DIST
2660 0 85 0 $params{'min_len'} // $LZ_MIN_LEN
2661 0 85 0 $params{'max_len'} // $LZ_MAX_LEN
2662 0 85 0 $params{'max_dist'} // $LZ_MAX_DIST
2774 3899 0 0 shift @match_symbols // confess("bad input")
2781 324 0 0 shift @len_symbols // confess("bad input")
2794 620 0 0 shift @match_symbols // confess("bad input")
2800 3899 0 0 shift @dist_symbols // confess("bad input")
2803 3728 0 0 substr($data, $data_len - $dist, $match_len) // confess("bad input")
2810 2510 0 0 substr($data, $data_len + $i - $dist - 1, 1) // confess("bad input")
2832 546 0 0 shift @match_symbols // confess("bad input")
2839 146 0 0 shift @len_symbols // confess("bad input")
2852 38 0 0 shift @match_symbols // confess("bad input")
2858 546 0 0 shift @dist_symbols // confess("bad input")
3009 28 0 0 fibonacci_decode($fh)->[0] // confess("decompression error")
3011 28 0 0 read($fh, my $block, $block_size) // confess("Read error: $!")
3954 4 0 0 read($in_fh, my $chunk, $len) // confess("Read error: $!")
4205 49 0 0 getc $in_fh // confess("error")
49 0 0 getc $in_fh // confess("error")
4211 49 0 0 getc $in_fh // confess("error")
4212 49 0 0 getc $in_fh // confess("error")
4213 196 0 0 getc $in_fh // confess("error")
4214 49 0 0 getc $in_fh // confess("error")
4215 49 0 0 getc $in_fh // confess("error")
4247 0 0 0 read($in_fh, my $extra_field_data, $size) // confess("can't read extra field data: $!")