Branch Coverage

blib/lib/Music/AtonalUtil.pm
Criterion Covered Total %
branch 294 328 89.6


line true false branch
505 107 139 if $note_count < @$check_set
508 0 246 if @$check_set > @$melody
514 1 1631 if $flag_sort
515 21 1611 if (join($", @$sel_audit) eq join($", @$check_set))
519 306 1305 if ($note_count > @$check_set)
521 8 303 if $i + $count - 1 > $#$melody
528 0 1189 if $flag_sort
529 77 1112 if (join($", @$sel_audit) eq join($", @$check_set))
546 5 3 ref $_[0] eq 'ARRAY' ? :
549 1 7 if @nset < 2
556 7 0 if (@nset > 2)
566 1 6 wantarray ? :
587 3 9 if $bs & 1 << $p
598 100 1 ref $_[0] eq 'ARRAY' ? :
609 1 100 if (exists $params->{'dup_interval_limit'})
611 1 0 if ($icount >= $params->{'dup_interval_limit'})
612 1 0 wantarray ? :
618 3 97 unless $params->{'exclude_interval'}
621 0 97 if not exists $ruleset->{'iset'} or ref $ruleset->{'iset'} ne "ARRAY"
622 0 97 if @{$ruleset->{'iset'};} > @intervals
631 1 96 $ruleset->{'sort'} ? :
633 8 89 if ($ret != 1)
634 8 0 wantarray ? :
644 1 95 unless $params->{$ps_rule}
647 0 108 if not exists $ruleset->{'ps'} or ref $ruleset->{'ps'} ne "ARRAY"
655 104 4 unless $ruleset->{'subsets'}
657 0 8 if $ss_mag >= @{$ruleset->{'ps'};}
660 8 0 if $in_ss < @{$ruleset->{'ps'};}
664 1 7 if $in_ss > @$melody
670 45 42 if $seen_s_pset{join $", @$s_prime}++
674 1 41 if ($ret != 1)
675 1 0 wantarray ? :
684 89 18 if ($ret != 1)
685 89 0 wantarray ? :
692 0 2 if ($rules_applied == 0)
693 0 0 wantarray ? :
695 2 0 wantarray ? :
700 4246 2 ref $_[0] eq 'ARRAY' ? :
701 1 4247 unless @$pset
714 1 1 ref $_[0] eq 'ARRAY' ? :
741 2 0 unless (keys %params)
778 9515 76959 if ($base_pitch == $p)
787 163 871 if $choice < $melody_low
788 145 889 if $choice > $melody_high
792 51 43 if ($melody_low < 0)
798 92 2 if $got_melody != 1
803 0 2 if $@
804 0 2 unless $got_melody
813 26 4 ref $_[0] eq 'ARRAY' ? :
815 1 29 unless @$pset
821 0 29 if (keys %origmap == 1)
822 0 0 wantarray ? :
842 44 43 if ($span < $min_span) { }
1 42 elsif ($span == $min_span) { }
850 29 0 if (@min_span_idx == 1) { }
858 0 29 unless (@normal)
867 28 1 if ($normal[0] != 0)
878 1 28 wantarray ? :
883 5 2 ref $_[0] eq 'ARRAY' ? :
886 1 6 if @nset < 2
904 1 5 wantarray ? :
910 2 2 ref $_[0] eq 'ARRAY' ? :
911 1 3 unless @$iset
926 1 2 ref $_[0] eq 'ARRAY' ? :
927 1 2 unless @$pset
942 2139 2 ref $_[0] eq 'ARRAY' ? :
943 1 2140 unless @$pset
960 2 5 if not defined $pset or ref $pset ne "ARRAY"
964 1 4 unless @$pset
967 1 3 unless &looks_like_number($n)
970 1 2 if $len > $n
979 1 8 unless &looks_like_number($from)
980 1 7 unless &looks_like_number($to)
985 3 4 if ($from > $to)
990 4 3 if ($interval > $self->{'_DEG_IN_SCALE'} / 2)
1002 1 2 ref $_[0] eq 'ARRAY' ? :
1003 1 2 unless @$pset
1020 2 2 if not defined $ref or ref $ref ne "ARRAY"
1028 2 6 if not defined $ref or ref $ref ne "ARRAY"
1029 2 4 if not &looks_like_number($count) or $count < 0
1032 2 2 if @$ref == 0 or $count == 0
1047 2 3 if not defined $ref or ref $ref ne "ARRAY"
1056 2 1 if not defined $ref or ref $ref ne "ARRAY"
1063 2 2 if not defined $ref or ref $ref ne "ARRAY"
1064 1 1 unless &looks_like_number($i)
1072 2 2 if not defined $ref or ref $ref ne "ARRAY"
1083 1 6 if ($self->{'_DEG_IN_SCALE'} < 2)
1087 2 4 if (exists $param{'lastn'}) { }
1089 1 1 unless &looks_like_number($param{'lastn'})
1104 4244 2 ref $_[0] eq 'ARRAY' ? :
1106 1 4245 unless @$pset
1112 0 4245 if (keys %origmap == 1)
1113 0 0 wantarray ? :
1132 7236 10377 if ($span < $min_span) { }
1143 9234 elsif ($span == $min_span) { }
1140 4204 582 if (@min_span_idx == 1) { }
1148 41 4204 unless (@normal)
1156 5 4240 wantarray ? :
1164 2 2 ref $_[0] eq 'ARRAY' ? :
1166 1 3 unless @$pset
1177 4 2 ref $_[0] eq 'ARRAY' ? :
1179 1 5 unless @$pset
1186 1 0 ref $_[0] eq 'ARRAY' ? :
1188 0 1 if @$pset < 2
1200 1 3 unless defined $_[0]
1203 1 2 if (ref $_[0] eq 'ARRAY') { }
1 1 elsif ($_[0] =~ /,/) { }
1220 11 45 $pitch > int $self->{'_DEG_IN_SCALE'} / 2 ? :
1228 2119 2 ref $_[0] eq 'ARRAY' ? :
1230 1 2120 unless @$pset
1236 3616 624 if $set->[0] != 0
1241 600 1520 if (join($", @{$forms[0];}) eq join($", @{$forms[1];})) { }
1251 751 2472 if ($sums[0] < $sums[1]) { }
769 1703 elsif ($sums[0] > $sums[1]) { }
1269 1 24 unless &looks_like_number($v)
1270 3 21 if not &looks_like_number($min) && &looks_like_number($max) or $min >= $max
1274 4 17 if $v <= $max and $v >= $min
1277 5 12 if ($v > $max) { }
1288 9 8 if ($register % 2 == 1)
1299 1 2 ref $_[0] eq 'ARRAY' ? :
1301 1 2 unless @$pset
1309 6 4 ref $_[0] eq 'ARRAY' ? :
1311 2 8 unless defined $r and $r =~ /^-?\d+$/
1314 1 7 unless @$pset
1317 1 6 if ($r == 0) { }
1335 3 3 ref $_[0] eq 'ARRAY' ? :
1337 1 5 unless defined $what
1338 1 4 unless @$pset
1343 1 3 if $dir < 0
1346 9 3 unless $pset->[$i] eq $what
1356 4 5 if (defined $dis)
1357 2 2 if not $dis =~ /^\d+$/ or $dis < 2
1367 1 2 ref $_[0] eq 'ARRAY' ? :
1369 1 2 unless @$pset
1377 22 242 if ($j == 0) { }
1391 8 6 ref $_[0] eq 'ARRAY' ? :
1394 1 13 if @nset < 2
1396 12 1 if (defined $len) { }
1397 2 10 if $len >= @nset or $len == 0
1400 1 9 if ($len < 0)
1402 1 0 if $len < 1
1413 1 0 ref $_[0] eq 'ARRAY' ? :
1415 0 1 unless @$pset
1424 16 32 if exists $seen{$p}
1432 0 2 ref $_[0] eq 'ARRAY' ? :
1434 1 1 unless @$pset
1443 12 32 if exists $seen{$p}
1452 3628 3 ref $_[0] eq 'ARRAY' ? :
1454 1 3630 unless defined $t
1455 1 3629 unless @tset
1468 13 4 ref $_[0] eq 'ARRAY' ? :
1470 1 16 unless defined $t
1471 1 15 unless @$pset
1486 1 5 unless ref $pset1 eq "ARRAY"
1487 1 4 unless @$pset1
1488 1 3 unless ref $pset2 eq "ARRAY"
1489 1 2 unless @$pset2
1497 4 8 $count{$p} > 1 ? :
1499 1 1 wantarray ? :
1505 1 5 unless ref $pset1 eq "ARRAY"
1506 1 4 unless @$pset1
1507 1 3 unless ref $pset2 eq "ARRAY"
1508 1 2 unless @$pset2
1514 1 1 join($", @{$ic_vecs[0];}) eq join($", @{$ic_vecs[1];}) ? :