Branch Coverage

blib/lib/Music/Tension/Cope.pm
Criterion Covered Total %
branch 38 54 70.3


line true false branch
30 1 1 if (exists $param{'duration_weight'}) { }
32 0 1 unless &looks_like_number($param{'duration_weight'})
38 1 1 if (exists $param{'metric_weight'}) { }
40 0 1 unless &looks_like_number($param{'metric_weight'})
46 1 1 if (exists $param{'octave_adjust'}) { }
48 0 1 unless &looks_like_number($param{'octave_adjust'})
54 1 1 if (exists $param{'tensions'}) { }
55 0 1 if ref $param{'tensions'} ne 'HASH'
58 0 12 unless exists $param{'tensions'}{$i}
89 0 2 unless defined $p1
90 0 2 unless $p1 =~ /^-?\d+$/
99 0 3 if not &looks_like_number($duration) or $duration <= 0
104 1 2 if (ref $input eq 'ARRAY') { }
2 0 elsif (&looks_like_number($input)) { }
121 0 1 unless defined $f1 and defined $f2
122 0 1 if not &looks_like_number($f1) && &looks_like_number($f2) or $f1 < 0 or $f2 < 0
134 0 5 if not &looks_like_number($b) or $b <= 0 or not &looks_like_number($v) or $v <= 0
146 0 22 unless defined $p1 and defined $p2
147 0 22 unless $p1 =~ /^-?\d+$/ and $p2 =~ /^-?\d+$/
155 4 18 $octave > 0 ? :
156 1 21 if $tension < 0
166 0 4 unless ref $pset eq 'ARRAY'
167 0 4 if @$pset < 2
172 8 4 if ($pcs[$i] < $pcs[0])
184 8 4 if $t < $min
185 6 6 if $t > $max
189 3 1 wantarray ? :