Branch Coverage

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


line true false branch
36 0 2 if ($self->{'DecodeParms'} and $self->{'DecodeParms'}{'EarlyChange'})
45 0 29558 unless defined $code
47 0 29558 unless ($early_change)
48 0 0 if ($self->{'next_code'} == 1 << $self->{'code_length'} and $self->{'code_length'} < 12)
54 13 29545 if ($code == $self->{'clear_table'}) { }
6 29539 elsif ($code == $self->{'eod_marker'}) { }
1049 28490 elsif ($code > $self->{'eod_marker'}) { }
72 29539 0 if ($early_change)
73 25 29514 if ($self->{'next_code'} == 1 << $self->{'code_length'} and $self->{'code_length'} < 12)
82 2 4 if ($self->_predictor_type == 2)
99 2 4 if ($self->_predictor_type == 2)
107 1552 29533 if (exists $self->{'table'}{$seen . $char})
118 7 29526 if ($self->{'at_max_code'})
129 5 1 if ($padding > 0)
154 29533 0 if ($self->{'at_max_code'} == 0)
159 32 29501 if ($self->{'next_code'} >= $self->{'next_increase'})
160 25 7 if ($self->{'code_length'} < $self->{'max_code_length'}) { }
173 0 29558 unless (defined $code)
175 0 29558 if ($code > 2 ** $self->{'code_length'})
181 119450 211697 if ($code >> $bit & 1) { }
195 6 29552 unless (defined $partial_bits)
196 6 29552 unless (defined $partial_code)
199 0 41396 unless length $$data_ref
214 4 0 if ($self->{'DecodeParms'} and $self->{'DecodeParms'}{'Predictor'})
216 4 0 if ($predictor == 1 or $predictor == 2) { }
0 0 elsif ($predictor == 3) { }
230 0 2 $param->{'Alpha'} ? :
232 0 2 $param->{'BitsPerComponent'} ? :
233 1 1 $param->{'Colors'} ? :
234 2 0 $param->{'Columns'} ? :
235 2 0 $param->{'Rows'} ? :
240 2 0 if ($bpc == 8)
259 0 3 $param->{'Alpha'} ? :
261 0 3 $param->{'BitsPerComponent'} ? :
262 1 2 $param->{'Colors'} ? :
263 3 0 $param->{'Columns'} ? :
264 3 0 $param->{'Rows'} ? :
269 3 0 if ($bpc == 8)
275 7 71 if ($data[$count] < 0)