Branch Coverage

blib/lib/Games/Go/AGATourn.pm
Criterion Covered Total %
branch 102 250 40.8


line true false branch
172 1 1 if (defined $$self{'register_tde'})
173 0 1 unless $self->ReadRegisterFile($$self{'register_tde'})
175 1 1 if (defined $$self{'register_tde'})
176 1 0 if (defined $$self{'Round'}) { }
177 0 1 if ($$self{'Round'} > 0)
263 0 1 if (@fields == 9)
281 0 1 unless ($string =~ /^\s*(.*?)\s*(\d+) (.*)/)
288 0 1 if ($misc =~ m[([\w ]{6}?) ([-\d\. ]{5}) ([\d/ ]{10}) ([\w ]{4}) (.*?)\s*$]) { }
295 0 0 if ($agaRating =~ /(\d+)([dk])/i)
298 0 0 if uc $2 eq 'K'
301 1 0 if ($misc =~ s/^\s*([^\s\d-]+) //) { }
0 0 elsif (not $misc =~ s/^ //) { }
306 1 0 if ($misc =~ s/^\s*(-?\d+\.\d) //) { }
0 0 elsif ($misc =~ s/^\s*(\d+)([dkDK]) //) { }
0 0 elsif ($misc =~ s/^\s*(-?\d\d?) //) { }
0 0 elsif (not $misc =~ s/^ //) { }
311 0 0 if uc $2 eq 'K'
317 1 0 if ($misc =~ s[^\s*([\d/]+) ][]) { }
0 0 elsif (not $misc =~ s/ //) { }
322 0 1 unless (defined $expire or defined $memType)
325 1 0 if ($misc =~ s/^(\w+)\s*//) { }
0 0 elsif (not $misc =~ s/ //) { }
331 1 0 if ($misc =~ s/^\s*(.*?)\s*$//)
334 0 1 if ($misc ne '')
372 0 1 unless ($inFP)
395 17 0 ref $self && exists $$self{'fileName'} ? :
399 1 16 unless defined $h
400 9 7 if (exists $$h{'directive'})
402 4 26 if ($$h{'directive'} eq $_)
410 3 4 unless exists $$h{'agaNum'}
412 0 4 if (defined $$self{'Name'}{$id})
422 4 0 unless exists $$self{'Played'}{$id}
424 12 0 unless exists $$self{$_}{$id}
427 1 3 if $len > $$self{'nameLength'}
468 1 17 if $line eq ''
470 9 8 if ($line =~ s/^\s*##\s*//)
478 8 0 if ($line =~ s/\s*#\s*(.*?)\s*$//)
481 3 5 if ($line eq '')
487 5 0 ref $self && exists $$self{'fileName'} ? :
491 5 0 if ($line =~ s/\s*CLUB=(\S*)\s*//)
496 2 3 if ($line =~ s/^\s*(\S*)\s+(.*?)\s+(\d+[dDkK])\s*//) { }
3 0 elsif ($line =~ s/^\s*(\S*)\s+(.*?)\s+(-*\d+\.\d+)\s*//) { }
0 0 elsif ($line =~ s/^\s*(\S*)\s+(.*?)\s+(-*\d+)\s*//) { }
513 5 0 if ($agaNum =~ s/^(\D+)//)
516 0 5 unless ($name =~ /,/)
545 0 1 if ($fName =~ /^\d+$/)
549 1 0 if ($fName =~ /(\d+).tde/) { }
555 0 1 unless ($inFP)
585 2 2 unless defined $g and exists $$g{'result'}
588 0 2 unless exists $$self{'Rating'}{$wId}
589 0 2 unless exists $$self{'Rating'}{$bId}
591 0 6 unless exists $$self{$_}{$wId}
592 0 6 unless exists $$self{$_}{$bId}
594 0 2 if ($$g{'result'} eq 'w') { }
1 1 elsif ($$g{'result'} eq 'b') { }
1 0 elsif ($$g{'result'} eq '?') { }
647 0 4 if $line eq ''
649 2 2 if ($line =~ s/^\s*##\s*//)
657 2 0 if ($line =~ s/\s*#\s*(.*?)\s*$//)
660 0 2 if ($line eq '')
666 2 0 if ($line =~ /^\s*(\w+)(\d+)\s+(\w+)(\d+)\s+([bwBW\?])\s+(\d+)\s+(-?\d+)$/)
678 0 0 ref $self && exists $$self{'fileName'} ? :
723 0 2 if (defined $directive)
725 0 0 if (exists $$self{'Directive'}{$directive})
726 0 0 wantarray ? :
745 2 0 if defined $$self{'Directive'}{'ROUNDS'}[0]
773 0 2 if defined $id
805 0 2 if defined $newRating
806 0 2 if (defined $id)
807 0 0 if exists $$self{'Rating'}{$id}
808 0 0 if ($id =~ /^(-?\d+\.\d)\s*/)
811 0 0 if ($id =~ /^\s*(\d+)([dkDK])\b/)
813 0 0 if lc $2 eq 'k'
816 0 0 if ($id =~ /^\s*(-?\d\d?)\b/)
839 0 0 if defined $id
865 0 0 if (defined $id) { }
866 0 0 if (defined $$self{'Rank'}{$id}) { }
0 0 elsif (defined $$self{'Rating'}{$id}) { }
869 0 0 if lc $2 eq 'k'
871 0 0 $sigma > 1.2 ? :
874 0 0 $sigma > 0.6 ? :
897 0 0 if defined $id
917 0 0 if (defined $id)
918 0 0 if exists $$self{'Flags'}{$id}
919 0 0 if exists $$self{'Rating'}{$id}
937 0 2 if (defined $id)
938 0 0 if exists $$self{'Comment'}{$id}
939 0 0 if exists $$self{'Rating'}{$id}
955 0 2 if defined $error
978 3 0 unless @arg
983 0 0 wantarray ? :
999 0 0 if defined $id
1016 0 0 if defined $id
1033 0 0 if defined $id
1050 0 0 if (defined $id)
1051 0 0 wantarray ? :
1070 0 32 if not defined $rating or $rating eq ''
1071 3 29 if $rating =~ /^-?\d+$/
1072 24 5 unless ($rating =~ /^-?\d+\.\d+$/)
1073 0 24 unless $rating =~ /^(\d+)([dDkK])$/
1075 12 12 if uc $2 eq 'K'
1092 2 6 unless (exists $$self{'bandTop'})
1098 0 15 if $r > $$self{'bandTop'}[$ii]
1099 2 13 if ($r >= $$self{'bandBot'}[$ii])
1126 1 5 unless defined $$self{'bandTop'}[$idx]
1127 3 2 if ($top == int $$self{'bandTop'}[$idx])
1167 0 0 unless defined $p1 and defined $p2
1172 0 0 if ($diff < 0)
1176 0 0 if ($diff <= 0.65) { }
0 0 elsif ($diff <= 1.25) { }
0 0 elsif ($diff <= 2.2) { }
1177 0 0 $ing ? :
1179 0 0 $ing ? :
1181 0 0 $ing ? :
1200 0 0 if ($rating >= 1) { }
0 0 elsif ($rating <= -1) { }
1221 0 0 if ($rating >= 0) { }
1256 1 1 unless (exists $$self{'Directive'}{'BAND'})
1265 3 3 if $top > 0
1267 4 2 if $bot < 0
1268 0 6 if ($top > 9999 or $bot < -9999 or $bot >= $top)
1274 0 6 unless $ovBand eq -99.9
1275 0 6 unless ($ovBand eq -99.9)
1285 1 3 if $bots[$ii] == 1 and $tops[$ii + 1] == -1
1286 0 3 if ($bots[$ii] - $tops[$ii + 1] > 0.001)