Branch Coverage

blib/lib/Math/RPN.pm
Criterion Covered Total %
branch 140 180 77.7


line true false branch
25 20 776 if ($_ eq '{') { }
19 757 elsif ($_ eq '}') { }
26 1 19 if ($inbrace)
40 1 18 unless ($inbrace)
54 90 667 if ($inbrace)
59 13 654 if ($_ eq '+' or $_ eq 'ADD') { }
15 639 elsif ($_ eq '++' or $_ eq 'INCR') { }
3 636 elsif ($_ eq '-' or $_ eq 'SUB') { }
15 621 elsif ($_ eq '--' or $_ eq 'DECR') { }
42 579 elsif ($_ eq '*' or $_ eq 'MUL') { }
15 564 elsif ($_ eq '/' or $_ eq 'DIV') { }
3 561 elsif ($_ eq '%' or $_ eq 'MOD') { }
3 558 elsif ($_ eq 'POW') { }
3 555 elsif ($_ eq 'SQRT') { }
3 552 elsif ($_ eq 'ABS') { }
6 546 elsif ($_ eq '&' or $_ eq 'AND') { }
6 540 elsif ($_ eq '|' or $_ eq 'OR') { }
24 516 elsif ($_ eq 'XOR') { }
6 510 elsif ($_ eq '!' or $_ eq 'NOT') { }
9 501 elsif ($_ eq '~') { }
3 498 elsif ($_ eq 'SIN') { }
3 495 elsif ($_ eq 'COS') { }
3 492 elsif ($_ eq 'TAN') { }
3 489 elsif ($_ eq 'LOG') { }
3 486 elsif ($_ eq 'EXP') { }
3 483 elsif ($_ eq 'INT') { }
6 477 elsif ($_ eq '<' or $_ eq 'LT') { }
9 468 elsif ($_ eq '<=' or $_ eq 'LE') { }
0 468 elsif ($_ eq '=' or $_ eq '==' or $_ eq 'EQ') { }
9 459 elsif ($_ eq '>=' or $_ eq 'GT') { }
3 456 elsif ($_ eq '>' or $_ eq 'GE') { }
6 450 elsif ($_ eq '!=' or $_ eq 'NE') { }
36 414 elsif ($_ eq 'IF') { }
9 405 elsif ($_ eq 'DUP') { }
6 399 elsif ($_ eq 'EXCH') { }
6 393 elsif ($_ eq 'POP') { }
9 384 elsif ($_ eq 'MIN') { }
15 369 elsif ($_ eq 'MAX') { }
1 368 elsif ($_ eq 'TIME') { }
1 367 elsif ($_ eq 'RAND') { }
1 366 elsif ($_ eq 'LRAND') { }
60 1 12 unless (stackcheck(2, \@stack, \@completed, $_, \@ops))
67 0 15 unless (stackcheck(1, \@stack, \@completed, $_, \@ops))
74 0 3 unless (stackcheck(2, \@stack, \@completed, $_, \@ops))
83 0 15 unless (stackcheck(1, \@stack, \@completed, $_, \@ops))
90 0 42 unless (stackcheck(2, \@stack, \@completed, $_, \@ops))
97 0 15 unless (stackcheck(2, \@stack, \@completed, $_, \@ops))
106 0 3 unless (stackcheck(2, \@stack, \@completed, $_, \@ops))
115 0 3 unless (stackcheck(2, \@stack, \@completed, $_, \@ops))
124 0 3 unless (stackcheck(1, \@stack, \@completed, $_, \@ops))
131 0 3 unless (stackcheck(1, \@stack, \@completed, $_, \@ops))
138 0 6 unless (stackcheck(2, \@stack, \@completed, $_, \@ops))
147 0 6 unless (stackcheck(2, \@stack, \@completed, $_, \@ops))
154 0 24 unless (stackcheck(2, \@stack, \@completed, $_, \@ops))
161 0 6 unless (stackcheck(1, \@stack, \@completed, $_, \@ops))
168 0 9 unless (stackcheck(1, \@stack, \@completed, $_, \@ops))
175 0 3 unless (stackcheck(1, \@stack, \@completed, $_, \@ops))
182 0 3 unless (stackcheck(1, \@stack, \@completed, $_, \@ops))
189 0 3 unless (stackcheck(1, \@stack, \@completed, $_, \@ops))
197 0 3 unless (stackcheck(1, \@stack, \@completed, $_, \@ops))
204 0 3 unless (stackcheck(1, \@stack, \@completed, $_, \@ops))
211 0 3 unless (stackcheck(1, \@stack, \@completed, $_, \@ops))
218 0 6 unless (stackcheck(2, \@stack, \@completed, $_, \@ops))
224 3 3 $v2 < $v1 ? :
227 0 9 unless (stackcheck(2, \@stack, \@completed, $_, \@ops))
233 6 3 $v2 <= $v1 ? :
236 0 0 unless (stackcheck(2, \@stack, \@completed, $_, \@ops))
242 0 0 $v2 == $v1 ? :
245 0 9 unless (stackcheck(2, \@stack, \@completed, $_, \@ops))
251 6 3 $v2 > $v1 ? :
254 0 3 unless (stackcheck(2, \@stack, \@completed, $_, \@ops))
260 3 0 $v2 >= $v1 ? :
263 0 6 unless (stackcheck(2, \@stack, \@completed, $_, \@ops))
269 3 3 $v2 != $v1 ? :
272 0 36 unless (stackcheck(3, \@stack, \@completed, $_, \@ops))
279 24 12 $co ? :
280 9 27 if ($ve =~ /,/) { }
290 0 9 unless (stackcheck(1, \@stack, \@completed, $_, \@ops))
298 0 6 unless (stackcheck(2, \@stack, \@completed, $_, \@ops))
307 1 5 unless (stackcheck(1, \@stack, \@completed, $_, \@ops))
314 0 9 unless (stackcheck(2, \@stack, \@completed, $_, \@ops))
320 9 0 $v1 < $v2 ? :
323 0 15 unless (stackcheck(2, \@stack, \@completed, $_, \@ops))
329 6 9 $v1 > $v2 ? :
338 0 1 unless (stackcheck(1, \@stack, \@completed, $_, \@ops))
354 0 144 if (not @stack) { }
1 283 elsif ($#stack > 0 and wantarray == 0) { }
366 54 90 if (wantarray) { }
378 5 0 if (scalar @_ > 1) { }
396 2 297 if (@stack < $required)