Branch Coverage

blib/lib/Math/Symbolic/Operator.pm
Criterion Covered Total %
branch 154 194 79.3


line true false branch
385 2991 6260 if (@_ and not ref $_[0] eq "HASH")
388 0 2991 unless defined $type
392 0 2991 if grep((!defined($_)), @$operands)
398 5581 46 ref($_) =~ /^Math::Symbolic/ ? :
410 564 5696 if @_
416 5613 647 if (ref $proto)
422 5613 647 ref $proto ? :
431 10102 6 ref($_) =~ /^Math::Symbolic/ ? :
459 0 21559 if @_
473 357 169 unless defined $string_type and $string_type eq "prefix"
479 169 357 if ($string_type eq 'prefix') { }
494 323 34 if ($op->{'arity'} == 2) { }
34 0 elsif ($op->{'arity'} == 1) { }
498 11 312 if (not defined $op_str) { }
512 88 224 $op1 ? :
88 224 $op1 ? :
166 146 $op2 ? :
166 146 $op2 ? :
518 23 11 if (not defined $op_str) { }
526 3 8 $is_op1 ? :
3 8 $is_op1 ? :
583 69 1524 unless $dont_clone
591 970 623 if ($self->arity == 2) { }
623 0 elsif ($self->arity == 1) { }
598 71 899 if ($self->is_simple_constant)
602 17 882 if ($o1->is_identical($o2))
603 12 5 if ($type == 2) { }
5 0 elsif ($type == 0) { }
0 0 elsif ($type == 3) { }
0 0 elsif ($type == 1) { }
612 0 0 if $o2->term_type == 1 and $o2->value == 0 || $o2->special eq 'zero'
624 0 231 if ($tt2 == 1 and $tt1 == 0 and $type == 7 and $o2->value == 0)
633 6 199 if ($tt2 == 1 and $type == 7 and $o2->value == 1 || $o2->special eq 'one')
641 11 214 if ($tt2 == 1 and $tt1 == 0 and $type == 7 and $o1->type == 7)
671 511 354 if ($tt1 == 1 or $tt2 == 1) { }
190 164 elsif ($type == 2) { }
672 282 229 $tt1 == 1 ? :
673 282 229 $tt1 == 1 ? :
676 20 491 if ($type == 0)
677 4 16 if $const->value == 0
681 4 487 if ($type == 1)
682 2 2 unless ($constant_first)
684 0 2 if $value == 0
687 0 2 if ($constant_first and $const->value == 0)
697 250 239 if ($type == 2) { }
31 208 elsif ($type == 3) { }
698 1 249 if $const->value == 1
699 20 229 if $const->value == 0
702 20 209 if ($not_c->term_type == 0 and $not_c->type == 2 and $not_c->op1->term_type == 1 || $not_c->op2->term_type == 1) { }
7 315 elsif ($not_c->term_type == 0 and $not_c->type == 3 and $not_c->op1->term_type == 1) { }
707 10 10 $not_c->op1->term_type == 1 ? :
729 0 31 if not $constant_first and $const->value == 1
732 0 31 if not $constant_first and $const->value == 0
735 0 31 if $const->value == 0
741 0 190 if ($tt2 == 1) { }
0 190 elsif ($tt1 == 1) { }
7 190 elsif ($tt1 == 0 and $tt2 == 2) { }
752 31 757 if ($type == 0)
760 92 6 if ($this->term_type == 0) { }
5 1 elsif ($this->term_type == 2) { }
762 18 74 if ($t == 0) { }
0 74 elsif ($t == 1) { }
0 74 elsif ($t == 4) { }
64 10 elsif ($t == 2) { }
773 0 0 if ($tt == 2) { }
0 0 elsif ($tt == 1) { }
781 0 0 if ($ti == 4) { }
0 0 elsif ($ti == 0) { }
0 0 elsif ($ti == 1) { }
807 0 64 if ($tl == 2 and $tr == 1) { }
2 62 elsif ($tr == 2 and $tl == 1) { }
832 0 7 unless ($num)
834 5 2 if ($num == 1)
843 1 1 $num < 0 ? :
850 30 1 if ($const == 0) { }
863 5 26 if defined $const
865 2 72 unless defined $ops[$out]
868 75 143 if $in == $out or not defined $ops[$in]
869 2 141 if ($ops[$out]->is_identical($ops[$in]))
874 70 2 if (not $identical) { }
885 31 0 if (@newops) { }
898 181 442 if ($type == 4)
899 2 179 if ($tt == 1) { }
172 7 elsif ($tt == 0) { }
904 3 169 if ($inner_type == 4) { }
7 162 elsif ($inner_type == 1) { }
924 156 0 if @{$_[0]{'operands'};} >= 1
929 70 0 if @{$_[0]{'operands'};} >= 2
951 4849 96 @_ == 1 ? :
957 4938 7 if (ref $application ne 'CODE') { }
964 9065 2 defined $v ? :
971 2 4936 if $@
972 0 4936 if $op_type == 3 and $_[1] == 0
974 0 4936 if $@
975 0 4936 unless defined $result
1013 3969 880 @_ == 1 ? :
1016 1 4848 unless defined $applied