Branch Coverage

blib/lib/Math/Algebra/Symbols/Sum.pm
Criterion Covered Total %
branch 342 484 70.6


line true false branch
48 96 701 unless $a
64 0 66 unless @_
66 48 18 if wantarray
79 59 10011 unless scalar @_
83 102282 38228 if (exists $z->{'t'}{$s}) { }
85 3863 98419 if ($a->c == 0) { }
160 1546 2476 if scalar keys %{$$a{'t'};} == 1
204 75 454 if $a->{'id'} == $zero->{'id'}
219 3917 747 unless defined $b
220 564 183 unless defined $a
237 1057 1758 if defined $m
239 160 1598 if $A->{'id'} == $zero->{'id'} or $B->{'id'} == $one->{'id'}
240 95 1503 if $B->{'id'} == $zero->{'id'} or $A->{'id'} == $one->{'id'}
248 6010 1061 unless $d
249 725 336 if ($d->{'id'} == $B->{'id'})
258 5327 136 unless $d
259 1 135 if ($d->{'id'} == $A->{'id'})
267 725 6346 unless $aa
269 1 105919 unless $bb
271 102728 3191 if $m
279 195 47 if $a{'s'} and $b{'s'} and $a{'s'}{'id'} == $b{'s'}{'id'}
280 2996 195 unless $s
283 1668 1523 if $a{'d'} or $b{'d'}
286 0 4 $a{'e'} ? :
4 3187 if $a{'e'} xor $b{'e'}
288 2923 0 if ($a{'e'} and $b{'e'})
291 857 2066 if defined $e
292 2821 102 unless defined $e
295 0 0 $a{'l'} ? :
0 3191 if $a{'l'} xor $b{'l'}
296 0 0 if $a{'l'} and $b{'l'}
302 102 3089 if defined $e
303 0 3191 unless $a
305 2996 195 unless $s
306 195 2996 if $s
328 0 351 if $B->{'id'} == $zero->{'id'}
329 0 351 if $A->{'id'} == $zero->{'id'}
330 43 308 if $B->{'id'} == $one->{'id'}
331 0 308 if $B->{'id'} == $mOne->{'id'}
335 106 202 if (defined $a and defined $b) { }
55 147 elsif ($b) { }
337 93 13 if $c
346 16 85 unless $c
358 20 294 if $d
359 294 20 unless $d
385 0 8 unless $s =~ /^[a-z]+$/i
386 2 6 unless ref $w
394 2 24 if defined $t{'s'}
395 1 25 if defined $t{'d'}
396 0 26 if defined $t{'e'}
397 0 26 if defined $t{'l'}
398 13 13 if $n
427 592 958 unless $d
429 675 283 if (++$c{$s} > $N)
434 91 85 unless $N
444 112 12 unless $p < 0
446 10 2 if not defined $v{$v} or $v{$v} < $p
449 91 9 unless scalar keys %v
480 0 0 unless $S
481 0 0 unless $St
484 0 0 if $T{'s'} or $T{'d'} or $T{'e'} or $T{'l'}
490 0 0 unless scalar @s > 1
494 0 0 unless $d > 1
506 0 0 if $F->{$f} > 1
511 0 0 if ($s->{'s'}->isOne) { }
542 91 17 unless scalar @s > 0
560 10 7 if scalar @n
577 0 17 unless $ns < 5
581 0 17 if ($ns == 1) { }
11 6 elsif ($ns == 2) { }
4 2 elsif ($ns == 3) { }
2 0 elsif ($ns == 4) { }
655 0 1 unless $N > 0
657 1 1 if $N == 1
658 0 1 unless $N % 2 == 0
673 0 17 unless scalar @x > 0
675 1 16 if scalar @x == 1 and ref $x[0] eq 'ARRAY'
678 51 5 if (not ref $x) { }
5 0 elsif (ref $x eq 'Math::Algebra::Symbols::Sum') { }
679 0 51 unless $x =~ /^[a-z]+$/i
682 0 5 unless $t
683 0 5 unless scalar @b == 1
684 0 5 unless $p == 1
702 51 8 if exists $x{$v}
713 26 18 if $p > $n
714 26 18 if not defined $N or $p < $N
717 1 16 if $N
718 1 16 if $N
723 26 18 if $t->vp($x) > 0
726 0 17 if $n == 0
727 0 17 if $n > 4 and $c > 1
728 0 17 if $n > 2 and $c > 1
731 8 9 if ($n == 1 or $c == 1)
734 9 8 if $t->vp($x) == 0
740 7 1 if $n == 1
743 0 1 unless $p
749 9 0 if ($n == 2)
778 0 352 if $b->{'id'} == $zero->{'id'}
779 291 61 if $b->{'id'} == $two->{'id'}
780 4 57 if $b->{'id'} == $one->{'id'}
781 0 57 if $b->{'id'} == $mOne->{'id'}
782 0 57 if $b->{'id'} == $half->{'id'}
783 0 57 if $b->{'id'} == $mHalf->{'id'}
786 0 57 unless $T
789 0 57 if $t{'s'} or $t{'d'} or $t{'e'} or $t{'l'}
792 0 57 unless $t->i == 0
795 0 57 unless $d == 1 or $d == 2
797 0 57 if $d == 2
799 0 57 if $p < 0
823 139 56 if (defined $b) { }
824 136 3 if (not ref $b) { }
3 0 elsif (ref $b eq 'Math::Algebra::Symbols::Sum') { }
825 0 136 unless $b =~ /^[a-z]+$/i
828 0 3 unless $t
829 0 3 unless scalar @b == 1
830 0 3 unless $p == 1
843 56 0 if $n == 0
844 0 56 if $n == 1
846 0 0 if $n > 1 and exists $b{$v}
848 0 56 unless $i == 1
860 5 253 if $S
861 10 248 if $D
862 120 138 if $E
863 0 258 if $L
871 128 130 if ($p != 0)
873 1 127 if $S
874 1 127 if $D
875 0 128 if $E
876 0 128 if $L
885 5 253 if ($S)
887 0 5 if $D
888 0 5 if $E
889 0 5 if $L
897 10 248 if ($D)
899 0 10 if $S
900 6 4 if $E
901 0 10 if $L
909 120 138 if ($E)
911 0 120 if $S
912 6 114 if $D
914 0 120 if $L
922 0 258 if ($L)
924 0 0 if $S
925 0 0 if $D
926 0 0 if $E
970 0 32 unless scalar @_
971 0 32 unless scalar keys %{$_[0]{'t'};}
990 15 44 unless $V{$v}
992 30 14 $V{$v} < $p ? :
996 0 0 unless defined $s and defined $S and $S->id eq $s->id
997 0 0 unless defined $d and defined $D and $D->id eq $d->id
998 2 2 unless defined $e and defined $E and $E->id eq $e->id
999 0 0 unless defined $l and defined $L and $L->id eq $l->id
1000 15 73 unless defined $C and $C == $t->c
1001 88 0 unless defined $D and $D == $t->d
1002 8 80 unless defined $I and $I == $t->i
1005 24 8 if defined $C
1006 32 0 if defined $D
1007 30 2 if defined $I
1009 0 32 if defined $s
1010 0 32 if defined $d
1011 0 32 if defined $e
1012 0 32 if defined $l
1026 148 160 if ($N > $n)
1049 16 64 unless $np >= $nq
1054 14 2 if $p->isZero->{'id'} == $zero->{'id'}
1073 61 6 unless defined $d
1085 2 14 if $dP->id == $dQ->id
1111 1 31 if defined $S or defined $E or defined $L
1114 30 1 if (defined $D)
1120 0 60 if defined $S or defined $D or defined $E or defined $L
1132 0 19 if scalar keys %{$v{$_};} == 1
1134 1 14 unless scalar keys %v
1139 12 2 if defined $r
1140 2 0 if defined $r
1155 62 78 if (defined $s)
1157 26 36 if defined $r
1177 27 521 if $r
1178 521 27 unless $r
1180 11 473 if scalar @r == 0
1195 1 0 if (defined $s)
1197 0 1 if defined $r
1214 120 16 if (defined $s)
1216 23 97 if defined $r
1234 125 16 if (defined $s)
1236 23 102 if defined $r
1267 0 34 if $x->{'id'} == $zero->{'id'}
1287 0 34 if $x->{'id'} == $zero->{'id'}
1319 0 51 unless ref $b eq 'Math::Algebra::Symbols::Sum'
1361 0 163 unless ref $A eq 'Math::Algebra::Symbols::Sum'
1364 154 174 if $a->i == 1
1380 0 164 unless ref $A eq 'Math::Algebra::Symbols::Sum'
1383 177 156 if $a->i == 0
1425 0 78 unless $t->{'z'}
1462 958 0 exists $t->{'z'} ? :
1475 0 84 unless $t->{'id'}
1489 0 0 unless $t->{'z'}
1509 0 10089 if exists $t->{'z'}
1512 5928 4161 if defined $z{$p}
1549 66147 10089 if defined $t->{'s'}
1554 9911 178 if $s
1573 178 9911 if $s eq ''
1625 0 0 unless $n > $p
1660 0 45 if exists $p{'sum'}
1675 0 45 if keys %p
1731 13 269 unless defined $b
1732 57 212 unless ref $b eq 'Math::Algebra::Symbols::Sum'
1733 0 269 unless $a->{'z'} and $b->{'z'}
1749 244 0 if (defined $b) { }
1750 117 127 unless ref $b eq 'Math::Algebra::Symbols::Sum'
1751 0 244 unless $a->{'z'} and $b->{'z'}
1752 83 161 if $c
1753 161 0 unless $c
1756 0 0 unless $a->{'z'}
1771 121 295 unless ref $b eq 'Math::Algebra::Symbols::Sum'
1772 0 416 unless $a->{'z'} and $b->{'z'}
1786 102 65 unless ref $b eq 'Math::Algebra::Symbols::Sum'
1787 0 167 unless $a->{'z'} and $b->{'z'}
1788 24 143 if $c
1789 143 0 unless $c
1802 173 0 unless ref $b eq 'Math::Algebra::Symbols::Sum'
1803 0 173 unless $a->{'z'} and $b->{'z'}
1817 66 193 unless ref $b eq 'Math::Algebra::Symbols::Sum'
1818 0 259 unless $a->{'z'} and $b->{'z'}
1820 201 58 if $a->{'id'} == $b->{'id'}
1824 49 9 if $c->isZero->{'id'} == $zero->{'id'}
1855 25 2 if "$a" eq $b
1872 0 7 unless $a->{'z'}
1887 0 66147 unless $a->{'z'}
1901 0 55 unless $a->{'z'}
1915 0 22 unless $a->{'z'}
1929 0 87 unless $a->{'z'}
1943 0 92 unless $a->{'z'}
1957 0 0 unless $a->{'z'}
1971 0 1 unless $a->{'z'}
1985 1 13 unless ref $b eq 'Math::Algebra::Symbols::Sum'
1986 0 14 unless $a->{'z'} and $b->{'z'}
2000 2 9 unless ref $b eq 'Math::Algebra::Symbols::Sum'
2001 0 11 unless $a->{'z'} and $b->{'z'}
2015 0 9 unless $a->{'z'}
2029 0 26 unless $a->{'z'}
2043 0 10 unless $a->{'z'}