Branch Coverage

blib/lib/Math/JS.pm
Criterion Covered Total %
branch 148 210 70.4


line true false branch
10 0 5 if (not $@ and $Math::Ryu::VERSION >= "0.06")
68 1484 0 if not ref $_[0] and $_[0] eq "Math::JS"
72 1 1483 unless $ok
74 0 1483 if ($ok == 1)
86 0 20 if @_ > 3
90 0 20 unless $ok
95 16 4 if $ok == 1
102 0 12 if @_ > 3
106 0 12 unless $ok
111 0 12 if $ok == 1
118 0 3 if @_ > 3
122 0 3 unless $ok
128 0 3 if ($ok == 1)
132 1 2 if $third_arg
139 0 9 if @_ > 3
143 0 9 unless $ok
148 0 9 if ($ok == 1) { }
1 8 elsif ($third_arg) { }
161 1 1 $num < 0 ? :
2 7 if ($den == 0) { }
168 0 115 if @_ > 3
172 0 115 unless $ok
177 32 83 if ($ok == 1) { }
29 54 elsif ($third_arg) { }
190 3 110 if _infnan($num) or _isnan($den) or $den == 0
192 4 106 if _isinf($den) or $num == 0
199 0 5 if @_ > 3
203 0 5 unless $ok
209 0 5 if ($ok == 1)
210 0 0 if ($third_arg)
212 0 0 if $_[1]{'val'} < 0 and $val0 != int $val0
217 0 0 if $val0 < 0 and $_[1]{'val'} != int $_[1]{'val'}
221 1 4 if $third_arg
228 0 36 if @_ > 3
232 0 36 unless $ok
236 17 19 if $_[0]{'type'} eq "number"
240 32 4 if ($ok == 1)
243 15 17 if $_[1]{'type'} eq "number"
250 0 4 if $ok == 4
259 0 32 if @_ > 3
263 0 32 unless $ok
267 17 15 if $_[0]{'type'} eq "number"
271 28 4 if ($ok == 1)
274 15 13 if $_[1]{'type'} eq "number"
281 0 4 if $ok == 4
290 0 41 if @_ > 3
294 0 41 unless $ok
298 17 24 if $_[0]{'type'} eq "number"
302 37 4 if ($ok == 1)
305 15 22 if $_[1]{'type'} eq "number"
312 0 4 if $ok == 4
321 0 21 if @_ > 3
326 8 13 if $_[0]{'type'} eq "number"
328 4 17 if $val > 2147483647
353 111 235 if ($_[0]{'type'} eq 'sint32') { }
0 235 elsif ($_[0]{'type'} eq 'uint32') { }
2 233 elsif (_isinf($val)) { }
1 232 elsif (_isnan($val)) { }
21 211 elsif ($val < 1e+21 and $val == int $val) { }
356 1 1 $val > 0 ? :
377 0 103 if @_ > 3
382 3 100 unless defined $cmp
383 100 0 if $cmp >= 0
389 0 103 if @_ > 3
393 3 100 unless defined $cmp
394 100 0 if $cmp <= 0
400 0 541 if @_ > 3
405 1 540 unless defined $cmp
406 540 0 if $cmp == 0
412 0 3 if @_ > 3
417 3 0 unless defined $cmp
418 0 0 if $cmp == 0
424 0 3 if @_ > 3
429 3 0 unless defined $cmp
430 0 0 if $cmp > 0
436 0 3 if @_ > 3
441 3 0 unless defined $cmp
442 0 0 if $cmp < 0
448 0 756 if @_ > 3
452 0 756 unless $ok
456 76 680 if ($ok == 1)
458 0 76 if ($third_arg)
466 6 674 if ($third_arg)
474 0 103 if @_ > 3
478 16 87 if $_[1] < 0 and $shift
482 10 93 if $_[0]{'type'} eq "number"
499 0 254 if @_ > 3
503 16 238 if $_[1] < 0 and $shift
508 89 165 if ($type eq "number")
514 143 111 if ($type eq "uint32" or $type eq "sint32" and $val < 0)
530 0 115 unless @_ == 2
534 0 115 unless ref $_[0] eq "Math::JS"
538 0 115 unless is_ok($_[1]) > 1
542 37 78 if $_[1] < 0 and $shift
547 113 2 if ($type eq "number")
568 87 229 if _infnan($big)
571 1 228 if $integer <= 4294967295 and $integer >= '-2147483648'
574 108 120 if ($big < 0)
589 222 2550 if $ret < 2
591 503 2047 if $val != int $val
592 227 1820 if $val > 4294967295 or $val < '-2147483648'
593 82 1738 if $val >= 2147483648
600 61 342 if $val == $inf or $val == -$inf or $val != $val
606 6 344 if $val != $val
612 5 340 if abs $val == "Inf"