This commit is contained in:
2022-12-23 23:57:29 +01:00
parent 87adca7e66
commit cb0fcc4702
14 changed files with 208 additions and 52 deletions

View File

@@ -35,6 +35,7 @@ static void testMove(const char *fen, const std::vector<std::string> &expectedMo
for (const auto &moveName : expectedMoves) {
auto pv = engine->pv(board.value());
Move move = *pv.begin();
move.setScore(0);
REQUIRE(move == Move::fromUci(moveName));
board->makeMove(move);
}
@@ -67,6 +68,8 @@ TEST_CASE("Puzzles mateIn1_simple", "[Engine][Puzzle]") {
auto [fen, moves] = GENERATE(table<const char*, std::vector<std::string>>({
{"2bQ1k1r/1p3p2/p4b1p/4pNp1/2q5/8/PPP2PPP/1K1RR3 b - - 3 23",{"f6d8", "d1d8"}}, // https://lichess.org/gQa01loO/black#46
{"5rk1/ppp5/2n4p/3b2p1/6R1/P1B1P2P/1Pq5/R2Q2K1 b - - 3 29",{"c2f2"}}, // https://lichess.org/haKJxadR#57
{"r1b1k2r/ppp2pp1/2p5/2b1q1Bp/3PP1n1/2P5/PP2BPPP/RN1Q1RK1 b kq - 0 10",{"e5h2"}},
{"r3rk2/5ppQ/b1pp1q1p/p5n1/P1P5/2N5/1PB2PP1/R3R1K1 w - - 6 24", {"h7h8"}},
}));
testMove(fen, moves);
}

View File

@@ -104,7 +104,7 @@ TEST_CASE("En passant square is correctly parsed", "[Fen][EnPassant]") {
{
"rnbqkbnr/ppppp1pp/8/8/2PPPp2/8/PP3PPP/RNBQKBNR b KQkq e3 0 3",
Square::E3
}
},
}));
CAPTURE(fen, ep);