Branch Coverage

blib/lib/Math/Algebra/Symbols/Sum.pm
Criterion Covered Total %
branch 340 482 70.5


line true false branch
78 96 701 unless $a
94 0 66 unless @_
96 48 18 if wantarray
109 59 10011 unless scalar @_
113 107926 38631 if (exists $z->{'t'}{$s}) { }
115 3484 104442 if ($a->c == 0) { }
190 1546 2476 if scalar keys %{$$a{'t'};} == 1
234 75 454 if $a->{'id'} == $zero->{'id'}
249 3917 747 unless defined $b
250 564 183 unless defined $a
267 1057 1758 if defined $m
269 160 1598 if $A->{'id'} == $zero->{'id'} or $B->{'id'} == $one->{'id'}
270 95 1503 if $B->{'id'} == $zero->{'id'} or $A->{'id'} == $one->{'id'}
278 6027 1061 unless $d
279 725 336 if ($d->{'id'} == $B->{'id'})
288 5421 136 unless $d
289 1 135 if ($d->{'id'} == $A->{'id'})
297 725 6363 unless $aa
299 1 111270 unless $bb
301 108079 3191 if $m
309 195 47 if $a{'s'} and $b{'s'} and $a{'s'}{'id'} == $b{'s'}{'id'}
310 2996 195 unless $s
313 1668 1523 if $a{'d'} or $b{'d'}
316 0 4 $a{'e'} ? :
4 3187 if $a{'e'} xor $b{'e'}
318 2923 0 if ($a{'e'} and $b{'e'})
321 857 2066 if defined $e
322 2821 102 unless defined $e
325 0 0 $a{'l'} ? :
0 3191 if $a{'l'} xor $b{'l'}
326 0 0 if $a{'l'} and $b{'l'}
332 102 3089 if defined $e
333 0 3191 unless $a
335 2996 195 unless $s
336 195 2996 if $s
358 0 351 if $B->{'id'} == $zero->{'id'}
359 0 351 if $A->{'id'} == $zero->{'id'}
360 43 308 if $B->{'id'} == $one->{'id'}
361 0 308 if $B->{'id'} == $mOne->{'id'}
365 106 202 if (defined $a and defined $b) { }
55 147 elsif ($b) { }
367 93 13 if $c
376 16 85 unless $c
388 20 294 if $d
389 294 20 unless $d
415 0 8 unless $s =~ /^[a-z]+$/i
416 2 6 unless ref $w
424 2 24 if defined $t{'s'}
425 1 25 if defined $t{'d'}
426 0 26 if defined $t{'e'}
427 0 26 if defined $t{'l'}
428 13 13 if $n
457 592 958 unless $d
459 675 283 if (++$c{$s} > $N)
464 91 85 unless $N
474 112 12 unless $p < 0
476 10 2 if not defined $v{$v} or $v{$v} < $p
479 91 9 unless scalar keys %v
510 0 0 unless $S
511 0 0 unless $St
514 0 0 if $T{'s'} or $T{'d'} or $T{'e'} or $T{'l'}
520 0 0 unless scalar @s > 1
524 0 0 unless $d > 1
536 0 0 if $F->{$f} > 1
541 0 0 if ($s->{'s'}->isOne) { }
572 91 17 unless scalar @s > 0
590 10 7 if scalar @n
612 0 17 if ($ns == 1) { }
11 6 elsif ($ns == 2) { }
4 2 elsif ($ns == 3) { }
2 0 elsif ($ns == 4) { }
695 0 1 unless $N > 0
697 1 1 if $N == 1
698 0 1 unless $N % 2 == 0
713 0 17 unless scalar @x > 0
715 1 16 if scalar @x == 1 and ref $x[0] eq 'ARRAY'
718 51 5 if (not ref $x) { }
5 0 elsif (ref $x eq 'Math::Algebra::Symbols::Sum') { }
719 0 51 unless $x =~ /^[a-z]+$/i
722 0 5 unless $t
723 0 5 unless scalar @b == 1
724 0 5 unless $p == 1
742 51 8 if exists $x{$v}
753 26 18 if $p > $n
754 26 18 if not defined $N or $p < $N
757 1 16 if $N
758 1 16 if $N
763 26 18 if $t->vp($x) > 0
766 0 17 if $n == 0
767 0 17 if $n > 4 and $c > 1
768 0 17 if $n > 2 and $c > 1
771 8 9 if ($n == 1 or $c == 1)
774 9 8 if $t->vp($x) == 0
780 7 1 if $n == 1
783 0 1 unless $p
789 9 0 if ($n == 2)
818 0 352 if $b->{'id'} == $zero->{'id'}
819 291 61 if $b->{'id'} == $two->{'id'}
820 4 57 if $b->{'id'} == $one->{'id'}
821 0 57 if $b->{'id'} == $mOne->{'id'}
822 0 57 if $b->{'id'} == $half->{'id'}
823 0 57 if $b->{'id'} == $mHalf->{'id'}
826 0 57 unless $T
829 0 57 if $t{'s'} or $t{'d'} or $t{'e'} or $t{'l'}
832 0 57 unless $t->i == 0
835 0 57 unless $d == 1 or $d == 2
837 0 57 if $d == 2
839 0 57 if $p < 0
863 139 56 if (defined $b) { }
864 136 3 if (not ref $b) { }
3 0 elsif (ref $b eq 'Math::Algebra::Symbols::Sum') { }
865 0 136 unless $b =~ /^[a-z]+$/i
868 0 3 unless $t
869 0 3 unless scalar @b == 1
870 0 3 unless $p == 1
883 56 0 if $n == 0
884 0 56 if $n == 1
886 0 0 if $n > 1 and exists $b{$v}
888 0 56 unless $i == 1
900 5 253 if $S
901 10 248 if $D
902 120 138 if $E
903 0 258 if $L
911 128 130 if ($p != 0)
913 1 127 if $S
914 1 127 if $D
915 0 128 if $E
916 0 128 if $L
925 5 253 if ($S)
927 0 5 if $D
928 0 5 if $E
929 0 5 if $L
937 10 248 if ($D)
939 0 10 if $S
940 6 4 if $E
941 0 10 if $L
949 120 138 if ($E)
951 0 120 if $S
952 6 114 if $D
954 0 120 if $L
962 0 258 if ($L)
964 0 0 if $S
965 0 0 if $D
966 0 0 if $E
1010 0 32 unless scalar @_
1011 0 32 unless scalar keys %{$_[0]{'t'};}
1030 10 49 unless $V{$v}
1032 36 13 $V{$v} < $p ? :
1036 0 0 unless defined $s and defined $S and $S->id eq $s->id
1037 0 0 unless defined $d and defined $D and $D->id eq $d->id
1038 2 0 unless defined $e and defined $E and $E->id eq $e->id
1039 0 0 unless defined $l and defined $L and $L->id eq $l->id
1040 15 73 unless defined $C and $C == $t->c
1041 88 0 unless defined $D and $D == $t->d
1042 8 80 unless defined $I and $I == $t->i
1045 24 8 if defined $C
1046 32 0 if defined $D
1047 30 2 if defined $I
1049 0 32 if defined $s
1050 0 32 if defined $d
1051 0 32 if defined $e
1052 0 32 if defined $l
1066 148 160 if ($N > $n)
1089 16 64 unless $np >= $nq
1094 14 2 if $p->isZero->{'id'} == $zero->{'id'}
1113 61 6 unless defined $d
1125 2 14 if $dP->id == $dQ->id
1151 1 31 if defined $S or defined $E or defined $L
1154 30 1 if (defined $D)
1160 0 60 if defined $S or defined $D or defined $E or defined $L
1172 0 19 if scalar keys %{$v{$_};} == 1
1174 1 14 unless scalar keys %v
1179 12 2 if defined $r
1180 2 0 if defined $r
1195 62 78 if (defined $s)
1197 26 36 if defined $r
1217 27 521 if $r
1218 521 27 unless $r
1220 11 473 if scalar @r == 0
1235 1 0 if (defined $s)
1237 0 1 if defined $r
1254 120 16 if (defined $s)
1256 23 97 if defined $r
1274 125 16 if (defined $s)
1276 23 102 if defined $r
1307 0 34 if $x->{'id'} == $zero->{'id'}
1327 0 34 if $x->{'id'} == $zero->{'id'}
1359 0 51 unless ref $b eq 'Math::Algebra::Symbols::Sum'
1401 0 163 unless ref $A eq 'Math::Algebra::Symbols::Sum'
1404 154 174 if $a->i == 1
1420 0 164 unless ref $A eq 'Math::Algebra::Symbols::Sum'
1423 177 156 if $a->i == 0
1465 0 78 unless $t->{'z'}
1502 958 0 exists $t->{'z'} ? :
1515 0 80 unless $t->{'id'}
1529 0 0 unless $t->{'z'}
1544 0 10089 if exists $t->{'z'}
1547 5924 4165 if defined $z{$p}
1584 66147 10089 if defined $t->{'s'}
1589 9911 178 if $s
1608 178 9911 if $s eq ''
1641 0 0 unless $n > $p
1676 0 45 if exists $p{'sum'}
1691 0 45 if keys %p
1747 13 269 unless defined $b
1748 57 212 unless ref $b eq 'Math::Algebra::Symbols::Sum'
1749 0 269 unless $a->{'z'} and $b->{'z'}
1765 244 0 if (defined $b) { }
1766 117 127 unless ref $b eq 'Math::Algebra::Symbols::Sum'
1767 0 244 unless $a->{'z'} and $b->{'z'}
1768 83 161 if $c
1769 161 0 unless $c
1772 0 0 unless $a->{'z'}
1787 121 295 unless ref $b eq 'Math::Algebra::Symbols::Sum'
1788 0 416 unless $a->{'z'} and $b->{'z'}
1802 102 65 unless ref $b eq 'Math::Algebra::Symbols::Sum'
1803 0 167 unless $a->{'z'} and $b->{'z'}
1804 24 143 if $c
1805 143 0 unless $c
1818 173 0 unless ref $b eq 'Math::Algebra::Symbols::Sum'
1819 0 173 unless $a->{'z'} and $b->{'z'}
1833 66 193 unless ref $b eq 'Math::Algebra::Symbols::Sum'
1834 0 259 unless $a->{'z'} and $b->{'z'}
1836 201 58 if $a->{'id'} == $b->{'id'}
1840 49 9 if $c->isZero->{'id'} == $zero->{'id'}
1871 25 2 if "$a" eq $b
1888 0 7 unless $a->{'z'}
1903 0 66147 unless $a->{'z'}
1917 0 55 unless $a->{'z'}
1931 0 22 unless $a->{'z'}
1945 0 87 unless $a->{'z'}
1959 0 92 unless $a->{'z'}
1973 0 0 unless $a->{'z'}
1987 0 1 unless $a->{'z'}
2001 1 13 unless ref $b eq 'Math::Algebra::Symbols::Sum'
2002 0 14 unless $a->{'z'} and $b->{'z'}
2016 2 9 unless ref $b eq 'Math::Algebra::Symbols::Sum'
2017 0 11 unless $a->{'z'} and $b->{'z'}
2031 0 9 unless $a->{'z'}
2045 0 26 unless $a->{'z'}
2059 0 10 unless $a->{'z'}