Branch Coverage

blib/lib/Games/Tournament/Swiss/Bracket.pm
Criterion Covered Total %
branch 165 230 71.7


line true false branch
61 0 287 unless defined $score
78 0 0 unless @{$self->members;}
99 0 0 unless @{$self->members;}
123 0 6 unless &any(sub { $_->pairingNumber == $foreigner->pairingNumber; } , @$members)
125 0 6 unless $direction eq 'Up' or $direction eq 'Down'
141 0 0 unless @{$self->members;}
159 0 1 unless @$members and $self->trueHetero
163 3 0 defined $member->score ? :
183 0 57 unless @{$self->members;}
185 56 147 if $_->floating
204 8764 0 unless &any(sub { $member->pairingNumber == $_->pairingNumber; } , @$floated)
222 0 2259 if ($floater) { }
242 0 575 if @stayers == @$members
271 0 575 if &any(sub { $_->{'id'} eq $myId; } , @$members)
290 0 0 if (&any(sub { $_->pairingNumber == $returnee->pairingNumber; } , @$emigrants))
318 64 6877 if (defined $flag) { }
321 64 0 $flag ? :
324 1802 5075 $self->{'dissolved'} ? :
342 1984 5107 if (defined $s1) { }
5099 8 elsif ($self->{'s1'}) { }
362 3233 8442 if (defined $s2) { }
8442 0 elsif ($self->{'s2'}) { }
383 0 1186 unless $#$members >= 1
386 149 1037 if ($self->hetero) { }
390 692 2 defined $member->score ? :
409 0 1186 if &any(sub { not defined $_; } , @s1, @s2)
435 1 59 if $memberChangeTest
451 0 3567 unless $n >= 2
453 378 3189 if ($self->hetero) { }
456 1921 5 defined $member->score ? :
460 0 378 unless defined $lowestScore
462 0 378 if $p > $n / 2
483 17 12 if ($self->{'remainderof'}) { }
0 12 elsif ($self->{'remaindered'}) { }
492 0 29 unless $n >= 2
509 192 1887 if (defined $p) { }
1880 7 elsif (defined $pprime) { }
529 0 37 if (defined $p) { }
8 29 elsif (defined $bigGroupPprime) { }
531 0 0 if ($self->{'remainderof'}) { }
0 0 elsif ($self->{'remainder'}) { }
558 177 145 @$players % 2 ? :
576 1684 210 if $_->preference->role
582 176 53 $w >= $b ? :
583 37 192 $x < 0 ? :
599 398 38 if $_->preference->role
603 39 54 $w >= $b ? :
605 0 93 if ($self->{'remainderof'}) { }
0 93 elsif ($self->{'remainder'}) { }
624 5 239 if (defined $x) { }
72 167 elsif (defined $xprime) { }
626 0 5 if ($self->{'remainderof'}) { }
5 0 elsif ($self->{'remainder'}) { }
635 21 146 if ($self->{'remainderof'}) { }
53 93 elsif ($self->{'remainder'}) { }
637 18 3 if defined $x
641 0 53 if defined $x
660 77 1639 if (defined $x) { }
1553 86 elsif (defined $xprime) { }
681 0 1187 if $level and not $level =~ /^(?:None|B6Down|B5Down|B6Up|B5Up|All)$/i
684 222 965 if (defined $level) { }
965 0 elsif (defined $self->{'floatCheck'}) { }
685 0 1 unless $level eq 'None' or $oldLevel eq 'None' and $level eq 'B6Down' or $oldLevel eq 'B6Down' and $level eq 'B5Down' or $oldLevel eq 'B6Down' and $level eq 'B6Up' or $oldLevel eq 'B5Down' and $level eq 'B6Up' or $oldLevel eq 'B6Up' and $level eq 'B5Up' or $oldLevel eq 'B5Up' and $level eq 'All' or $oldLevel eq 'All' and $level eq 'None' or $oldLevel eq 'All' and $level eq 'B6Down'
717 31184 2392 defined $member->score ? :
721 5191 1773 if @range == 1
723 0 1773 unless defined $min
724 657 1116 if $tally{$min} <= @members / 2
725 1116 0 if $tally{$min} > @members / 2
743 3 0 defined $member->score ? :
747 0 1 unless @range
748 0 1 if @range == 1
770 0 1719 if $position > $#$s2
772 0 1719 if $bigLastGroup
789 0 2730 if @pattern == $digit
792 1249 1481 unless $nextPattern[$digit] == 0
795 470 1249 unless grep {$_;} @nextPattern
853 0 0 $n ? :
876 162 85 if (not $oddBracket) { }
85 0 elsif ($oddBracket) { }
893 162 85 if (not $oddBracket) { }
85 0 elsif ($oddBracket) { }
939 177 376 unless $exchange
950 0 376 if &any(sub { not defined $_; } , @members)
967 0 380 if (defined $score) { }
380 0 elsif (exists $self->{'score'}) { }
984 0 9645 if (defined $number) { }
9494 151 elsif (exists $self->{'number'}) { }
1001 1384 2931 if (defined $badpair) { }
2801 130 elsif (defined $self->{'badpair'}) { }
1018 2103 16353 if (defined $members) { }
16264 89 elsif ($self->{'members'}) { }
1035 223 750 if (defined $c8swapper) { }
696 54 elsif ($self->{'c8swapper'}) { }
1054 0 272 unless $levels and ref $levels eq 'ARRAY'
1066 367 515 if ($level =~ /^B5/i) { }
1068 315 567 if ($level =~ /Down$/i) { }
375 192 elsif ($level =~ /Up$/i) { }
1072 3 937 unless defined $pairtestee[$pos]
1074 1710 164 defined $_->score ? :
1077 937 0 unless $direction eq 'None'
1079 869 68 if ($test) { }
1081 0 68 defined $badpos{$level} ? :
1082 0 68 defined $badpos ? :
1086 128 61 if ($direction ne 'Up' and @nopairtestee and !$self->hetero || grep({defined $_;} @nopairtestee) == 1)
1092 186 128 unless defined $nopairtestee[$pos]
1093 128 0 if defined $nopairtestee[$pos] and ref $nopairtestee[$pos] eq 'ARRAY'
1100 12 244 if $player and not $test
1102 244 12 if $test
1104 116 12 if ($tableTest >= 2) { }
1106 0 12 defined $badpos{$level} ? :
1107 0 12 defined $badpos ? :
1108 12 0 if $idCheck
1115 80 610 if (@retainables < $pprime or keys %badpos)
1121 66 80 unless defined $badpos{$nextLevel}
1157 0 599 unless defined $pairables[$pos]