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
259 0 0 16 defined $file and $file ne ''
377 0 0 5 defined $file and $file ne ''
410 0 0 5 $info{'TRACKNUM'} =~ /^\d+$/ and $info{'TRACKNUM'} > 0
0 0 5 $info{'TRACKNUM'} =~ /^\d+$/ and $info{'TRACKNUM'} > 0 and $info{'TRACKNUM'} < 256
435 0 0 5 $info{'GENRE'} && exists $MP3::Info::mp3_genres{$info{'GENRE'}}
502 0 0 14 defined $file and $file ne ''
540 14 0 0 $ver == 1 and not $has_v1
557 14 0 0 $raw and $ver == 2
573 0 14 0 keys %info and not defined $info{'GENRE'}
588 0 6 8 defined $tag and $tag =~ /^TAG/
677 6 0 0 $v2->{'TXXX'} and ref $v2->{'TXXX'} ne 'ARRAY'
684 6 0 0 ref $v2->{'COMM'} eq 'ARRAY' and grep {/Media Jukebox/;} @{$$v2{'COMM'};}
779 0 0 0 $pic and $id eq 'PIC'
0 0 0 $pic and $id eq 'APIC'
815 0 0 0 $valid_pic and $pic_format
819 0 0 0 length $data and $pic_format
871 0 36 0 $data and not $data =~ /^[\x00-\x7F]+$/
905 0 0 0 /^(..)$/ && !/(\xFF\xFE)/
909 0 0 0 /^(..)$/ && !/(\xFF\xFE)/
915 0 0 0 /^(..)$/ && !/(\x00\x00)/
917 0 0 0 chr($_) =~ /[[:ascii:]]/ && chr($_) =~ /[[:print:]]/
926 0 0 24 $id =~ /^T...?$/ and $id ne 'TXXX'
988 6 0 0 $name and $name ne "\000"
995 0 6 0 $data and ref $data eq 'ARRAY'
6 0 0 $data and ref $data eq 'ARRAY' and scalar @$data == 1
1015 24 0 0 $data =~ /\x00/ and $raw_v2 == 2 || $raw_v2 == 0
1041 36 0 0 $raw_v2 == 2 and exists $$info{$hash->{$id}}
1076 36 0 0 $ver == 2 and $info->{$key}
0 0 0 $ver == 2 and $info->{$key} and not ref $info->{$key}
36 0 0 $ver == 2 and ref $info->{$key} eq 'ARRAY'
1164 0 0 0 defined $o and defined $chk[$o]
0 0 0 defined $o and defined $chk[$o] and $ielement eq $chk[$o]
1234 4 2 0 $v2h->{'major_version'} == 2 and $v2h->{'compression'}
1304 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
1329 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
1452 36 0 0 $flags->{'frame_unsync'} and not $v2h->{'unsync'}
1458 36 0 0 $flags->{'data_len_indicator'} and defined $data_len
1471 12 4 20 $v2h->{'major_version'} == 3 || $v2h->{'major_version'} == 4 and $id =~ /^T/
1477 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$/
1510 0 0 6 $ver == 0 || $ver == 2 and $v2
1512 6 0 0 $raw == 1 and $ver == 2
1522 0 6 0 $ver == 0 and $info->{'TAGVERSION'}
1572 0 0 6 defined $file and $file ne ''
1647 6 0 0 $off > $tot and not $MP3::Info::try_harder
1685 0 0 6 $h->{'bitrate'} and $h->{'fs'}
1692 0 6 0 ref $vbr eq 'HASH' and $vbr->{'is_vbr'} == 1
1703 6 0 0 $i->{'VBR'} == 1 && $vbr->{'bytes'}
1709 6 0 0 $i->{'VBR'} == 1 && $vbr->{'frames'}
2295 0 0 0 defined $ape_header->{'tag_items'} and $ape_header->{'tag_items'} =~ /^\d+$/

or 2 conditions

line l !l condition
111 0 0 get_mp3tag($file) || {map({$_, undef;} @MP3::Info::v1_tag_names)}
256 0 16 $buf ||= 4194304
257 16 0 $version ||= 1
316 8 8 $return || -1
489 0 14 shift() || 0
490 0 14 shift() || 0
491 0 14 shift() || 0
627 0 0 Encode::Detect::Detector::detect($info->{$key}) || 'iso-8859-1'
875 0 0 Encode::Detect::Detector::detect($data) || 'iso-8859-1'
1635 1944 0 substr($byte, $i, 4) || (last)
1800 6 6 shift() || 4
1912 0 36 $_[1] || 0
2305 0 0 $1 || 'UNKNOWN'

or 3 conditions

line l !l&&r !l&&!r condition
280 0 16 0 $version eq 1 or $version eq 'ALL'
289 0 16 0 $version eq 2 or $version eq 'ALL'
500 0 0 0 $ver == 2 || $ver == 1
547 0 14 0 $ver == 2 or $ver == 0
551 8 6 0 $has_v1 or $has_v2
6 0 0 $has_v1 or $has_v2 or $has_ape
713 0 0 0 $id eq 'RVAD' or $id eq 'RVA'
807 0 0 0 $encoding == 1 or $encoding == 2
852 0 0 36 $encoding eq "\cA" or $encoding eq "\cB"
861 0 0 0 eval { do { &Encode::decode('utf16', $data) } } || &Encode::decode('utf16le', $data)
933 0 0 6 $encoding eq "\cA" or $encoding eq "\cB"
1015 0 0 0 $raw_v2 == 2 || $raw_v2 == 0
1057 0 0 0 $encoding eq "\cA" or $encoding eq "\cB"
1304 0 0 12 (($bytes[0] | $bytes[1] | $bytes[2] | $bytes[3]) & 128) != 0 || $off + $size > $end
1339 0 0 0 $morebytes =~ /^([A-Z0-9]{4})/ || $morebytes =~ /^\x00{4}/
1365 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
1471 12 12 12 $v2h->{'major_version'} == 3 || $v2h->{'major_version'} == 4
1477 20 0 0 $encoding eq "\000" || $encoding eq "\cC"
0 0 20 $encoding eq "\cA" || $encoding eq "\cB"
1510 6 0 0 $ver == 0 || $ver == 2
1788 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
1927 0 0 36 $tag eq 'RIF' or $tag eq 'FOR'