Branch Coverage

blib/lib/SVG/Sparkline/Utils.pm
Criterion Covered Total %
branch 58 64 90.6


line true false branch
16 30 3003 if $val eq '-0'
24 8 68 if ($args->{'width'}) { }
71 6 59 if $desc->{'min'} > 0
72 8 57 if $desc->{'max'} < 0
81 6 74 if 'ARRAY' eq ref $array->[0]
90 11 63 if $desc->{'ymin'} > 0
91 10 64 if $desc->{'ymax'} < 0
113 4 30 unless 'ARRAY' eq ref $p and 2 == @{$p;}
114 0 30 if $p->[0] < $desc->{'xmin'}
115 0 30 if $p->[0] > $desc->{'xmax'}
116 4 26 if $p->[1] < $desc->{'ymin'}
117 8 22 if $p->[1] > $desc->{'ymax'}
120 0 2 if $desc->{'ymin'} > 0
121 0 2 if $desc->{'ymax'} < 0
140 8 164 if (exists $args->{'bgcolor'})
155 5 160 unless exists $args->{$name}
156 8 152 unless 'ARRAY' eq ref $args->{$name}
157 5 147 unless @{$args->{$name};}
164 3 11 if $index eq 'first'
165 2 9 if $index eq 'last'
166 3 6 if not $index =~ /\D/ and $index < @{$values;}
167 4 2 if ('high' eq $index) { }
2 0 elsif ('low' eq $index) { }
173 8 8 if $values->[$i][1] > $high
183 4 4 if $values->[$i][0] < $low
194 9 42 if $index eq 'first'
195 9 33 if $index eq 'last'
196 15 18 if not $index =~ /\D/ and $index < @{$values;}
197 9 9 if ('high' eq $index) { }
9 0 elsif ('low' eq $index) { }
203 15 39 if $values->[$i] > $high
213 18 36 if $values->[$i] < $low