Condition Coverage

blib/lib/Image/ExifTool/Exif.pm
Criterion Covered Total %
condition 263 592 44.4


and 2 conditions

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

and 3 conditions

line !l l&&!r l&&r condition
5318 208 0 71 $et->{'FILE_TYPE'} eq "TIFF" and not $et->{'IdentifiedRawFile'}
5319 0 68 3 $Image::ExifTool::Exif::compression{$comp} and $Image::ExifTool::Exif::compression{$comp} =~ /^\w+ ([A-Z]{3}) Compressed$/
5336 5 0 382 $_ and /([+-]?(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?)/
5 0 382 $_ and /([+-]?(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?)/ and $1 > 0
5365 206 327 29 $focal and $foc35
5376 497 0 36 $diag and &Image::ExifTool::IsFloat($diag)
5377 497 0 0 $sens and $sensXY =~ / (\d+(\.?\d*)?)$/
5383 480 0 17 $xsize and $ysize
5397 0 0 122 &Image::ExifTool::IsFloat($x_res) and $x_res != 0
5398 0 0 122 &Image::ExifTool::IsFloat($y_res) and $y_res != 0
5404 2 0 122 $w and $h
5406 0 0 122 $a > "0.5" and $a < 2
5413 86 30 6 $diag > 1 and $diag < 100
5468 94 1 0 $et->{'OPTIONS'}{'Validate'} and $id =~ /^(ASCII|UNICODE|JIS)?\0* \0*$/
5479 0 1 94 $asciiFlex and $asciiFlex eq 1
5496 0 0 0 $asciiFlex and $asciiFlex ne 1
5500 95 0 0 $et->{'WrongByteOrder'} and $et->{'OPTIONS'}{'Validate'}
5517 0 0 0 @cols == $n + 1 and $pos >= 4
5557 8 31 2 $isFloat and $val == 0
5559 8 31 0 $isFloat and $val < 0
5600 0 0 4 $_[0] and $_[1]
86 0 4 not defined $val and ($_[0] and $_[1])
5610 101 32 442 $secs < "0.25001" and $secs > 0
5623 0 0 347 &Image::ExifTool::IsFloat($val) and $val > 0
5666 0 0 6 $a[0] and $a[1]
5719 0 3 9 $vals[1] and $vals[1] ne $vals[0]
5721 2 5 5 $vals[3] and $vals[3] ne $vals[2]
5755 4 0 0 @$try > 1 and $lensModel
5761 0 0 0 @filt and @filt < @$try
5764 0 0 0 @$try > 1 and $lensModel =~ m[(?:F/?|1:)(\d+(\.\d+)?)]i
5767 0 0 0 @filt and @filt < @$try
5771 0 0 0 @$try > 1 and $lensModel =~ /\b($pat)\b/
5774 0 0 0 @filt and @filt < @$try
5798 0 0 0 ref $printConv eq "ARRAY" and ref $printConv->[0] eq "HASH"
5816 34 1 1 $lensFocalRange and $lensFocalRange =~ /^(\d+)(?: (?:to )?(\d+))?$/
5819 6 0 30 $shortFocal and $longFocal
27 3 0 $lensModel && $lensModel =~ /^TAMRON.*-\d+mm/
6 0 30 $shortFocal and $longFocal and not $lensModel && $lensModel =~ /^TAMRON.*-\d+mm/
5822 0 0 0 $printConv->{$lensType} and not $focalLength
0 0 0 $printConv->{$lensType} and not $focalLength and $maxAperture == 1
5844 0 0 0 $lensType >= 18688 and $lensType <= 22794
5896 0 0 0 $lensSpecPrt and $lens =~ / \Q$lensSpecPrt\E( \(| GM$|$)/
5950 0 0 0 $Image::ExifTool::userLens{$_} and push @good, $_
5963 1 0 0 $lensModel and $lens =~ / or /
6132 1 0 147 defined $dataPos and $offset >= $dataPos
1 41 106 defined $dataPos and $offset >= $dataPos and $offset + $len <= $dataPos + length($$dataPt)
6138 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)/
6143 0 0 0 defined $try and $try =~ /^\xff\xd8\xff/
6206 78 16 0 $et->{'FileType'} eq "CR3" and $dirInfo->{'Parent'}
16 0 0 $et->{'FileType'} eq "CR3" and $dirInfo->{'Parent'} and $dirInfo->{'Parent'} eq "ExifIFD"
6209 16 11 67 $dirInfo->{'TagInfo'} and $dirInfo->{'TagInfo'}{'MakerNotes'}
11 0 67 $dirInfo->{'TagInfo'} and $dirInfo->{'TagInfo'}{'MakerNotes'} and $et->{'ExifByteOrder'}
0 65 2 $dirInfo->{'TagInfo'} and $dirInfo->{'TagInfo'}{'MakerNotes'} and $et->{'ExifByteOrder'} and $et->{'ExifByteOrder'} ne &GetByteOrder()
6217 1124 0 0 $et->{'ImageDataHash'} and $et->{'FILE_TYPE'} eq 'TIFF' && !$base && !$inMakerNotes || $et->{'FILE_TYPE'} eq 'RAF' && $dirName eq 'FujiIFD'
6223 1097 20 7 $validate || $Image::ExifTool::MWG::strict and $dirName eq "IFD0"
1117 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)$/
6243 1117 0 7 $validate and not $verbose
6245 833 1 290 $dirName =~ /^(IFD0|SubIFD)$/ and not defined $dirInfo->{'Multi'}
6248 550 408 166 $dir and $inMakerNotes
958 136 30 $dir and $inMakerNotes and not $dir =~ /^MakerNote/
6251 1 75 1048 $dirStart >= 0 and $dirStart <= $dataLen - 2
6257 385 9 0 $verbose > 0 || $validate and not $dirInfo->{'SubIFD'}
6273 0 0 76 $raf->Seek($offset + $base, 0) and $raf->Read($buff, 2) == 2
6291 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
6341 941 183 0 $inMakerNotes and $et->{'Model'} eq "Canon EOS 40D"
1124 0 0 $inMakerNotes and $et->{'Model'} eq "Canon EOS 40D" and $numEntries
6370 15784 0 0 $format < 1 || $format > 13 and $format != 129
0 0 0 $format == 16 && $et->{'Make'} eq 'Apple' && $inMakerNotes
15784 0 0 $format < 1 || $format > 13 and $format != 129 and not $format == 16 && $et->{'Make'} eq 'Apple' && $inMakerNotes
6371 0 0 0 $mapFmt and $mapFmt->{$format}
6397 5745 700 9339 $count < 2 and ref $tagTablePtr->{$tagID} eq "HASH"
6445 9339 0 $count < 2 and ref $tagTablePtr->{$tagID} eq "HASH" and $tagTablePtr->{$tagID}{'FixCount'}
6401 0 0 0 defined $i and $i < $offList->$#*
6407 15696 25 63 $validate and not $inMakerNotes
6412 0 0 0 $tagInfo && $tagInfo->{'ReadFromRAF'}
7121 0 0 $size > 2147483647 and not $tagInfo && $tagInfo->{'ReadFromRAF'}
6418 7082 19 20 $validate and not $inMakerNotes
6421 0 20 0 $valuePtr + $size > length $$dataPt and $valuePtr + $size > $et->{'VALUE'}{'FileSize'}
6428 0 20 0 $valuePtr + $size > $dirStart + $dataPos and $valuePtr < $dirEnd + $dataPos + 4
6446 7119 0 2 $valuePtr < 8 and not $dirInfo->{'ZeroOffsetOK'}
6448 449 6662 0 ref $tagTablePtr->{$tagID} eq "HASH" and $tagTablePtr->{$tagID}{'EntryBased'}
6456 7093 28 0 $valuePtr < $dirEnd and $valuePtr + $size > $dirStart
6470 0 0 0 $et->{'OPTIONS'}{'Binary'} and not $et->{'EXCL_TAG_LOOKUP'}{$lcTag}
6474 0 0 0 $et->{'TAGS_FROM_FILE'} and $tagInfo->{'Protected'}
6492 17 432 0 $tagInfo && $tagInfo->{'ReadFromRAF'}
6493 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'}}
6502 0 0 0 $tagInfo and not $tagInfo->{'Unknown'}
6535 0 0 0 $tagInfo and $tagInfo->{'ChangeBase'}
6543 0 0 0 $tagStr eq "PreviewImage" and $et->{'RAF'}
0 0 0 $leicaTrailer and $et->{'RAF'}
6580 7119 0 2 defined $suspect and $suspect == $warnCount
6589 13793 1670 319 $format == 7 and $count == 1
6592 15782 0 0 $tagID > 61440 and $isExif
6594 0 0 0 !$oldInfo || ref $oldInfo eq 'HASH' && $oldInfo->{'Condition'} && !$oldInfo->{'PSRaw'} and not $bad
6600 0 0 0 defined $val and $val =~ /(.*): (.*)/
6619 579 14797 406 defined $tagInfo and not $tagInfo
6631 0 0 10 $tagInfo && $tagInfo->{'SubIFD'}
15772 10 0 $format == 13 || $format == 18 and not $tagInfo && $tagInfo->{'SubIFD'}
6640 13871 419 910 $subdir and not $tagInfo->{'SubIFD'}
14290 168 742 $subdir and not $tagInfo->{'SubIFD'} and not $readFormat
6645 0 842 1000 $newNum and $newNum != $format
6654 14538 662 0 $tagInfo->{'IsOffset'} || $tagInfo->{'SubIFD'} and not $Image::ExifTool::Exif::intFormat{$formatStr}
6670 15203 0 0 $count > 100000 and not $formatStr =~ /^(undef|string|binary)$/
6681 14968 233 2 $count > 500 and not $formatStr =~ /^(undef|string|binary)$/
15201 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'}
6693 15203 0 0 $strEnc and $formatStr eq "string"
6708 0 0 0 $tagID == 37500 and $dirName eq "ExifIFD"
6719 0 0 0 $origFormStr and $origFormStr ne $fstr
6737 0 0 0 $et->{'EXIF_POS'} and not $et->{'BASE_FUDGE'}
6746 0 0 0 $tagID <= $lastID and not $inMakerNotes
6752 0 0 0 $tagInfo and &Image::ExifTool::IsInt($tval)
6764 0 0 0 $et->{'EXIF_POS'} and not $et->{'BASE_FUDGE'}
6775 0 0 0 $tagInfo and $tagInfo->{'SubIFD'}
6790 0 0 0 $subdir and $tagInfo->{'MakerNotes'}
0 0 0 $subdir and $tagInfo->{'MakerNotes'} and $tagInfo->{'NotIFD'}
6795 336 9 0 $tagID <= $lastID and not $inMakerNotes
6894 112 3 4 $num & 65280 and $num >> 8 > ($num & 255)
6973 140 0 1 $fast and $fast > 1
6980 756 153 425 $tagInfo->{'Groups'} and not $tagInfo->{'Writable'}
6990 930 404 0 defined $subdir->{'Validate'} and not eval $subdir->{'Validate'}
6994 552 120 662 not $subdirInfo{'DirName'} and $inMakerNotes
7001 1327 7 0 not $ok and $verbose > 1
1334 0 0 not $ok and $verbose > 1 and $subdirStart != $valuePtr
7015 0 0 23 $subdir->{'ByteOrder'} and not $invalid
7020 0 23 0 $doMaker and $doMaker eq 2
7064 13667 10 233 $tagInfo->{'IsOffset'} and eval $tagInfo->{'IsOffset'}
7080 50 0 10 $Image::ExifTool::Exif::saveForValidate{$tagID} and $isExif
7110 815 0 309 $dirInfo->{'Multi'} and $bytesFromEnd >= 4
7129 0 0 178 $success and $newDirInfo{'BytesFromEnd'} >= 4

or 2 conditions

line l !l condition
5367 0 533 shift() || 1
5394 90 390 $lkup{shift() or $res or ''} || 25.4
5395 122 358 shift() || (return undef)
5469 0 0 $1 || 'Undefined'
5672 24 0 $cfaColor[$a[$pos]] || 'Unknown'
6189 116 1008 $dirInfo->{'DataPos'} || 0
6191 1118 6 $dirInfo->{'DirStart'} || 0
6194 938 186 $dirInfo->{'Base'} || 0
6727 0 0 $et->{'EXIF_POS'} || 0
0 0 $et->{'BASE_FUDGE'} || $et->{'BASE'} || 0
6758 0 0 $et->{'EXIF_POS'} || 0
0 0 $et->{'BASE_FUDGE'} || $et->{'BASE'} || 0
7071 0 0 eval $tagInfo->{'WrongBase'} || 0

or 3 conditions

line l !l&&r !l&&!r condition
5386 10 7 0 abs $a - "1.3333" < "0.1" or abs $a - "1.5" < "0.1"
5396 121 1 0 shift() || $x_res
5557 26 2 39 $val =~ /\bn/i or $isFloat and $val == 0
5559 0 0 39 $val =~ /\b(s|l)/i or $isFloat and $val < 0
5561 6 31 2 $val =~ /\bh/i or $isFloat
5695 0 0 0 $conv->{$op} || "[opcode $op]"
5817 1 0 0 $2 || $1
5868 0 1 0 $lensModel || $lensTypePrt
5889 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"
5921 0 0 3 $sf == $lf or $sa == $la
0 3 0 $sf == $lf or $sa == $la or $focalLength <= $sf
6102 0 0 4 $rtn or $w > 256
6129 59 2 148 not $len or $et->{'FILE_TYPE'} eq "XMP"
6192 1074 32 18 $dirInfo->{'DirLen'} || $dataLen - $dirStart
6217 0 0 0 $et->{'FILE_TYPE'} eq 'TIFF' && !$base && !$inMakerNotes || $et->{'FILE_TYPE'} eq 'RAF' && $dirName eq 'FujiIFD'
6223 7 20 1097 $validate || $Image::ExifTool::MWG::strict
6257 9 0 385 $verbose > 0 || $validate
6303 0 4 0 $bytesFromEnd == 2 or $bytesFromEnd == 0
6319 0 0 0 $dirInfo->{'Name'} || $dir
6344 0 0 0 $fmt < 1 or $fmt > 13
6370 0 0 15784 $format < 1 || $format > 13
6377 0 0 0 $format or $validate
6382 0 0 0 $index or $et->{'Model'} =~ /^ILCE/
6421 0 0 20 $valuePtr < 8 or $valuePtr + $size > length $$dataPt and $valuePtr + $size > $et->{'VALUE'}{'FileSize'}
6432 0 81 0 $_->[0] >= $valuePtr + $size or $_->[0] + $_->[1] <= $valuePtr
6448 10 0 7111 $dirInfo->{'EntryBased'} or ref $tagTablePtr->{$tagID} eq "HASH" and $tagTablePtr->{$tagID}{'EntryBased'}
6458 26 423 6672 $valuePtr < 0 or $valuePtr + $size > $dataLen
6511 0 0 0 $inMakerNotes || $truncOK
6512 0 0 0 $inMakerNotes or $htmlDump
0 0 0 $inMakerNotes or $htmlDump or $truncOK
6560 0 0 0 $tagInfo || $tmpInfo
6594 0 0 0 !$oldInfo || ref $oldInfo eq 'HASH' && $oldInfo->{'Condition'} && !$oldInfo->{'PSRaw'}
6631 10 0 15772 $format == 13 || $format == 18
6654 243 419 14538 $tagInfo->{'IsOffset'} || $tagInfo->{'SubIFD'}
6673 0 0 0 $tagName ne "TransferFunction" or $count != 196608
6681 0 0 2 !$tagInfo || $tagInfo->{'LongBinary'} || $warned
6730 0 0 0 $bad || !defined($tval)
6756 0 0 0 $tagInfo->{'IsOffset'} or $tagInfo->{'SubIFD'}
6820 3 0 342 not $tagInfo or $wrongFormat
6829 0 0 0 $tagInfo->{'MakerNotes'} or $inMakerNotes
6871 425 0 51 $tagInfo->{'SubIFD'} or $subdir->{'BadOffset'}
6924 1 30 1304 $subdirStart < 0 or $subdirStart + 2 > $subdirDataLen
7011 214 7 1108 $doMaker or $et->{'REQ_TAG_LOOKUP'}{lc $tagStr}
221 2 1106 $doMaker or $et->{'REQ_TAG_LOOKUP'}{lc $tagStr} or $tagInfo->{'BlockExtract'}
7020 23 0 0 not $tagInfo->{'NotIFD'} or $tagInfo->{'IsPhaseOne'}
7079 70 0 13840 $validate or $doHash
7125 178 0 0 $newDirInfo{'DirName'} ne "SubIFD1" or &ValidateIFD(\%newDirInfo)
0 0 0 $verbose or $et->{'TIFF_TYPE'} eq "TIFF"