Branch Coverage

blib/lib/Image/ExifTool/Canon.pm
Criterion Covered Total %
branch 121 222 54.5


line true false branch
9408 5 0 if (not $lens =~ /x$/ and $lens =~ /(\d+)/)
9412 0 5 if abs $shortFocal - $sf * $tc > "0.9"
9413 0 5 if $tc > 1
9431 39 12 if ($xres and $yres)
9438 25 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])
9465 6 22 unless $lensType eq -1 or $lensType eq 65535
9466 6 22 if ($lens) { }
0 44 elsif ($lensModel and $lensModel =~ /\d/) { }
9468 5 1 unless $$printConv{"$lensType.1"}
9479 0 4 if $Image::ExifTool::userLens{$lens}
9484 1 3 unless $lens =~ m[(\d+)(?:-(\d+))?mm.*?(?:[fF]/?)(\d+(?:\.\d+)?)(?:-(\d+(?:\.\d+)?))?]
9488 0 3 if $sf and not $lf
9489 2 1 if $sa and not $la
9491 0 3 if ($lens =~ / \+ (\d+(\.\d+)?)x$/)
9495 2 1 if abs $shortFocal - $sf * $tc > "0.9"
9497 0 1 if $tc > 1
9499 0 1 if abs $longFocal - $lf * $tc > "0.9"
9501 0 1 if ($maxAperture)
9504 0 0 if $maxAperture < $sa * $tc - "0.18"
9505 0 0 if $maxAperture > $la * $tc + "0.18"
9509 1 0 if @maybe
9511 0 1 if (@user)
9513 0 0 if (@user > 1)
9517 0 0 if $Image::ExifTool::userLens{$_}
9519 0 0 unless /^(.*) \+ \d+(\.\d+)?x$/
9520 0 0 if $Image::ExifTool::userLens{$1}
9522 0 0 if @good
9529 0 0 if (@matches > 1 and $lensModel and $lensModel =~ /(\| [ACS])/)
9533 0 0 if $lens =~ /\Q$type\E/
9535 0 0 if @best
9537 0 1 unless @matches
9538 0 1 unless @matches
9540 1 0 if @matches
9543 0 0 if ($printConv eq \%Image::ExifTool::Canon::canonLensTypes) { }
9551 22 0 if ($shortFocal)
9553 22 0 if $longFocal and $longFocal != $shortFocal
9557 22 0 if $lensType eq -1 or $lensType eq 65535
9583 349 0 if $val == $dataVal
9595 0 41 if $size < 24
9597 0 41 unless $af =~ /^(1|5|7|9|15|45|53)$/
9600 0 41 unless $h1 and $w1
9603 0 41 if abs $f1 - "1.33" < "0.01" or abs $f1 - "1.67" < "0.01"
9605 0 41 if abs $f1 - "0.75" < "0.01" or abs $f1 - "0.6" < "0.01"
9608 0 41 unless $h2 and $w2
9611 0 41 if $w1 eq $h1
9613 41 0 if abs 1 - $f1 / $f2 < "0.01"
9614 0 0 if abs 1 - $f1 * $f2 < "0.01"
9625 8 4 unless $offset
9627 0 4 unless defined($raf = $et->{'RAF'})
9631 4 0 if ($raf->Seek($offset, 0) and $raf->Read($buff, 8) == 8 and $buff =~ /^\xff{4}.\0\0/s)
9637 1 3 if ($version > 20)
9641 0 4 if ($version == 1 or $version == 2) { }
4 0 elsif ($version == 3) { }
9654 0 0 if ($raf->Read($buf2, 24) == 24)
9658 0 0 if ($count and $count < 20 and $raf->Read($buf2, $count * 32) == $count * 32)
9690 4 12 if $i == 3
9691 0 12 unless $raf->Read($buf2, 4) == 4
9695 4 8 if $i == 2 and $len >= 4
9697 0 12 unless $len <= 65536 and $raf->Read($buf2, $len) == $len
9704 4 0 unless ($err)
9705 0 4 if ($et->Options("HtmlDump"))
9734 5 44 if ($inv) { }
44 0 elsif ($val != 32767) { }
9736 0 5 if (not defined $rtnVal and &Image::ExifTool::IsInt($val))
9740 0 44 if ($val & 16384) { }
9756 38 25 unless $scale
9757 0 63 if ($short == $long) { }
9788 2 61 if $verbose
9796 59 753 unless my $tagInfo = $et->GetTagInfo($tagTablePtr, $index)
9799 248 505 if ($format) { }
9800 223 25 if ($format =~ /(.*)\[(.*)\]/) { }
0 25 elsif ($format eq 'string') { }
9806 0 223 if $@
9809 0 0 $size > $pos ? :
9815 0 753 if $pos + $len > $size
9817 0 753 unless defined $val
9818 22 731 if ($verbose)
9832 1 752 if ($tagInfo->{'SubDirectory'}) { }
707 45 elsif (not $tagInfo->{'Unknown'} or $unknown) { }
9843 704 3 if $count
9864 0 0 unless length $val == 8
9883 0 0 $row eq $lastRow ? :
9885 0 0 if $focus eq $focusPt
9886 0 0 if shift @bits
9888 0 0 $focus == 255 ? :
0 0 unless $focusing
9905 25 295 if ($val < 0) { }
9914 5 315 if ($frac == 12) { }
76 239 elsif ($frac == 20) { }
9931 81 352 if ($num < 0) { }
9939 2 431 if (abs $frac - 0.33 < 0.05) { }
57 374 elsif (abs $frac - 0.67 < 0.05) { }
9962 0 4 if ($et->Options('MakerNotes') || $et->{'REQ_TAG_LOOKUP'}{'makernotecanon'} and $dirInfo->{'DirLen'} > 8)
9993 0 16 if $len < 8 or $pos + $len > $dirEnd or not $tagTablePtr->{$tag}
9994 12 4 if $pos == $start
10033 0 28 if $size < 12
10034 0 28 if $pos + $size > $dirLen
10040 0 28 if $verbose > 2
10041 24 4 if ($tagTablePtr->{$type}) { }
0 4 elsif ($verbose) { }
10053 0 4 if $pos != $dirLen
10071 0 4 if $dirLen < 8
10073 0 4 if $verbose
10084 0 28 if $pos + 12 > $end
10089 0 28 if $nxt > $end
10090 0 28 if $verbose
10093 0 40 if $pos + 12 > $end
10097 0 40 if $pos + 4 * $count > $end
10109 0 4 if $err
10120 128 23 unless $et
10123 20 3 if (defined $dirData and length $dirData and $dirInfo->{'Fixup'})