From f9ac11ad44b00f7e29ef2a9159c65f146f739835 Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Tue, 27 Dec 2022 11:13:49 +0100 Subject: Debug SANParser --- tests/chessarbiter.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests') diff --git a/tests/chessarbiter.cpp b/tests/chessarbiter.cpp index 2b6bdec..a2b3fc0 100644 --- a/tests/chessarbiter.cpp +++ b/tests/chessarbiter.cpp @@ -502,4 +502,10 @@ TEST_CASE("Specific bugs found on a game", "[BugFixes]") { CHECK(p == 'R'); p=a.ParseSANPromotion("c1=R"); CHECK(p == 'R'); + + // Bug 5 (Pin piece: the Knight on c3 cannot move so the only legal move for a white Knight is g1e2) + a.Setup("r1bqk2r/pp1n1p2/3p4/1BpP2pp/1b2n2P/2N1P1B1/PP3PP1/R2QK1NR w KQkq - 3 12"); + CHECK(a.ParseSAN("Ne2") == "g1e2"); + a.Play("g1e2"); + CHECK(a.GetFEN() == "r1bqk2r/pp1n1p2/3p4/1BpP2pp/1b2n2P/2N1P1B1/PP2NPP1/R2QK2R b KQkq - 4 12"); } \ No newline at end of file -- cgit v1.2.3