Branch Coverage

blib/lib/Math/PlanePath/SierpinskiTriangle.pm
Criterion Covered Total %
branch 61 130 46.9


line true false branch
106 0 0 $self->{'align'} eq 'left' || $self->{'align'} eq 'triangular' && $self->{'parts'} ne 'right' ? :
116 0 0 $self->{'align'} eq 'left' || $self->{'align'} eq 'triangular' && ($self->{'parts'} || 'all') eq 'left' ? :
125 0 0 $self->{'align'} eq 'right' && $self->{'parts'} eq 'right' ? :
133 0 0 $self->{'align'} eq 'diagonal' ? :
140 0 0 $self->{'align'} eq 'diagonal' ? :
144 0 0 $self->{'align'} eq 'diagonal' ? :
169 0 0 $self->{'align'} eq 'diagonal' ? :
175 0 0 $self->{'align'} eq 'diagonal' ? :
182 0 0 $self->{'align'} eq 'diagonal' ? :
188 0 0 $self->{'align'} eq 'diagonal' ? :
202 13 10 unless (defined $self->{'n_start'})
208 0 23 unless ($align_known{$align})
229 0 360 if (2 * $frac >= 1) { }
0 360 elsif (2 * $frac < -1) { }
241 30 330 if ($n < 0)
244 25 305 if ($n == 0)
248 0 305 unless my($depthbits, $ndepth) = _n0_to_depthbits($n, $self->{'parts'})
262 529 230 if $_
271 30 275 if ($self->{'align'} eq 'left') { }
10 265 elsif ($self->{'align'} eq 'diagonal') { }
188 77 elsif ($self->{'align'} eq 'triangular') { }
291 17 5319 if ($self->{'align'} eq 'diagonal') { }
513 4806 elsif ($self->{'align'} eq 'left') { }
4293 513 elsif ($self->{'align'} eq 'triangular') { }
297 2120 2173 if (_divrem_mutate($x, 2))
311 812 1614 unless ($x >= 0 and $x <= $y and $y >= 0)
315 0 1614 if (is_infinite($y))
328 2747 1569 if ($depthbits[$i]) { }
332 624 945 if ($xbits[$i])
353 0 19 if ($y1 > $y2)
357 9 10 if ($x1 > $x2)
362 0 19 if ($self->{'align'} eq 'diagonal')
367 0 19 if ($y2 < 0)
370 0 19 if ($y1 < 0)
409 0 0 if ($n < 0)
412 0 0 if ($n == 0 and $self->{'parts'} ne 'all')
416 0 0 unless my($depthbits, $ndepth) = _n0_to_depthbits($n, $self->{'parts'})
419 0 0 unless (shift @$depthbits)
432 0 0 if (_divrem_mutate($n, 2) != $repbit)
444 0 44 if ($n < 0)
447 0 44 if ($n == 0 and $self->{'parts'} ne 'all')
451 0 44 unless my($depthbits, $ndepth, $nwidth) = _n0_to_depthbits($n, $self->{'parts'})
456 24 20 if (shift @$depthbits) { }
462 8 8 if ($n % 2 != $repbit)
477 0 44 unless my($x, $y) = $self->n_to_xy($n)
480 11 33 if ($self->{'align'} eq 'diagonal')
482 5 6 if (defined $n_parent) { }
491 15 18 if (defined $n_parent)
501 0 0 if ($n < 0)
504 0 0 unless my($depthbits) = _n0_to_depthbits($n, $self->{'parts'})
510 38 0 $depth >= 0 ? :
593 0 0 if ($n < 0)
596 0 0 unless my($depthbits, $ndepth) = _n0_to_depthbits($n, $self->{'parts'})
603 0 0 unless ($depthbits->[$i] ^= 1)
604 0 0 if ((shift @nbits || 0) != $target)
649 0 0 if ($n < 0)
652 0 0 unless my($depthbits, $ndepth) = _n0_to_depthbits($n, $self->{'parts'})
663 0 0 if (shift @$depthbits)
665 0 0 if ($ret)
679 0 0 if (_divrem_mutate($n, 2) != $repbit)
696 0 349 if (is_infinite($n))
699 4 345 if ($n == 0)
703 345 0 $parts eq 'all' ? :
710 345 0 $parts eq 'all' ? :
717 240 254 if ($n >= $ndepth + $nwidth) { }