Condition Coverage

blib/lib/Image/ExifTool/Exif.pm
Criterion Covered Total %
condition 253 559 45.2


and 2 conditions

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

and 3 conditions

line !l l&&!r l&&r condition
5049 206 0 71 $et->{'FILE_TYPE'} eq "TIFF" and not $et->{'IdentifiedRawFile'}
5050 0 68 3 $Image::ExifTool::Exif::compression{$comp} and $Image::ExifTool::Exif::compression{$comp} =~ /^\w+ ([A-Z]{3}) Compressed$/
5067 5 0 379 $_ and /([+-]?(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?)/
5 0 379 $_ and /([+-]?(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?)/ and $1 > 0
5096 202 334 32 $focal and $foc35
5110 496 0 40 $diag and &Image::ExifTool::IsFloat($diag)
5111 496 0 0 $sens and $sensXY =~ / (\d+(\.?\d*)?)$/
5117 478 0 18 $xsize and $ysize
5131 0 0 124 &Image::ExifTool::IsFloat($x_res) and $x_res != 0
5132 0 0 124 &Image::ExifTool::IsFloat($y_res) and $y_res != 0
5138 2 0 124 $w and $h
5140 0 0 124 $a > "0.5" and $a < 2
5147 86 30 8 $diag > 1 and $diag < 100
5202 94 1 0 $et->{'OPTIONS'}{'Validate'} and $id =~ /^(ASCII|UNICODE|JIS)?\0* \0*$/
5213 0 1 94 $asciiFlex and $asciiFlex eq 1
5230 0 0 0 $asciiFlex and $asciiFlex ne 1
5234 95 0 0 $et->{'WrongByteOrder'} and $et->{'OPTIONS'}{'Validate'}
5251 0 0 0 @cols == $n + 1 and $pos >= 4
5291 8 31 2 $isFloat and $val == 0
5293 8 31 0 $isFloat and $val < 0
5334 0 0 4 $_[0] and $_[1]
86 0 4 not defined $val and ($_[0] and $_[1])
5344 108 31 436 $secs < "0.25001" and $secs > 0
5357 0 0 361 &Image::ExifTool::IsFloat($val) and $val > 0
5400 0 0 6 $a[0] and $a[1]
5453 0 3 9 $vals[1] and $vals[1] ne $vals[0]
5455 2 5 5 $vals[3] and $vals[3] ne $vals[2]
5489 4 0 0 @$try > 1 and $lensModel
5495 0 0 0 @filt and @filt < @$try
5498 0 0 0 @$try > 1 and $lensModel =~ m[(?:F/?|1:)(\d+(\.\d+)?)]i
5501 0 0 0 @filt and @filt < @$try
5505 0 0 0 @$try > 1 and $lensModel =~ /\b($pat)\b/
5508 0 0 0 @filt and @filt < @$try
5532 0 0 0 ref $printConv eq "ARRAY" and ref $printConv->[0] eq "HASH"
5550 34 1 1 $lensFocalRange and $lensFocalRange =~ /^(\d+)(?: (?:to )?(\d+))?$/
5553 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/
5576 0 0 0 $lensType >= 18688 and $lensType <= 22794
5628 0 0 0 $lensSpecPrt and $lens =~ / \Q$lensSpecPrt\E( \(| GM$|$)/
5682 0 0 0 $Image::ExifTool::userLens{$_} and push @good, $_
5695 1 0 0 $lensModel and $lens =~ / or /
5864 1 0 145 defined $dataPos and $offset >= $dataPos
1 41 104 defined $dataPos and $offset >= $dataPos and $offset + $len <= $dataPos + length($$dataPt)
5870 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)/
5875 0 0 0 defined $try and $try =~ /^\xff\xd8\xff/
5938 1110 0 0 $et->{'ImageDataMD5'} and $et->{'FILE_TYPE'} eq 'TIFF' && !$base && !$inMakerNotes || $et->{'FILE_TYPE'} eq 'RAF' && $dirName eq 'FujiIFD'
5944 1083 20 7 $validate || $Image::ExifTool::MWG::strict and $dirName eq "IFD0"
1103 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)$/
5964 1103 0 7 $validate and not $verbose
5966 824 1 285 $dirName =~ /^(IFD0|SubIFD)$/ and not defined $dirInfo->{'Multi'}
5969 543 401 166 $dir and $inMakerNotes
944 136 30 $dir and $inMakerNotes and not $dir =~ /^MakerNote/
5972 1 75 1034 $dirStart >= 0 and $dirStart <= $dataLen - 2
5978 378 9 0 $verbose > 0 || $validate and not $dirInfo->{'SubIFD'}
5994 0 0 76 $raf->Seek($offset + $base, 0) and $raf->Read($buff, 2) == 2
6012 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
6062 927 183 0 $inMakerNotes and $et->{'Model'} eq "Canon EOS 40D"
1110 0 0 $inMakerNotes and $et->{'Model'} eq "Canon EOS 40D" and $numEntries
6091 0 0 0 $format == 16 && $et->{'Make'} eq 'Apple' && $inMakerNotes
15748 0 0 $format < 1 || $format > 13 and not $format == 16 && $et->{'Make'} eq 'Apple' && $inMakerNotes
6092 0 0 0 $mapFmt and $mapFmt->{$format}
6117 5705 696 9347 $count < 2 and ref $tagTablePtr->{$tagID} eq "HASH"
6401 9347 0 $count < 2 and ref $tagTablePtr->{$tagID} eq "HASH" and $tagTablePtr->{$tagID}{'FixCount'}
6121 0 0 0 defined $i and $i < $#$offList
6127 15660 25 63 $validate and not $inMakerNotes
6132 0 0 0 $tagInfo && $tagInfo->{'ReadFromRAF'}
7116 0 0 $size > 2147483647 and not $tagInfo && $tagInfo->{'ReadFromRAF'}
6138 7077 19 20 $validate and not $inMakerNotes
6141 0 20 0 $valuePtr + $size > length $$dataPt and $valuePtr + $size > $et->{'VALUE'}{'FileSize'}
6148 0 20 0 $valuePtr + $size > $dirStart + $dataPos and $valuePtr < $dirEnd + $dataPos + 4
6166 7114 0 2 $valuePtr < 8 and not $dirInfo->{'ZeroOffsetOK'}
6168 449 6657 0 ref $tagTablePtr->{$tagID} eq "HASH" and $tagTablePtr->{$tagID}{'EntryBased'}
6176 7088 28 0 $valuePtr < $dirEnd and $valuePtr + $size > $dirStart
6190 0 0 0 $et->{'OPTIONS'}{'Binary'} and not $et->{'EXCL_TAG_LOOKUP'}{$lcTag}
6194 0 0 0 $et->{'TAGS_FROM_FILE'} and $tagInfo->{'Protected'}
6212 17 432 0 $tagInfo && $tagInfo->{'ReadFromRAF'}
6213 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'}}
6251 0 0 0 $tagInfo and $tagInfo->{'ChangeBase'}
6259 0 0 0 $tagStr eq "PreviewImage" and $et->{'RAF'}
0 0 0 $leicaTrailer and $et->{'RAF'}
6296 7114 0 2 defined $suspect and $suspect == $warnCount
6305 13747 1683 316 $format == 7 and $count == 1
6308 15746 0 0 $tagID > 61440 and $isExif
6310 0 0 0 !$oldInfo || ref $oldInfo eq 'HASH' && $oldInfo->{'Condition'} && !$oldInfo->{'PSRaw'} and not $bad
6316 0 0 0 defined $val and $val =~ /(.*): (.*)/
6335 579 14761 406 defined $tagInfo and not $tagInfo
6347 0 0 10 $tagInfo && $tagInfo->{'SubIFD'}
15736 10 0 $format == 13 || $format == 18 and not $tagInfo && $tagInfo->{'SubIFD'}
6356 13842 412 910 $subdir and not $tagInfo->{'SubIFD'}
14254 168 742 $subdir and not $tagInfo->{'SubIFD'} and not $readFormat
6361 0 838 995 $newNum and $newNum != $format
6370 14511 653 0 $tagInfo->{'IsOffset'} || $tagInfo->{'SubIFD'} and not $Image::ExifTool::Exif::intFormat{$formatStr}
6386 15167 0 0 $count > 100000 and not $formatStr =~ /^(undef|string|binary)$/
6397 14932 233 2 $count > 500 and not $formatStr =~ /^(undef|string|binary)$/
15165 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'}
6407 15167 0 0 $strEnc and $formatStr eq "string"
15167 0 0 $strEnc and $formatStr eq "string" and defined $val
6417 0 0 0 $tagID == 37500 and $dirName eq "ExifIFD"
6428 0 0 0 $origFormStr and $origFormStr ne $fstr
6445 0 0 0 $et->{'EXIF_POS'} and not $et->{'BASE_FUDGE'}
6454 0 0 0 $tagID <= $lastID and not $inMakerNotes
6460 0 0 0 $tagInfo and &Image::ExifTool::IsInt($tval)
6480 0 0 0 $tagInfo and $tagInfo->{'SubIFD'}
6495 0 0 0 $subdir and $tagInfo->{'MakerNotes'}
0 0 0 $subdir and $tagInfo->{'MakerNotes'} and $tagInfo->{'NotIFD'}
6500 336 9 0 $tagID <= $lastID and not $inMakerNotes
6599 112 3 4 $num & 65280 and $num >> 8 > ($num & 255)
6678 140 0 1 $fast and $fast > 1
6685 756 153 418 $tagInfo->{'Groups'} and not $tagInfo->{'Writable'}
6695 923 404 0 defined $subdir->{'Validate'} and not eval $subdir->{'Validate'}
6699 545 120 662 not $subdirInfo{'DirName'} and $inMakerNotes
6706 1320 7 0 not $ok and $verbose > 1
1327 0 0 not $ok and $verbose > 1 and $subdirStart != $valuePtr
6720 0 0 23 $subdir->{'ByteOrder'} and not $invalid
6725 0 23 0 $doMaker and $doMaker eq 2
6769 13640 10 231 $tagInfo->{'IsOffset'} and eval $tagInfo->{'IsOffset'}
6785 50 0 10 $Image::ExifTool::Exif::saveForValidate{$tagID} and $isExif
6810 806 0 304 $dirInfo->{'Multi'} and $bytesFromEnd >= 4
6829 0 0 176 $success and $newDirInfo{'BytesFromEnd'} >= 4

or 2 conditions

line l !l condition
5098 0 536 shift() || 1
5128 92 386 $lkup{shift() or $res or ''} || 25.4
5129 124 354 shift() || (return undef)
5203 0 0 $1 || 'Undefined'
5406 24 0 $cfaColor[$a[$pos]] || 'Unknown'
5921 116 994 $dirInfo->{'DataPos'} || 0
5923 1104 6 $dirInfo->{'DirStart'} || 0
5926 925 185 $dirInfo->{'Base'} || 0
6435 0 0 $et->{'EXIF_POS'} || 0
0 0 $et->{'BASE_FUDGE'} || 0
6466 0 0 $et->{'EXIF_POS'} || 0
0 0 $et->{'BASE_FUDGE'} || 0
6776 0 0 eval $tagInfo->{'WrongBase'} || 0

or 3 conditions

line l !l&&r !l&&!r condition
5120 11 7 0 abs $a - "1.3333" < "0.1" or abs $a - "1.5" < "0.1"
5130 123 1 0 shift() || $x_res
5291 26 2 39 $val =~ /\bn/i or $isFloat and $val == 0
5293 0 0 39 $val =~ /\b(s|l)/i or $isFloat and $val < 0
5295 6 31 2 $val =~ /\bh/i or $isFloat
5429 0 0 0 $conv->{$op} || "[opcode $op]"
5551 1 0 0 $2 || $1
5600 0 1 0 $lensModel || $lensTypePrt
5621 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"
5653 0 0 3 $sf == $lf or $sa == $la
0 3 0 $sf == $lf or $sa == $la or $focalLength <= $sf
5834 0 0 4 $rtn or $w > 256
5861 59 2 146 not $len or $et->{'FILE_TYPE'} eq "XMP"
5924 1060 32 18 $dirInfo->{'DirLen'} || $dataLen - $dirStart
5938 0 0 0 $et->{'FILE_TYPE'} eq 'TIFF' && !$base && !$inMakerNotes || $et->{'FILE_TYPE'} eq 'RAF' && $dirName eq 'FujiIFD'
5944 7 20 1083 $validate || $Image::ExifTool::MWG::strict
5978 9 0 378 $verbose > 0 || $validate
6024 0 4 0 $bytesFromEnd == 2 or $bytesFromEnd == 0
6040 0 0 0 $dirInfo->{'Name'} || $dir
6065 0 0 0 $fmt < 1 or $fmt > 13
6091 0 0 15748 $format < 1 || $format > 13
6098 0 0 0 $format or $validate
6103 0 0 0 $index or $et->{'Model'} eq "ILCE-7M2"
6141 0 0 20 $valuePtr < 8 or $valuePtr + $size > length $$dataPt and $valuePtr + $size > $et->{'VALUE'}{'FileSize'}
6152 0 81 0 $_->[0] >= $valuePtr + $size or $_->[0] + $_->[1] <= $valuePtr
6168 10 0 7106 $dirInfo->{'EntryBased'} or ref $tagTablePtr->{$tagID} eq "HASH" and $tagTablePtr->{$tagID}{'EntryBased'}
6178 26 423 6667 $valuePtr < 0 or $valuePtr + $size > $dataLen
6228 0 0 0 $inMakerNotes or $htmlDump
6276 0 0 0 $tagInfo || $tmpInfo
6310 0 0 0 !$oldInfo || ref $oldInfo eq 'HASH' && $oldInfo->{'Condition'} && !$oldInfo->{'PSRaw'}
6347 10 0 15736 $format == 13 || $format == 18
6370 241 412 14511 $tagInfo->{'IsOffset'} || $tagInfo->{'SubIFD'}
6389 0 0 0 $tagName ne "TransferFunction" or $count != 196608
6397 0 0 2 !$tagInfo || $tagInfo->{'LongBinary'} || $warned
6438 0 0 0 $bad || !defined($tval)
6464 0 0 0 $tagInfo->{'IsOffset'} or $tagInfo->{'SubIFD'}
6525 3 0 342 not $tagInfo or $wrongFormat
6534 0 0 0 $tagInfo->{'MakerNotes'} or $inMakerNotes
6576 418 0 51 $tagInfo->{'SubIFD'} or $subdir->{'BadOffset'}
6629 1 30 1297 $subdirStart < 0 or $subdirStart + 2 > $subdirDataLen
6716 214 7 1101 $doMaker or $et->{'REQ_TAG_LOOKUP'}{lc $tagStr}
221 2 1099 $doMaker or $et->{'REQ_TAG_LOOKUP'}{lc $tagStr} or $tagInfo->{'BlockExtract'}
6725 23 0 0 not $tagInfo->{'NotIFD'} or $tagInfo->{'IsPhaseOne'}
6784 70 0 13811 $validate or $doMD5
6825 176 0 0 $newDirInfo{'DirName'} ne "SubIFD1" or &ValidateIFD(\%newDirInfo)
0 0 0 $verbose or $et->{'TIFF_TYPE'} eq "TIFF"