Branch Coverage

blib/lib/Math/Symbolic/Operator.pm
Criterion Covered Total %
branch 152 196 77.5


line true false branch
385 2979 6255 if (@_ and not ref $_[0] eq 'HASH')
388 0 2979 unless defined $type
392 0 2979 if grep((!defined($_)), @$operands)
396 5557 46 ref($_) =~ /^Math::Symbolic/ ? :
410 564 5691 if @_
416 5608 647 if (ref $proto)
422 5608 647 ref $proto ? :
429 10092 6 ref($_) =~ /^Math::Symbolic/ ? :
459 0 21334 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) { }
506 88 224 $op1 ? :
88 224 $op1 ? :
166 146 $op2 ? :
166 146 $op2 ? :
518 23 11 if (not defined $op_str) { }
524 3 8 $is_op1 ? :
3 8 $is_op1 ? :
583 68 1518 unless $dont_clone
591 963 623 if ($self->arity == 2) { }
623 0 elsif ($self->arity == 1) { }
598 70 893 if ($self->is_simple_constant)
602 17 876 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 508 351 if ($tt1 == 1 or $tt2 == 1) { }
188 163 elsif ($type == 2) { }
672 279 229 $tt1 == 1 ? :
673 279 229 $tt1 == 1 ? :
676 19 489 if ($type == 0)
677 4 15 if $const->value == 0
681 4 485 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 248 239 if ($type == 2) { }
31 208 elsif ($type == 3) { }
698 1 247 if $const->value == 1
699 20 227 if $const->value == 0
702 20 207 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 313 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 188 if ($tt2 == 1) { }
0 188 elsif ($tt1 == 1) { }
7 186 elsif ($tt1 == 0 and $tt2 == 2) { }
752 30 753 if ($type == 0)
760 89 5 if ($this->term_type == 0) { }
5 0 elsif ($this->term_type == 2) { }
762 17 72 if ($t == 0) { }
0 72 elsif ($t == 1) { }
0 72 elsif ($t == 4) { }
62 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 62 if ($tl == 2 and $tr == 1) { }
1 61 elsif ($tr == 2 and $tl == 1) { }
832 0 6 unless ($num)
834 5 1 if ($num == 1)
843 1 0 $num < 0 ? :
849 0 30 if defined $const and $const != 0
851 30 0 unless defined $const
858 4 26 if defined $const
860 2 70 unless defined $ops[$out]
863 73 141 if $in == $out or not defined $ops[$in]
864 2 139 if ($ops[$out]->is_identical($ops[$in]))
869 68 2 if (not $identical) { }
880 30 0 if (@newops) { }
893 181 442 if ($type == 4)
894 2 179 if ($tt == 1) { }
172 7 elsif ($tt == 0) { }
899 3 169 if ($inner_type == 4) { }
7 162 elsif ($inner_type == 1) { }
919 156 0 if @{$_[0]{'operands'};} >= 1
924 70 0 if @{$_[0]{'operands'};} >= 2
946 4669 95 @_ == 1 ? :
952 4757 7 if (ref $application ne 'CODE') { }
959 8703 2 defined $v ? :
966 2 4755 if $@
967 0 4755 if $op_type == 3 and $_[1] == 0
969 0 4755 if $@
970 0 4755 unless defined $result
1008 3829 840 @_ == 1 ? :
1011 1 4668 unless defined $applied