Branch Coverage

blib/lib/Chess/Opening/Book.pm
Criterion Covered Total %
branch 22 36 61.1


line true false branch
32 0 56 unless my $key = $self->_getKey($fen)
33 0 56 unless my($first, $last) = $self->_findKey($key)
63 0 65 if 6 != @tokens
68 0 65 if $result{'on_move'} ne 'w' and $result{'on_move'} ne 'b'
69 0 65 if $result{'next_move'} <= 0
71 1 64 if ('-' eq $result{'castling'}) { }
0 64 elsif (not $result{'castling'} =~ /^[KQkq]+$/u) { }
78 30 35 if ($result{'ep'} ne '-')
79 21 9 if ($result{'on_move'} eq 'b') { }
80 0 21 unless $result{'ep'} =~ /^[a-h]3$/u
82 0 9 unless $result{'ep'} =~ /^[a-h]6$/u
85 0 65 unless $result{'hmc'} =~ /^(?:0|[1-9][0-9]*)$/u
86 0 65 unless $result{'next_move'} =~ /^[1-9][0-9]*$/u
89 0 65 if 8 != @ranks
98 544 2079 if ($char ge '1' and $char le '8') { }
2079 0 elsif (exists $pieces{$char}) { }
100 0 544 if $file > 105
102 0 2079 if $file > 104