Branch Coverage

blib/lib/Math/Symbolic/Custom/Equation.pm
Criterion Covered Total %
branch 113 210 53.8


line true false branch
111 0 39 if (ref $proto and not defined $LHS) { }
118 14 0 if (not defined $RHS and ref $LHS eq "" and $LHS =~ /=/)
122 15 24 unless ref($LHS) =~ /^Math::Symbolic/
123 15 24 unless ref($RHS) =~ /^Math::Symbolic/
141 0 153 if (defined $t)
142 0 0 unless ref($t) =~ /^Math::Symbolic/
143 0 0 if (defined $t) { }
163 0 131 if (defined $t)
164 0 0 unless ref($t) =~ /^Math::Symbolic/
165 0 0 if (defined $t) { }
187 0 68 unless (defined $LHS and defined $RHS)
217 2 31 unless defined $epsilon
222 0 33 unless (defined $LHS and defined $RHS)
229 0 33 if (ref($LHS_val) =~ /Math::Symbolic::Operator/)
232 0 33 if (ref($LHS_val) =~ /Math::Symbolic::Constant/)
237 0 33 if (ref($RHS_val) =~ /Math::Symbolic::Operator/)
240 0 33 if (ref($RHS_val) =~ /Math::Symbolic::Constant/)
244 0 33 unless (defined $LHS_val and defined $RHS_val)
265 0 0 unless (defined $LHS and defined $RHS)
273 0 0 if (defined $new_LHS and defined $new_RHS)
294 0 0 unless (defined $LHS and defined $RHS)
302 0 0 if (defined $new_LHS and defined $new_RHS)
316 0 0 unless (defined $LHS and defined $RHS)
321 0 0 unless ref($t1) =~ /^Math::Symbolic/
323 0 0 unless (defined $t1)
330 0 0 if (scalar @got_eq == 0)
339 0 0 if (defined $new_LHS and defined $new_RHS)
358 0 0 if (ref $t eq ref $self) { }
370 0 0 unless ref($t) =~ /^Math::Symbolic/
390 0 0 if (ref $t eq ref $self) { }
402 0 0 unless ref($t) =~ /^Math::Symbolic/
423 0 0 unless ref($t) =~ /^Math::Symbolic/
443 0 0 unless ref($t) =~ /^Math::Symbolic/
467 0 0 unless (defined $LHS and defined $RHS)
495 0 23 unless (defined $LHS and defined $RHS)
539 0 22 unless (defined $expr)
542 0 0 if (scalar @v == 1) { }
549 0 0 wantarray ? :
553 22 0 unless ref($expr) =~ /^Math::Symbolic/
557 0 22 if (ref $expr ne "Math::Symbolic::Variable")
559 0 0 wantarray ? :
562 22 0 unless ($autodetected)
567 0 22 if (scalar @r == 0)
570 0 0 wantarray ? :
577 3 19 if ($expr->is_identical($self->LHS))
578 3 0 if (wantarray) { }
597 22 548 if scalar @todo == 0
615 526 259 unless (exists $nodes_done{$new_node} or exists $nodes_todo{$new_node})
618 332 41 unless ($hash->{$new_node}{'operation'} =~ /Factor/ or $hash->{$new_node}{'operation'} =~ /Collect/)
621 19 313 if ($expr->is_identical($hash->{$new_node}{'LHS'}))
626 17 315 if ($expr->is_identical($hash->{$new_node}{'RHS'}))
631 36 296 if (defined $object)
634 21 15 if (scalar @r == 0)
646 0 548 unless (wantarray)
647 0 0 if (scalar @matches)
659 22 0 if (scalar @matches)
660 22 0 if (wantarray) { }
671 0 0 wantarray ? :
682 97 451 if ($LHS->to_string ne $node->{'LHS'}->to_string)
687 127 421 if ($RHS->to_string ne $node->{'RHS'}->to_string)
692 35 513 if ($LHS->to_string ne $node->{'LHS'}->to_string and $RHS->to_string ne $node->{'RHS'}->to_string)
709 116 432 if ($LHS->to_string ne $node->{'LHS'}->to_string)
714 134 414 if ($RHS->to_string ne $node->{'RHS'}->to_string)
719 41 507 if ($LHS->to_string ne $node->{'LHS'}->to_string and $RHS->to_string ne $node->{'RHS'}->to_string)
736 439 109 if ($t->term_type == 0)
738 153 286 if ($t->type == 3) { }
86 200 elsif ($t->type == 1) { }
148 52 elsif ($t->type == 2) { }
15 37 elsif ($t->type == 0) { }
37 0 elsif ($t->type == 7) { }
742 153 0 unless (exists $new_nodes{$eq_str})
750 86 0 unless (exists $new_nodes{$eq_str})
755 148 0 unless ($t->op2->term_type == 1 and $t->op2->value == 0)
759 148 0 unless (exists $new_nodes{$eq_str})
763 148 0 unless ($t->op1->term_type == 1 and $t->op1->value == 0)
767 148 0 unless (exists $new_nodes{$eq_str})
776 15 0 unless (exists $new_nodes{$eq_str})
782 15 0 unless (exists $new_nodes{$eq_str})
789 33 4 if ($t->op2->to_string eq '0.5' or $t->op2->to_string eq '1 / 2') { }
4 0 elsif ($t->op2->to_string eq '2') { }
793 33 0 unless (exists $new_nodes{$eq_str})
801 4 0 unless (exists $new_nodes{$eq_str1})
806 4 0 unless (exists $new_nodes{$eq_str2})
815 393 155 if ($t->term_type == 0)
817 101 292 if ($t->type == 3) { }
31 261 elsif ($t->type == 1) { }
183 78 elsif ($t->type == 2) { }
53 25 elsif ($t->type == 0) { }
25 0 elsif ($t->type == 7) { }
821 101 0 unless (exists $new_nodes{$eq_str})
829 29 2 unless (exists $new_nodes{$eq_str})
834 183 0 unless ($t->op2->term_type == 1 and $t->op2->value == 0)
838 183 0 unless (exists $new_nodes{$eq_str})
842 183 0 unless ($t->op1->term_type == 1 and $t->op1->value == 0)
846 183 0 unless (exists $new_nodes{$eq_str})
855 51 2 unless (exists $new_nodes{$eq_str})
861 53 0 unless (exists $new_nodes{$eq_str})
868 16 9 if ($t->op2->to_string eq '0.5' or $t->op2->to_string eq '1 / 2') { }
9 0 elsif ($t->op2->to_string eq '2') { }
872 16 0 unless (exists $new_nodes{$eq_str})
880 9 0 unless (exists $new_nodes{$eq_str1})
885 9 0 unless (exists $new_nodes{$eq_str2})
930 20 52 if $depth > $hr->{'depth'}
932 22 50 if ($node->term_type == 1) { }
18 32 elsif ($node->term_type == 2) { }