Branch Coverage

blib/lib/Music/Chord/Positions.pm
Criterion Covered Total %
branch 52 76 68.4


line true false branch
52 3 6 unless &$test
62 0 3 if ($$self{'_DEG_IN_SCALE'} < 2)
76 0 4 unless defined $pitch_set and ref $pitch_set eq 'ARRAY'
94 4 8 if (exists $params{'pitch_norm'} and $params{'pitch_norm'})
96 1 3 if ($min_pitch >= $$self{'_DEG_IN_SCALE'})
103 1 3 if (exists $params{'inv_num'})
104 0 1 if not $params{'inv_num'} =~ /^\d+$/ or $params{'inv_num'} < 1 or $params{'inv_num'} > @inversions
116 0 1 unless defined $pitch_set and ref $pitch_set eq 'ARRAY'
125 0 1 exists $params{'interval_adj_max'} && defined $params{'interval_adj_max'} ? :
131 0 1 if (exists $params{'octave_count'}) { }
132 0 0 if $params{'octave_count'} < 2
137 1 0 if (exists $params{'pitch_max'} and $params{'pitch_max'} < 1)
143 1 0 if (exists $params{'voice_count'}) { }
144 0 1 if (@$pitch_set > $params{'voice_count'})
163 1 0 if ($params{'voice_count'} > @ps)
165 0 1 if $doubled_count > 1
175 7 1 unless exists $params{'pitch_max'} and $p > $params{'pitch_max'}
187 0 1 if (exists $params{'root_lock'} and $params{'root_lock'})
200 66 0 unless (exists $params{'no_limit_uniq'} and $params{'no_limit_uniq'})
202 22 44 if keys %harmeq < $unique_pitch_count
204 44 0 unless (exists $params{'no_limit_doublings'} and $params{'no_limit_doublings'})
207 22 54 if $harmeq{$k} > 1
214 2 61 if $intervals[-1] > $params{'interval_adj_max'}
216 61 0 if @chord > 2
222 20 0 if (@chord > 2 and exists $params{'no_partial_closed'} and $params{'no_partial_closed'})
226 4 16 if ($intervals[0] < 5 and $intervals[1] > 6)
230 2 14 if ($intervals[-1] < 5 and $intervals[-2] > 6)
238 3 11 if ($ordered_intv[0] > $ordered_intv[-1] and all sub { $intv_by_idx{$ordered_intv[0]} > 1 + $intv_by_idx{$_}; } , @ordered_intv[1 .. $#ordered_intv])
246 0 11 unless (exists $params{'allow_transpositions'} and $params{'allow_transpositions'})
248 0 0 if $seen_intervals{"@intervals"}++
256 38 43 if ($voice_iters[$i] > $voice_max[$i])
261 27 0 unless (exists $params{'root_any'} and $params{'root_any'})
265 1 3 if $voice_iters[0] > $voice_max[0]
271 38 43 if ($voice_iters[$i] > $voice_max[$i])
283 0 2 unless ref $$pitch_sets[0] eq 'ARRAY'
286 1 1 if @$pitch_sets < 2
300 1 3 if (defined $dis)
301 0 1 if not defined $dis && $dis =~ /^\d+$/ or $dis < 2