Condition Coverage

blib/lib/MP3/Info.pm
Criterion Covered Total %
condition 77 254 30.3


and 3 conditions

line !l l&&!r l&&r condition
258 0 0 16 defined $file and $file ne ''
376 0 0 5 defined $file and $file ne ''
409 0 0 5 $info{'TRACKNUM'} =~ /^\d+$/ and $info{'TRACKNUM'} > 0
0 0 5 $info{'TRACKNUM'} =~ /^\d+$/ and $info{'TRACKNUM'} > 0 and $info{'TRACKNUM'} < 256
433 0 0 5 $info{'GENRE'} && exists $MP3::Info::mp3_genres{$info{'GENRE'}}
501 0 0 14 defined $file and $file ne ''
539 14 0 0 $ver == 1 and not $has_v1
556 14 0 0 $raw and $ver == 2
572 0 14 0 keys %info and not defined $info{'GENRE'}
587 0 14 0 defined $tag and $tag =~ /^TAG/
675 6 0 0 $$v2{'TXXX'} and ref $$v2{'TXXX'} ne 'ARRAY'
682 6 0 0 ref $$v2{'COMM'} eq 'ARRAY' and grep {/Media Jukebox/;} @{$$v2{'COMM'};}
777 0 0 0 $pic and $id eq 'PIC'
0 0 0 $pic and $id eq 'APIC'
813 0 0 0 $valid_pic and $pic_format
817 0 0 0 length $data and $pic_format
869 0 36 0 $data and not $data =~ /^[\x00-\x7F]+$/
903 0 0 0 /^(..)$/ && !/(\xFF\xFE)/
907 0 0 0 /^(..)$/ && !/(\xFF\xFE)/
913 0 0 0 /^(..)$/ && !/(\x00\x00)/
914 0 0 0 chr($_) =~ /[[:ascii:]]/ && chr($_) =~ /[[:print:]]/
924 0 0 24 $id =~ /^T...?$/ and $id ne 'TXXX'
986 6 0 0 $name and $name ne "\000"
993 0 6 0 $data and ref $data eq 'ARRAY'
6 0 0 $data and ref $data eq 'ARRAY' and scalar @$data == 1
1013 24 0 0 $data =~ /\x00/ and $raw_v2 == 2 || $raw_v2 == 0
1039 36 0 0 $raw_v2 == 2 and exists $$info{$$hash{$id}}
1074 36 0 0 $ver == 2 and $$info{$key}
36 0 0 $ver == 2 and $$info{$key} and not ref $$info{$key}
36 0 0 $ver == 2 and ref $$info{$key} eq 'ARRAY'
1162 0 0 0 defined $o and defined $chk[$o]
0 0 0 defined $o and defined $chk[$o] and $ielement eq $chk[$o]
1232 4 2 0 $$v2h{'major_version'} == 2 and $$v2h{'compression'}
1302 24 0 12 $$v2h{'major_version'} == 4 and $id3v2_4_frame_size_broken == 0
24 12 0 $$v2h{'major_version'} == 4 and $id3v2_4_frame_size_broken == 0 and (($bytes[0] | $bytes[1] | $bytes[2] | $bytes[3]) & 128) != 0 || $off + $size > $end
1327 24 0 12 $$v2h{'major_version'} == 4 and $id3v2_4_frame_size_broken == 0
24 12 0 $$v2h{'major_version'} == 4 and $id3v2_4_frame_size_broken == 0 and $size > 128 + $hlen
12 0 0 $$v2h{'major_version'} == 4 and $id3v2_4_frame_size_broken == 0 and $size > 128 + $hlen and $off + $size < $end
1450 36 0 0 $$flags{'frame_unsync'} and not $$v2h{'unsync'}
1456 36 0 0 $$flags{'data_len_indicator'} and defined $data_len
1469 12 4 20 $$v2h{'major_version'} == 3 || $$v2h{'major_version'} == 4 and $id =~ /^T/
1475 0 20 0 $encoding eq "\000" || $encoding eq "\cC" and not $bytes =~ /\x00$/
20 0 0 $encoding eq "\cA" || $encoding eq "\cB" and not $bytes =~ /\x00\x00$/
1508 0 0 6 $ver == 0 || $ver == 2 and $v2
1510 6 0 0 $raw == 1 and $ver == 2
1520 0 6 0 $ver == 0 and $$info{'TAGVERSION'}
1570 0 0 6 defined $file and $file ne ''
1645 6 0 0 $off > $tot and not $MP3::Info::try_harder
1683 0 0 6 $$h{'bitrate'} and $$h{'fs'}
1690 0 6 0 ref $vbr eq 'HASH' and $$vbr{'is_vbr'} == 1
1701 6 0 0 $$i{'VBR'} == 1 && $$vbr{'bytes'}
1705 6 0 0 $$i{'VBR'} == 1 && $$vbr{'frames'}
2293 0 0 0 defined $$ape_header{'tag_items'} and $$ape_header{'tag_items'} =~ /^\d+$/

or 2 conditions

line l !l condition
110 0 0 get_mp3tag($file) || {map({$_, undef;} @MP3::Info::v1_tag_names)}
255 0 16 $buf ||= 4194304
256 16 0 $version ||= 1
315 8 8 $return || -1
488 0 14 shift() || 0
489 0 14 shift() || 0
490 0 14 shift() || 0
626 0 0 Encode::Detect::Detector::detect($$info{$key}) || 'iso-8859-1'
873 0 0 Encode::Detect::Detector::detect($data) || 'iso-8859-1'
1633 1944 0 substr($byte, $i, 4) || (last)
1798 6 6 shift() || 4
1910 0 36 $_[1] || 0
2303 0 0 $1 || 'UNKNOWN'

or 3 conditions

line l !l&&r !l&&!r condition
279 0 16 0 $version eq 1 or $version eq 'ALL'
288 0 16 0 $version eq 2 or $version eq 'ALL'
499 0 0 0 $ver == 2 || $ver == 1
546 0 14 0 $ver == 2 or $ver == 0
550 8 0 6 $has_v1 or $has_v2
6 0 0 $has_v1 or $has_v2 or $has_ape
711 0 0 0 $id eq 'RVAD' or $id eq 'RVA'
805 0 0 0 $encoding == 1 or $encoding == 2
850 0 0 36 $encoding eq "\cA" or $encoding eq "\cB"
859 0 0 0 eval { do { &Encode::decode('utf16', $data) } } || &Encode::decode('utf16le', $data)
931 0 0 6 $encoding eq "\cA" or $encoding eq "\cB"
1013 0 0 0 $raw_v2 == 2 || $raw_v2 == 0
1055 0 0 0 $encoding eq "\cA" or $encoding eq "\cB"
1302 0 0 12 (($bytes[0] | $bytes[1] | $bytes[2] | $bytes[3]) & 128) != 0 || $off + $size > $end
1337 0 0 0 $morebytes =~ /^([A-Z0-9]{4})/ || $morebytes =~ /^\x00{4}/
1363 0 0 0 $morebytes =~ /^([A-Z0-9]{4})/ or $morebytes =~ /^\x00{4}/
0 0 0 $morebytes =~ /^([A-Z0-9]{4})/ or $morebytes =~ /^\x00{4}/ or $off + $retrysize > $end
1469 12 12 12 $$v2h{'major_version'} == 3 || $$v2h{'major_version'} == 4
1475 20 0 0 $encoding eq "\000" || $encoding eq "\cC"
0 0 20 $encoding eq "\cA" || $encoding eq "\cB"
1508 6 0 0 $ver == 0 || $ver == 2
1764 0 0 6 $$h{'bitrate_index'} == 0 || $$h{'version_index'} == 1 || ($$h{'bytes'} & 4292870144) != 4292870144 || !$$h{'fs'} || !$$h{'bitrate'} || $$h{'bitrate_index'} == 15 || !$$h{'layer'} || $$h{'sampling_freq'} == 3 || $$h{'emphasis'} == 2 || !$$h{'bitrate_index'} || ($$h{'bytes'} & 4294901760) == 4294836224 || $$h{'ID'} == 1 && $$h{'layer'} == 3 && $$h{'protection_bit'} == 1
1925 0 0 36 $tag eq 'RIF' or $tag eq 'FOR'