Branch Coverage

blib/lib/Image/ExifTool/Protobuf.pm
Criterion Covered Total %
branch 77 116 66.3


line true false branch
43 81 57497 if $pos + $n > length $$dataPt
58 31 39545 unless defined $buff
64 32803 8419 unless ord $buff & 128
66 0 8419 unless defined $buff
68 6741 1678 unless ord $buff & 128
69 1 1677 if ++$i > 32
85 6 22836 unless defined $val
90 12535 10301 if ($type == 0) { }
380 9921 elsif ($type == 1) { }
4153 5768 elsif ($type == 2) { }
20 5748 elsif ($type == 3) { }
74 5674 elsif ($type == 4) { }
5547 127 elsif ($type == 5) { }
96 3656 497 if ($len) { }
108 11129 11707 wantarray ? :
120 207 11506 unless defined &ReadRecord($dirInfo)
121 1538 9968 if $dirInfo->{'Pos'} == length $$pt
143 1 1538 unless ($prefix)
145 1 0 unless defined $et->{'ProtoPrefix'}{$dirName}
149 1539 0 $tagTbl->{'TAG_PREFIX'} ? :
154 1539 11129 if $pos >= $dirEnd
156 0 11129 unless defined $buff
157 0 11129 if ($type == 2 and $buff =~ /\.proto$/)
164 1630 9499 if ($tagInfo) { }
165 51 8 if $type != 2 and $tagInfo->{'Unknown'} and not $unknown
167 9007 492 unless $type == 2 or $unknown
171 2027 36 if ($type == 2 and $tagInfo->{'Unknown'})
172 1175 852 if ($tagInfo->{'IsProtobuf'}) { }
372 625 elsif (not defined $tagInfo->{'IsProtobuf'} and $buff =~ /[^\x20-\x7e]/ and &IsProtobuf(\$buff)) { }
173 9 1166 unless &IsProtobuf(\$buff)
179 489 1538 unless $tagInfo->{'IsProtobuf'} or $unknown
183 21 1561 if ($tagInfo->{'Format'}) { }
0 1561 elsif ($type == 0) { }
0 1561 elsif ($type == 1) { }
1561 0 elsif ($type == 2) { }
0 0 elsif ($type == 5) { }
184 3 18 if ($type == 0) { }
0 18 elsif ($type == 2 and $tagInfo->{'Format'} eq 'rational') { }
186 0 3 if ($tagInfo->{'Format'} eq 'signed') { }
0 6 elsif ($tagInfo->{'Format'} eq 'int64s' and $val >= $int64sMin) { }
187 0 0 if ($val > $intMax) { }
189 0 0 $dirInfo->{'Bit0'} ? :
192 0 0 $val & 1 ? :
205 0 0 defined $num && $den ? :
212 0 0 if ($val >= $int64sMin) { }
217 0 0 if ($val > $intMax) { }
218 0 0 $dirInfo->{'Bit0'} ? :
220 0 0 $val & 1 ? :
227 0 1561 if ($tagInfo->{'SubDirectory'}) { }
1538 23 elsif ($tagInfo->{'IsProtobuf'}) { }
244 23 0 if (defined $num)
246 0 23 if $denom and $dir{'Pos'} == length $buff
248 23 0 if (not $buff =~ /[^\r\n\t\x20-\x7e]/) { }
0 0 elsif (length($buff) % 4) { }
257 0 23 if $rat
261 0 0 if ord substr($buff, 3, 1) & 128
267 3 41 $type == 0 ? :
278 0 1539 unless $prefix or $dirInfo->{'Pos'} == $dirEnd