Branch Coverage

blib/lib/JE/Object/Number.pm
Criterion Covered Total %
branch 52 68 76.4


line true false branch
63 242 11 defined blessed($val) && $val->can('to_number') ? :
101 15 1 defined $_[0] ? :
184 3 12 unless $self->class eq 'Number'
193 12 0 if not defined $radix or $radix->id eq 'undef'
197 0 0 if ($radix = $radix->to_number->value) == 10 or $radix < 2 or $radix > 36 or $radix =~ /\./
201 0 0 if ($radix == 2) { }
0 0 elsif ($radix == 8) { }
0 0 elsif ($radix == 16) { }
237 3 0 unless $self->class eq 'Number'
263 3 202 unless $self->class eq 'Number'
273 1 201 ref $self eq 'JE::Number' ? :
290 3 10 unless $self->class eq 'Number'
299 8 2 if (defined $places) { }
304 0 10 if $places < 0
310 1 9 unless $num == $num
312 1 8 if abs $num >= 1e+21
322 2 6 if ((my $sprintfed = sprintf('%.' . ($places + 1) . 'f', $num)) =~ /5\z/)
326 2 0 $upper - $num <= $num - $lower ? :
347 3 15 unless $self->class eq 'Number'
356 1 14 unless $num == $num
357 2 12 if abs $num == 9**9**9
361 6 6 if (defined $places) { }
367 0 12 if $places < 0
374 3 9 if ((my $sprintfed = sprintf('%.' . ($places + 1) . 'e', $num)) =~ /5e/)
378 3 0 $upper - $num <= $num - $lower ? :
405 3 15 unless $self->class eq 'Number'
414 1 14 unless $num == $num
415 2 12 if abs $num == 9**9**9
419 2 10 if (not defined $prec or $prec->id eq 'undef')
427 0 10 if $prec < 1
436 2 8 if ($num == 0) { }
437 1 1 unless $prec == 1
442 3 5 if ($e < -6 or $e >= $prec) { }
445 3 0 unless $num =~ /\./