Branch Coverage

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


line true false branch
26 2 7 if (exists $param{'duration_weight'}) { }
28 1 1 unless &looks_like_number($param{'duration_weight'})
34 2 6 if (exists $param{'metric_weight'}) { }
36 1 1 unless &looks_like_number($param{'metric_weight'})
42 3 4 if (exists $param{'octave_adjust'}) { }
44 1 2 unless &looks_like_number($param{'octave_adjust'})
50 5 1 if (exists $param{'tensions'}) { }
52 2 3 unless defined $param{'tensions'} and ref $param{'tensions'} eq 'HASH'
55 1 30 unless exists $param{'tensions'}{$i}
86 1 3 unless defined $p1
87 1 2 unless $p1 =~ /^-?[0-9]+$/
96 3 4 if not defined $duration && &looks_like_number($duration) or $duration <= 0
102 1 3 if (ref $input eq 'ARRAY') { }
2 1 elsif (&looks_like_number($input)) { }
119 2 5 unless defined $f1 and defined $f2
120 2 1 if not &looks_like_number($f1) && &looks_like_number($f2) or $f1 < 0 or $f2 < 0
132 2 5 if not defined $b && &looks_like_number($b) or $b <= 0 or not defined $v or not &looks_like_number($v) or $v <= 0
146 3 34 unless defined $p1 and defined $p2
147 2 32 unless $p1 =~ /^-?[0-9]+$/ and $p2 =~ /^-?[0-9]+$/
155 4 28 $octave > 0 ? :
156 1 31 if $tension < 0
166 2 5 unless defined $pset and ref $pset eq 'ARRAY'
168 1 4 if @$pset < 2
174 8 4 if ($pcs[$i] < $pcs[0])
186 8 4 if $t < $min
187 6 6 if $t > $max
191 3 1 wantarray ? :