Branch Coverage

blib/lib/Math/Algebra/Symbols/Sum.pm
Criterion Covered Total %
branch 329 484 67.9


line true false branch
49 90 607 unless $a
64 0 60 unless @_
67 44 16 if wantarray
79 59 9781 unless scalar @_
84 8525 17915 if (exists $$z{'t'}{$s}) { }
86 1499 7021 if ($a->c == 0) { }
161 1622 3138 if scalar keys %{$$a{'t'};} == 1
205 70 405 if $$a{'id'} == $$zero{'id'}
220 5291 735 unless defined $b
221 484 251 unless defined $a
238 1018 1336 if defined $m
240 159 1177 if $$A{'id'} == $$zero{'id'} or $$B{'id'} == $$one{'id'}
241 82 1095 if $$B{'id'} == $$zero{'id'} or $$A{'id'} == $$one{'id'}
249 1730 1184 unless $d
250 756 428 if ($$d{'id'} == $$B{'id'})
259 1567 134 unless $d
260 1 133 if ($$d{'id'} == $$A{'id'})
267 756 2158 unless $aa
269 1 5835 unless $bb
272 1976 3859 if $m
280 35 13 if $a{'s'} and $b{'s'} and $a{'s'}{'id'} == $b{'s'}{'id'}
281 3824 35 unless $s
284 2202 1657 if $a{'d'} or $b{'d'}
287 0 4 $a{'e'} ? :
4 3855 if $a{'e'} xor $b{'e'}
289 3783 76 if ($a{'e'} and $b{'e'})
292 999 2784 if defined $e
293 3683 100 unless defined $e
296 0 0 $a{'l'} ? :
0 3859 if $a{'l'} xor $b{'l'}
297 0 3859 if $a{'l'} and $b{'l'}
303 100 3759 if defined $e
304 0 3859 unless $a
306 3824 35 unless $s
307 35 3824 if $s
329 0 314 if $$B{'id'} == $$zero{'id'}
330 0 314 if $$A{'id'} == $$zero{'id'}
331 35 279 if $$B{'id'} == $$one{'id'}
332 0 279 if $$B{'id'} == $$mOne{'id'}
336 87 192 if (defined $a and defined $b) { }
54 138 elsif ($b) { }
338 81 6 if $c
347 15 85 unless $c
359 18 274 if $d
360 274 18 unless $d
386 0 8 unless $s =~ /^[a-z]+$/i
387 2 6 unless ref $w
395 2 24 if defined $t{'s'}
396 1 25 if defined $t{'d'}
397 0 26 if defined $t{'e'}
398 0 26 if defined $t{'l'}
399 13 13 if $n
428 633 1094 unless $d
430 713 381 if (++$c{$s} > $N)
435 76 82 unless $N
445 146 10 unless $p < 0
447 9 1 if not defined $v{$v} or $v{$v} < $p
450 76 9 unless scalar keys %v
481 0 0 unless $S
482 0 0 unless $St
485 0 0 if $T{'s'} or $T{'d'} or $T{'e'} or $T{'l'}
491 0 0 unless scalar @s > 1
495 0 0 unless $d > 1
506 0 0 if $$F{$f} > 1
513 0 0 if ($$s{'s'}->isOne) { }
548 76 10 unless scalar @s > 0
566 6 4 if scalar @n
583 0 10 unless $ns < 5
587 0 10 if ($ns == 1) { }
6 4 elsif ($ns == 2) { }
3 1 elsif ($ns == 3) { }
1 0 elsif ($ns == 4) { }
661 0 0 unless $N > 0
662 0 0 if $N == 1
664 0 0 unless $N % 2 == 0
679 0 17 unless scalar @x > 0
681 1 16 if scalar @x == 1 and ref $x[0] eq 'ARRAY'
683 0 51 unless $x =~ /^[a-z]+$/i
684 51 5 if (not ref $x) { }
5 0 elsif (ref $x eq 'Math::Algebra::Symbols::Sum') { }
688 0 5 unless $t
689 0 5 unless scalar @b == 1
690 0 5 unless $p == 1
707 44 0 if exists $x{$v}
719 24 18 if $p > $n
720 25 17 if not defined $N or $p < $N
723 0 16 if $N
724 0 16 if $N
728 25 17 if $t->vp($x) > 0
732 0 16 if $n == 0
733 0 16 if $n > 4 and $c > 1
734 0 16 if $n > 2 and $c > 1
737 7 9 if ($n == 1 or $c == 1)
739 8 7 if $t->vp($x) == 0
746 7 0 if $n == 1
749 0 0 unless $p
755 9 0 if ($n == 2)
784 0 287 if $$b{'id'} == $$zero{'id'}
785 240 47 if $$b{'id'} == $$two{'id'}
786 4 43 if $$b{'id'} == $$one{'id'}
787 0 43 if $$b{'id'} == $$mOne{'id'}
788 0 43 if $$b{'id'} == $$half{'id'}
789 0 43 if $$b{'id'} == $$mHalf{'id'}
792 0 43 unless $T
795 0 43 if $t{'s'} or $t{'d'} or $t{'e'} or $t{'l'}
798 0 43 unless $t->i == 0
801 0 43 unless $d == 1 or $d == 2
803 0 43 if $d == 2
805 0 43 if $p < 0
829 0 129 unless $b =~ /^[a-z]+$/i
132 52 if (defined $b) { }
830 129 3 if (not ref $b) { }
3 0 elsif (ref $b eq 'Math::Algebra::Symbols::Sum') { }
834 0 3 unless $t
835 0 3 unless scalar @b == 1
836 0 3 unless $p == 1
849 52 0 if $n == 0
850 0 52 if $n == 1
851 0 208 if $n > 1 and exists $b{$v}
854 0 52 unless $i == 1
866 0 243 if $S
867 8 235 if $D
868 120 123 if $E
869 0 243 if $L
877 121 122 if ($p != 0)
879 0 121 if $S
880 0 121 if $D
881 0 121 if $E
882 0 121 if $L
891 0 243 if ($S)
893 0 0 if $D
894 0 0 if $E
895 0 0 if $L
903 8 235 if ($D)
905 0 8 if $S
906 6 2 if $E
907 0 8 if $L
915 120 123 if ($E)
917 0 120 if $S
918 6 114 if $D
920 0 120 if $L
928 0 243 if ($L)
930 0 0 if $S
931 0 0 if $D
932 0 0 if $E
975 0 24 unless scalar @_
977 0 24 unless scalar keys %{$_[0]{'t'};}
995 24 27 unless $V{$v}
998 18 9 $V{$v} < $p ? :
1002 0 0 unless defined $s and defined $S and $S->id eq $s->id
1003 0 0 unless defined $d and defined $D and $D->id eq $d->id
1004 2 0 unless defined $e and defined $E and $E->id eq $e->id
1005 0 0 unless defined $l and defined $L and $L->id eq $l->id
1006 9 66 unless defined $C and $C == $t->c
1007 75 0 unless defined $D and $D == $t->d
1008 7 68 unless defined $I and $I == $t->i
1011 20 4 if defined $C
1012 24 0 if defined $D
1013 22 2 if defined $I
1015 0 24 if defined $s
1016 0 24 if defined $d
1017 0 24 if defined $e
1018 0 24 if defined $l
1032 141 152 if ($N > $n)
1055 10 64 unless $np >= $nq
1060 9 1 if $p->isZero->{'id'} == $$zero{'id'}
1079 54 5 unless defined $d
1091 3 9 if $dP->id == $dQ->id
1117 1 26 if defined $S or defined $E or defined $L
1120 24 2 if (defined $D)
1126 0 48 if defined $S or defined $D or defined $E or defined $L
1138 2 13 if scalar keys %{$v{$_};} == 1
1140 2 11 unless scalar keys %v
1145 8 1 if defined $r
1146 1 0 if defined $r
1161 54 36 if (defined $s)
1163 26 28 if defined $r
1183 27 521 if $r
1184 521 27 unless $r
1186 11 473 if scalar @r == 0
1201 1 0 if (defined $s)
1203 0 1 if defined $r
1220 120 16 if (defined $s)
1222 23 97 if defined $r
1240 125 16 if (defined $s)
1242 23 102 if defined $r
1273 0 34 if $$x{'id'} == $$zero{'id'}
1293 0 34 if $$x{'id'} == $$zero{'id'}
1325 0 35 unless ref $b eq 'Math::Algebra::Symbols::Sum'
1367 0 123 unless ref $A eq 'Math::Algebra::Symbols::Sum'
1369 106 102 if $a->i == 1
1386 0 124 unless ref $A eq 'Math::Algebra::Symbols::Sum'
1388 105 108 if $a->i == 0
1431 0 62 unless $$t{'z'}
1468 1094 0 exists $$t{'z'} ? :
1481 0 61 unless $$t{'id'}
1495 0 0 unless $$t{'z'}
1515 0 9838 if exists $$t{'z'}
1518 6292 3546 if defined $z{$p}
1555 120796 9838 if defined $$t{'s'}
1560 9679 159 if $s
1579 159 9679 if $s eq ''
1631 0 0 unless $n > $p
1666 0 45 if exists $p{'sum'}
1681 0 45 if keys %p
1737 10 175 unless defined $b
1738 43 132 unless ref $b eq 'Math::Algebra::Symbols::Sum'
1739 0 175 unless $$a{'z'} and $$b{'z'}
1755 111 89 unless ref $b eq 'Math::Algebra::Symbols::Sum'
200 0 if (defined $b) { }
1756 0 0 unless $$a{'z'}
1757 0 200 unless $$a{'z'} and $$b{'z'}
1758 77 123 if $c
1759 123 0 unless $c
1777 97 149 unless ref $b eq 'Math::Algebra::Symbols::Sum'
1778 0 246 unless $$a{'z'} and $$b{'z'}
1792 94 52 unless ref $b eq 'Math::Algebra::Symbols::Sum'
1793 0 146 unless $$a{'z'} and $$b{'z'}
1794 18 128 if $c
1795 128 0 unless $c
1808 145 0 unless ref $b eq 'Math::Algebra::Symbols::Sum'
1809 0 145 unless $$a{'z'} and $$b{'z'}
1823 64 179 unless ref $b eq 'Math::Algebra::Symbols::Sum'
1824 0 243 unless $$a{'z'} and $$b{'z'}
1826 191 52 if $$a{'id'} == $$b{'id'}
1830 35 15 if $c->isZero->{'id'} == $$zero{'id'}
1861 24 3 if "$a" eq $b
1878 0 7 unless $$a{'z'}
1893 0 120796 unless $$a{'z'}
1907 0 23 unless $$a{'z'}
1921 0 22 unless $$a{'z'}
1935 0 87 unless $$a{'z'}
1949 0 92 unless $$a{'z'}
1963 0 0 unless $$a{'z'}
1977 0 1 unless $$a{'z'}
1991 1 9 unless ref $b eq 'Math::Algebra::Symbols::Sum'
1992 0 10 unless $$a{'z'} and $$b{'z'}
2006 2 5 unless ref $b eq 'Math::Algebra::Symbols::Sum'
2007 0 7 unless $$a{'z'} and $$b{'z'}
2021 0 9 unless $$a{'z'}
2035 0 18 unless $$a{'z'}
2049 0 10 unless $$a{'z'}