Condition Coverage

blib/lib/Image/ExifTool/Exif.pm
Criterion Covered Total %
condition 253 547 46.2


and 2 conditions

line l !l condition
5413 4 0 $_ eq "?" and $_ = "undef"

and 3 conditions

line !l l&&!r l&&r condition
4985 199 0 71 $et->{'FILE_TYPE'} eq "TIFF" and not $et->{'IdentifiedRawFile'}
4986 0 68 3 $Image::ExifTool::Exif::compression{$comp} and $Image::ExifTool::Exif::compression{$comp} =~ /^\w+ ([A-Z]{3}) Compressed$/
5003 5 0 373 $_ and /([+-]?(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?)/
5 0 373 $_ and /([+-]?(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?)/ and $1 > 0
5032 200 328 28 $focal and $foc35
5046 493 0 35 $diag and &Image::ExifTool::IsFloat($diag)
5047 493 0 0 $sens and $sensXY =~ / (\d+(\.?\d*)?)$/
5053 474 0 19 $xsize and $ysize
5067 0 0 122 &Image::ExifTool::IsFloat($x_res) and $x_res != 0
5068 0 0 122 &Image::ExifTool::IsFloat($y_res) and $y_res != 0
5074 2 0 122 $w and $h
5076 0 0 122 $a > "0.5" and $a < 2
5083 86 30 6 $diag > 1 and $diag < 100
5138 86 1 0 $et->{'OPTIONS'}{'Validate'} and $id =~ /^(ASCII|UNICODE|JIS)?\0* \0*$/
5149 0 1 86 $asciiFlex and $asciiFlex eq 1
5166 0 0 0 $asciiFlex and $asciiFlex ne 1
5170 87 0 0 $et->{'WrongByteOrder'} and $et->{'OPTIONS'}{'Validate'}
5187 0 0 0 @cols == $n + 1 and $pos >= 4
5227 8 31 2 $isFloat and $val == 0
5229 8 31 0 $isFloat and $val < 0
5270 0 0 4 $_[0] and $_[1]
82 0 4 not defined $val and ($_[0] and $_[1])
5280 95 32 447 $secs < "0.25001" and $secs > 0
5293 0 0 354 &Image::ExifTool::IsFloat($val) and $val > 0
5336 0 0 6 $a[0] and $a[1]
5389 0 2 8 $vals[1] and $vals[1] ne $vals[0]
5391 2 4 4 $vals[3] and $vals[3] ne $vals[2]
5425 4 0 0 @$try > 1 and $lensModel
5431 0 0 0 @filt and @filt < @$try
5434 0 0 0 @$try > 1 and $lensModel =~ m[(?:F/?|1:)(\d+(\.\d+)?)]i
5437 0 0 0 @filt and @filt < @$try
5441 0 0 0 @$try > 1 and $lensModel =~ /\b($pat)\b/
5444 0 0 0 @filt and @filt < @$try
5468 0 0 0 ref $printConv eq "ARRAY" and ref $printConv->[0] eq "HASH"
5486 32 1 1 $lensFocalRange and $lensFocalRange =~ /^(\d+)(?: (?:to )?(\d+))?$/
5489 6 0 28 $shortFocal and $longFocal
25 3 0 $lensModel && $lensModel =~ /^TAMRON.*-\d+mm/
6 0 28 $shortFocal and $longFocal and not $lensModel && $lensModel =~ /^TAMRON.*-\d+mm/
5512 0 0 0 $lensType >= 18688 and $lensType <= 22794
5564 0 0 0 $lensSpecPrt and $lens =~ / \Q$lensSpecPrt\E( \(| GM$|$)/
5618 0 0 0 $Image::ExifTool::userLens{$_} and push @good, $_
5631 1 0 0 $lensModel and $lens =~ / or /
5800 1 0 138 defined $dataPos and $offset >= $dataPos
1 41 97 defined $dataPos and $offset >= $dataPos and $offset + $len <= $dataPos + length($$dataPt)
5806 0 29 8 $tag and $tag eq "ThumbnailImage"
29 8 0 $tag and $tag eq "ThumbnailImage" and $et->{'TIFF_TYPE'} eq "ARW"
37 0 0 $tag and $tag eq "ThumbnailImage" and $et->{'TIFF_TYPE'} eq "ARW" and $et->{'Model'} eq "DSLR-A100"
8 0 0 $tag and $tag eq "ThumbnailImage" and $et->{'TIFF_TYPE'} eq "ARW" and $et->{'Model'} eq "DSLR-A100" and $offset < 65536
0 0 0 $tag and $tag eq "ThumbnailImage" and $et->{'TIFF_TYPE'} eq "ARW" and $et->{'Model'} eq "DSLR-A100" and $offset < 65536 and not $image =~ /^(Binary data|\xff\xd8\xff)/
5811 0 0 0 defined $try and $try =~ /^\xff\xd8\xff/
5878 1029 20 7 $validate || $Image::ExifTool::MWG::strict and $dirName eq "IFD0"
1049 0 7 $validate || $Image::ExifTool::MWG::strict and $dirName eq "IFD0" and $isExif
20 0 7 $validate || $Image::ExifTool::MWG::strict and $dirName eq "IFD0" and $isExif and $et->{'FILE_TYPE'} =~ /^(JPEG|TIFF|PSD)$/
5893 1049 0 7 $validate and not $verbose
5895 782 1 273 $dirName =~ /^(IFD0|SubIFD)$/ and not defined $dirInfo->{'Multi'}
5898 524 377 155 $dir and $inMakerNotes
901 125 30 $dir and $inMakerNotes and not $dir =~ /^MakerNote/
5901 1 75 980 $dirStart >= 0 and $dirStart <= $dataLen - 2
5907 354 9 0 $verbose > 0 || $validate and not $dirInfo->{'SubIFD'}
5923 0 0 76 $raf->Seek($offset + $base, 0) and $raf->Read($buff, 2) == 2
5941 0 0 0 $inMakerNotes and $dirLen >= 14
0 0 0 $inMakerNotes and $dirLen >= 14 and $dirStart >= 0
0 0 0 $inMakerNotes and $dirLen >= 14 and $dirStart >= 0 and $dirStart + $dirLen <= length $$dataPt
5991 884 172 0 $inMakerNotes and $et->{'Model'} eq "Canon EOS 40D"
1056 0 0 $inMakerNotes and $et->{'Model'} eq "Canon EOS 40D" and $numEntries
6020 0 0 0 $format == 16 && $et->{'Make'} eq 'Apple' && $inMakerNotes
15012 0 0 $format < 1 || $format > 13 and not $format == 16 && $et->{'Make'} eq 'Apple' && $inMakerNotes
6021 0 0 0 $mapFmt and $mapFmt->{$format}
6046 5409 669 8934 $count < 2 and ref $tagTablePtr->{$tagID} eq "HASH"
6078 8934 0 $count < 2 and ref $tagTablePtr->{$tagID} eq "HASH" and $tagTablePtr->{$tagID}{'FixCount'}
6050 0 0 0 defined $i and $i < $#$offList
6056 14924 25 63 $validate and not $inMakerNotes
6061 0 0 0 $tagInfo && $tagInfo->{'ReadFromRAF'}
6747 0 0 $size > 2147483647 and not $tagInfo && $tagInfo->{'ReadFromRAF'}
6067 6708 19 20 $validate and not $inMakerNotes
6070 0 20 0 $valuePtr + $size > length $$dataPt and $valuePtr + $size > $et->{'VALUE'}{'FileSize'}
6077 0 20 0 $valuePtr + $size > $dirStart + $dataPos and $valuePtr < $dirEnd + $dataPos + 4
6095 6745 0 2 $valuePtr < 8 and not $dirInfo->{'ZeroOffsetOK'}
6097 431 6306 0 ref $tagTablePtr->{$tagID} eq "HASH" and $tagTablePtr->{$tagID}{'EntryBased'}
6105 6719 28 0 $valuePtr < $dirEnd and $valuePtr + $size > $dirStart
6119 0 0 0 $et->{'OPTIONS'}{'Binary'} and not $et->{'EXCL_TAG_LOOKUP'}{$lcTag}
6123 0 0 0 $et->{'TAGS_FROM_FILE'} and $tagInfo->{'Protected'}
6141 17 432 0 $tagInfo && $tagInfo->{'ReadFromRAF'}
6142 449 0 0 $readFromRAF and $size > BINARY_DATA_LIMIT()
449 0 0 $readFromRAF and $size > BINARY_DATA_LIMIT() and not $et->{'REQ_TAG_LOOKUP'}{lc $tagInfo->{'Name'}}
6180 0 0 0 $tagInfo and $tagInfo->{'ChangeBase'}
6188 0 0 0 $tagStr eq "PreviewImage" and $et->{'RAF'}
0 0 0 $leicaTrailer and $et->{'RAF'}
6225 6745 0 2 defined $suspect and $suspect == $warnCount
6234 13111 1601 298 $format == 7 and $count == 1
6237 15010 0 0 $tagID > 61440 and $isExif
6239 0 0 0 !$oldInfo || ref $oldInfo eq 'HASH' && $oldInfo->{'Condition'} && !$oldInfo->{'PSRaw'} and not $bad
6245 0 0 0 defined $val and $val =~ /(.*): (.*)/
6264 545 14078 387 defined $tagInfo and not $tagInfo
6276 0 0 10 $tagInfo && $tagInfo->{'SubIFD'}
15000 10 0 $format == 13 || $format == 18 and not $tagInfo && $tagInfo->{'SubIFD'}
6285 13215 388 859 $subdir and not $tagInfo->{'SubIFD'}
13603 157 702 $subdir and not $tagInfo->{'SubIFD'} and not $readFormat
6290 0 793 948 $newNum and $newNum != $format
6299 13840 622 0 $tagInfo->{'IsOffset'} || $tagInfo->{'SubIFD'} and not $Image::ExifTool::Exif::intFormat{$formatStr}
6315 14465 0 0 $count > 100000 and not $formatStr =~ /^(undef|string|binary)$/
6326 14242 221 2 $count > 500 and not $formatStr =~ /^(undef|string|binary)$/
14463 2 0 $count > 500 and not $formatStr =~ /^(undef|string|binary)$/ and !$tagInfo || $tagInfo->{'LongBinary'} || $warned
2 0 0 $count > 500 and not $formatStr =~ /^(undef|string|binary)$/ and !$tagInfo || $tagInfo->{'LongBinary'} || $warned and not $et->{'OPTIONS'}{'IgnoreMinorErrors'}
6336 14465 0 0 $strEnc and $formatStr eq "string"
14465 0 0 $strEnc and $formatStr eq "string" and defined $val
6346 0 0 0 $tagID == 37500 and $dirName eq "ExifIFD"
6357 0 0 0 $origFormStr and $origFormStr ne $fstr
6374 0 0 0 $et->{'EXIF_POS'} and not $et->{'BASE_FUDGE'}
6383 0 0 0 $tagID <= $lastID and not $inMakerNotes
6389 0 0 0 $tagInfo and &Image::ExifTool::IsInt($tval)
6409 0 0 0 $tagInfo and $tagInfo->{'SubIFD'}
6426 336 9 0 $tagID <= $lastID and not $inMakerNotes
6525 104 3 4 $num & 65280 and $num >> 8 > ($num & 255)
6604 129 0 1 $fast and $fast > 1
6611 716 142 394 $tagInfo->{'Groups'} and not $tagInfo->{'Writable'}
6621 872 380 0 defined $subdir->{'Validate'} and not eval $subdir->{'Validate'}
6625 518 112 622 not $subdirInfo{'DirName'} and $inMakerNotes
6632 1245 7 0 not $ok and $verbose > 1
1252 0 0 not $ok and $verbose > 1 and $subdirStart != $valuePtr
6646 0 0 20 $subdir->{'ByteOrder'} and not $invalid
6651 0 20 0 $doMaker and $doMaker eq 2
6695 13017 10 224 $tagInfo->{'IsOffset'} and eval $tagInfo->{'IsOffset'}
6711 50 0 10 $Image::ExifTool::Exif::saveForValidate{$tagID} and $isExif
6729 1049 2 5 $validate and %offsetInfo
6734 764 0 292 $dirInfo->{'Multi'} and $bytesFromEnd >= 4
6753 0 0 169 $success and $newDirInfo{'BytesFromEnd'} >= 4

or 2 conditions

line l !l condition
5034 0 528 shift() || 1
5064 90 384 $lkup{shift() or $res or ''} || 25.4
5065 122 352 shift() || (return undef)
5139 0 0 $1 || 'Undefined'
5342 24 0 $cfaColor[$a[$pos]] || 'Unknown'
5857 113 943 $dirInfo->{'DataPos'} || 0
5859 1050 6 $dirInfo->{'DirStart'} || 0
5862 871 185 $dirInfo->{'Base'} || 0
6364 0 0 $et->{'EXIF_POS'} || 0
0 0 $et->{'BASE_FUDGE'} || 0
6395 0 0 $et->{'EXIF_POS'} || 0
0 0 $et->{'BASE_FUDGE'} || 0
6702 0 0 eval $tagInfo->{'WrongBase'} || 0

or 3 conditions

line l !l&&r !l&&!r condition
5056 12 7 0 abs $a - "1.3333" < "0.1" or abs $a - "1.5" < "0.1"
5066 121 1 0 shift() || $x_res
5227 26 2 39 $val =~ /\bn/i or $isFloat and $val == 0
5229 0 0 39 $val =~ /\b(s|l)/i or $isFloat and $val < 0
5231 6 31 2 $val =~ /\bh/i or $isFloat
5365 0 0 0 $conv->{$op} || "[opcode $op]"
5487 1 0 0 $2 || $1
5536 0 1 0 $lensModel || $lensTypePrt
5557 0 0 0 abs $sf - $sf0 > "0.5" or abs $sa - $sa0 > "0.15"
0 0 0 abs $sf - $sf0 > "0.5" or abs $sa - $sa0 > "0.15" or abs $lf - $lf0 > "0.5"
0 0 0 abs $sf - $sf0 > "0.5" or abs $sa - $sa0 > "0.15" or abs $lf - $lf0 > "0.5" or abs $la - $la0 > "0.15"
5589 0 0 3 $sf == $lf or $sa == $la
0 3 0 $sf == $lf or $sa == $la or $focalLength <= $sf
5770 0 0 4 $rtn or $w > 256
5797 59 2 139 not $len or $et->{'FILE_TYPE'} eq "XMP"
5860 1006 32 18 $dirInfo->{'DirLen'} || $dataLen - $dirStart
5878 7 20 1029 $validate || $Image::ExifTool::MWG::strict
5907 9 0 354 $verbose > 0 || $validate
5953 0 4 0 $bytesFromEnd == 2 or $bytesFromEnd == 0
5969 0 0 0 $dirInfo->{'Name'} || $dir
5994 0 0 0 $fmt < 1 or $fmt > 13
6020 0 0 15012 $format < 1 || $format > 13
6027 0 0 0 $format or $validate
6032 0 0 0 $index or $et->{'Model'} eq "ILCE-7M2"
6070 0 0 20 $valuePtr < 8 or $valuePtr + $size > length $$dataPt and $valuePtr + $size > $et->{'VALUE'}{'FileSize'}
6081 0 81 0 $_->[0] >= $valuePtr + $size or $_->[0] + $_->[1] <= $valuePtr
6097 10 0 6737 $dirInfo->{'EntryBased'} or ref $tagTablePtr->{$tagID} eq "HASH" and $tagTablePtr->{$tagID}{'EntryBased'}
6107 26 423 6298 $valuePtr < 0 or $valuePtr + $size > $dataLen
6157 0 0 0 $inMakerNotes or $htmlDump
6205 0 0 0 $tagInfo || $tmpInfo
6239 0 0 0 !$oldInfo || ref $oldInfo eq 'HASH' && $oldInfo->{'Condition'} && !$oldInfo->{'PSRaw'}
6276 10 0 15000 $format == 13 || $format == 18
6299 234 388 13840 $tagInfo->{'IsOffset'} || $tagInfo->{'SubIFD'}
6318 0 0 0 $tagName ne "TransferFunction" or $count != 196608
6326 0 0 2 !$tagInfo || $tagInfo->{'LongBinary'} || $warned
6367 0 0 0 $bad || !defined($tval)
6393 0 0 0 $tagInfo->{'IsOffset'} or $tagInfo->{'SubIFD'}
6451 3 0 342 not $tagInfo or $wrongFormat
6460 0 0 0 $tagInfo->{'MakerNotes'} or $inMakerNotes
6502 394 0 51 $tagInfo->{'SubIFD'} or $subdir->{'BadOffset'}
6555 1 30 1222 $subdirStart < 0 or $subdirStart + 2 > $subdirDataLen
6642 195 7 1045 $doMaker or $et->{'REQ_TAG_LOOKUP'}{lc $tagStr}
202 2 1043 $doMaker or $et->{'REQ_TAG_LOOKUP'}{lc $tagStr} or $tagInfo->{'BlockExtract'}
6651 20 0 0 not $tagInfo->{'NotIFD'} or $tagInfo->{'IsPhaseOne'}
6749 169 0 0 $newDirInfo{'DirName'} ne "SubIFD1" or &ValidateIFD(\%newDirInfo)
0 0 0 $verbose or $et->{'TIFF_TYPE'} eq "TIFF"