Branch Coverage

blib/lib/Image/ExifTool/Canon.pm
Criterion Covered Total %
branch 128 250 51.2


line true false branch
10124 5 0 if (not $lens =~ /x$/ and $lens =~ /(\d+)/)
10128 0 5 if abs $shortFocal - $sf * $tc > "0.9"
10129 0 5 if $tc > 1
10149 13 43 unless $et->{'TAG_EXTRA'}{'FocalPlaneXResolution'} and $et->{'TAG_EXTRA'}{'FocalPlaneYResolution'}
10152 0 43 unless $xres and $yres
10159 29 0 if ($xres[0] % 1000 == 0 and $yres[0] % 1000 == 0 and $xres[0] >= 640000 and $yres[0] >= 480000 and $xres[0] < 10000000 and $yres[0] < 10000000 and $xres[1] >= 61 and $xres[1] < 1500 and $yres[1] >= 61 and $yres[1] < 1000 and $xres[1] != $yres[1])
10185 6 24 unless $lensType eq -1 or $lensType eq 65535
10186 6 24 if ($lens) { }
0 48 elsif ($lensModel and $lensModel =~ /\d/) { }
10188 5 1 unless $$printConv{"$lensType.1"}
10199 0 4 if $Image::ExifTool::userLens{$lens}
10202 0 1 if $lensModel =~ / \+ ((EXTENDER )?RF)?(\d+(\.\d*)?)x\b/
10206 1 3 unless $lens =~ m[(\d+)(?:-(\d+))?mm.*?(?:[fF]/?)(\d+(?:\.\d+)?)(?:-(\d+(?:\.\d+)?))?]
10210 0 3 if $sf and not $lf
10211 2 1 if $sa and not $la
10213 0 3 if ($lens =~ / \+ (\d+(\.\d+)?)x$/)
10217 2 1 if abs $shortFocal - $sf * $tc > "0.9"
10219 0 1 if ($lens =~ /^(.*) \+ (RF)?(\d+(\.\d*)?)x$/) { }
0 1 elsif ($tc > 1) { }
10220 0 0 unless $3 eq $tc
10223 0 0 if @maybe and $maybe[-1] =~ /^$lns/
10224 0 0 if @likely and $likely[-1] =~ /^$lns/
10225 0 0 if @matches and $matches[-1] =~ /^$lns/
10230 0 1 if abs $longFocal - $lf * $tc > "0.9"
10232 0 1 if ($maxAperture)
10235 0 0 if $maxAperture < $sa * $tc - "0.18"
10236 0 0 if $maxAperture > $la * $tc + "0.18"
10240 1 0 if @maybe
10242 0 1 if (@user)
10244 0 0 if (@user > 1)
10248 0 0 if $Image::ExifTool::userLens{$_}
10250 0 0 unless /^(.*) \+ \d+(\.\d+)?x$/
10251 0 0 if $Image::ExifTool::userLens{$1}
10253 0 0 if @good
10260 0 0 if (@matches > 1 and $lensModel and $lensModel =~ /(\| [ACS])/)
10264 0 0 if $lens =~ /\Q$type\E/
10266 0 0 if @best
10268 0 1 unless @matches
10269 0 1 unless @matches
10271 0 0 if (@matches > 1 and $lensModel and $lensModel =~ m[(\d+(?:\.\d+)?(?:-\d+(?:\.\d+)?)?) ?mm ?f/?(\d+(?:\.\d+)?(?:-\d+(?:\.\d+)?)?)]i)
10277 0 0 unless $lens =~ m[(\d+(?:\.\d+)?(?:-\d+(?:\.\d+)?)?) ?mm ?f/?(\d+(?:\.\d+)?(?:-\d+(?:\.\d+)?)?)]i
10278 0 0 if $mm eq $1 and $fstop eq $2
10280 0 0 if @best
10284 1 0 if @matches
10287 0 0 if ($printConv eq \%Image::ExifTool::Canon::canonLensTypes) { }
10295 24 0 if ($shortFocal)
10297 24 0 if $longFocal and $longFocal != $shortFocal
10301 24 0 if $lensType eq -1 or $lensType eq 65535
10327 369 0 if $val == $dataVal
10339 0 45 if $size < 24
10341 0 45 unless $af =~ /^(1|5|7|9|15|45|53)$/
10344 0 45 unless $h1 and $w1
10347 0 45 if abs $f1 - "1.33" < "0.01" or abs $f1 - "1.67" < "0.01"
10349 0 45 if abs $f1 - "0.75" < "0.01" or abs $f1 - "0.6" < "0.01"
10352 0 45 unless $h2 and $w2
10355 0 45 if $w1 eq $h1
10357 45 0 if abs 1 - $f1 / $f2 < "0.01"
10358 0 0 if abs 1 - $f1 * $f2 < "0.01"
10369 8 4 unless $offset
10371 0 4 unless defined($raf = $et->{'RAF'})
10375 4 0 if ($raf->Seek($offset, 0) and $raf->Read($buff, 8) == 8 and $buff =~ /^\xff{4}.\0\0/s)
10381 1 3 if ($version > 20)
10385 0 4 if ($version == 1 or $version == 2) { }
4 0 elsif ($version == 3) { }
10398 0 0 if ($raf->Read($buf2, 24) == 24)
10402 0 0 if ($count and $count < 20 and $raf->Read($buf2, $count * 32) == $count * 32)
10434 4 12 if $i == 3
10435 0 12 unless $raf->Read($buf2, 4) == 4
10439 4 8 if $i == 2 and $len >= 4
10441 0 12 unless $len <= 65536 and $raf->Read($buf2, $len) == $len
10448 4 0 unless ($err)
10449 0 4 if ($et->Options("HtmlDump"))
10478 5 43 if ($inv) { }
43 0 elsif ($val != 32767) { }
10480 0 5 if (not defined $rtnVal and &Image::ExifTool::IsInt($val))
10484 0 43 if ($val & 16384) { }
10500 40 27 unless $scale
10501 0 67 if ($short == $long) { }
10532 2 65 if $verbose
10540 63 797 unless my $tagInfo = $et->GetTagInfo($tagTablePtr, $index)
10543 260 537 if ($format) { }
10544 235 25 if ($format =~ /(.*)\[(.*)\]/) { }
0 25 elsif ($format eq 'string') { }
10550 0 235 if $@
10553 0 0 $size > $pos ? :
10559 0 797 if $pos + $len > $size
10561 0 797 unless defined $val
10562 22 775 if ($verbose)
10576 1 796 if ($tagInfo->{'SubDirectory'}) { }
751 45 elsif (not $tagInfo->{'Unknown'} or $unknown) { }
10587 748 3 if $count
10588 748 3 if ($key)
10589 0 748 if $et->{'OPTIONS'}{'SaveFormat'}
10590 0 748 if $et->{'OPTIONS'}{'SaveBin'}
10612 0 0 unless length $val == 8
10631 0 0 $row eq $lastRow ? :
10633 0 0 if $focus eq $focusPt
10634 0 0 if shift @bits
10636 0 0 $focus == 255 ? :
0 0 unless $focusing
10653 27 307 if ($val < 0) { }
10662 5 329 if ($frac == 12) { }
79 250 elsif ($frac == 20) { }
10679 81 352 if ($num < 0) { }
10687 2 431 if (abs $frac - 0.33 < 0.05) { }
57 374 elsif (abs $frac - 0.67 < 0.05) { }
10710 0 4 if ($et->Options('MakerNotes') || $et->{'REQ_TAG_LOOKUP'}{'makernotecanon'} and $dirInfo->{'DirLen'} > 8)
10741 0 16 if $len < 8 or $pos + $len > $dirEnd or not $tagTablePtr->{$tag}
10742 12 4 if $pos == $start
10781 0 28 if $size < 12
10782 0 28 if $pos + $size > $dirLen
10788 0 28 if $verbose > 2
10790 24 4 if ($tagTablePtr->{$type}) { }
0 4 elsif ($verbose) { }
10802 0 4 if $pos != $dirLen
10820 0 4 if $dirLen < 8
10822 0 4 if $verbose
10833 0 28 if $pos + 12 > $end
10838 0 28 if $nxt > $end
10839 0 28 if $verbose
10842 0 40 if $pos + 12 > $end
10846 0 40 if $pos + 4 * $count > $end
10858 0 4 if $err
10869 128 24 unless $et
10872 21 3 if (defined $dirData and length $dirData and $dirInfo->{'Fixup'})