fen: simplify fen_check() + fix e.p. when no possible capture
This commit is contained in:
@@ -393,6 +393,14 @@ struct fentest {
|
||||
"simple movedo/undo: only 2 W knights",
|
||||
"5n2/1k6/8/8/5K2/8/P7/1N6 w - - 0 1"
|
||||
},
|
||||
{ __LINE__, FEN,
|
||||
"legal EP",
|
||||
"4k3/8/8/3pP3/8/8/8/4K3 w - d6 0 1"
|
||||
},
|
||||
{ __LINE__, FEN,
|
||||
"illegal EP, fix-able by fen parser",
|
||||
"4k3/8/8/3p1P2/8/8/8/4K3 w - d6 0 1"
|
||||
},
|
||||
{ __LINE__, FEN,
|
||||
"illegal EP and castle flags, fix-able by fen parser, SF crash",
|
||||
"4k3/8/8/8/7B/8/8/4K3 w KQkq e6 0 1"
|
||||
|
@@ -31,8 +31,7 @@ int main(__unused int ac, __unused char**av)
|
||||
bitboard_init();
|
||||
|
||||
while ((fen = next_fen(FEN))) {
|
||||
printf("***** [%s] ", fen);
|
||||
fflush(stdout);
|
||||
printf("line %3d: [%s] ", cur_line(), fen);
|
||||
if (!(pos = fen2pos(NULL, fen))) {
|
||||
printf("**INVALID\n");
|
||||
} else {
|
||||
|
@@ -287,7 +287,7 @@ int main(int __unused ac, __unused char**av)
|
||||
while ((fen = next_fen(PERFT | MOVEDO))) {
|
||||
test_line = cur_line();
|
||||
if (!(fenpos = fen2pos(pos, fen))) {
|
||||
printf("wrong fen %d: [%s]\n", i, fen);
|
||||
printf("wrong fen line = %d: [%s]\n", test_line, fen);
|
||||
continue;
|
||||
}
|
||||
pos = fenpos;
|
||||
|
Reference in New Issue
Block a user