Branch Coverage

blib/lib/PDF/Builder/Basic/PDF/Filter/LZWDecode.pm
Criterion Covered Total %
branch 54 78 69.2


line true false branch
40 0 2 if ($self->{'DecodeParms'} and $self->{'DecodeParms'}{'EarlyChange'})
49 0 29520 unless defined $code
51 0 29520 unless ($early_change)
52 0 0 if ($self->{'next_code'} == 1 << $self->{'code_length'} and $self->{'code_length'} < 12)
58 13 29507 if ($code == $self->{'clear_table'}) { }
6 29501 elsif ($code == $self->{'eod_marker'}) { }
1087 28414 elsif ($code > $self->{'eod_marker'}) { }
76 29501 0 if ($early_change)
77 25 29476 if ($self->{'next_code'} == 1 << $self->{'code_length'} and $self->{'code_length'} < 12)
86 2 4 if ($self->_predictor_type == 2)
104 2 4 if ($self->_predictor_type == 2)
112 1590 29495 if (exists $self->{'table'}{$seen . $char})
123 7 29488 if ($self->{'at_max_code'})
134 5 1 if ($padding > 0)
159 29495 0 if ($self->{'at_max_code'} == 0)
164 32 29463 if ($self->{'next_code'} >= $self->{'next_increase'})
165 25 7 if ($self->{'code_length'} < $self->{'max_code_length'}) { }
178 0 29520 unless (defined $code)
180 0 29520 if ($code > 2 ** $self->{'code_length'})
186 119717 210974 if ($code >> $bit & 1) { }
200 6 29514 unless (defined $partial_bits)
201 6 29514 unless (defined $partial_code)
204 0 41339 unless length $$data_ref
219 4 0 if ($self->{'DecodeParms'} and $self->{'DecodeParms'}{'Predictor'})
221 4 0 if ($predictor == 1 or $predictor == 2) { }
0 0 elsif ($predictor == 3) { }
235 0 2 $param->{'Alpha'} ? :
237 0 2 $param->{'BitsPerComponent'} ? :
238 1 1 $param->{'Colors'} ? :
239 2 0 $param->{'Columns'} ? :
240 2 0 $param->{'Rows'} ? :
245 2 0 if ($bpc == 8)
264 0 3 $param->{'Alpha'} ? :
266 0 3 $param->{'BitsPerComponent'} ? :
267 1 2 $param->{'Colors'} ? :
268 3 0 $param->{'Columns'} ? :
269 3 0 $param->{'Rows'} ? :
274 3 0 if ($bpc == 8)
280 7 71 if ($data[$count] < 0)