diff options
| author | Loic Guegan <manzerbredes@mailbox.org> | 2022-03-07 11:30:55 +0100 |
|---|---|---|
| committer | Loic Guegan <manzerbredes@mailbox.org> | 2022-03-07 11:30:55 +0100 |
| commit | 9025383477acf5f9a6360877c502232eaec24e02 (patch) | |
| tree | 4fbfff916cf43a63d6a3743d373dc802c9e4de3f /tests | |
| parent | 934b00f7291f4c7c44fc5c713819b04862974603 (diff) | |
Add WasEnPassant() method for convenience
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/chessarbiter.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/chessarbiter.cpp b/tests/chessarbiter.cpp index 0682979..c5f34ea 100644 --- a/tests/chessarbiter.cpp +++ b/tests/chessarbiter.cpp @@ -368,6 +368,7 @@ TEST_CASE("SimpleCapture", "[SimplePieceCapture]") { CHECK(a.GetFEN() == "rnbqkbnr/ppp1pppp/8/3P4/8/8/PPPP1PPP/RNBQKBNR b KQkq - 0 2"); CHECK(a.GetCapture() == 'p'); + CHECK_FALSE(a.WasEnPassant()); } TEST_CASE("SimpleCastle", "[SimpleCastle]") { @@ -407,6 +408,7 @@ TEST_CASE("SimpleEnPassant", "[SimpleEnPassant]") { CHECK(a.GetFEN() == "rnbqkbnr/ppppp1pp/5P2/8/8/8/PPPP1PPP/RNBQKBNR b KQkq - 0 2"); CHECK(a.GetCapture() == 'p'); + CHECK(a.WasEnPassant()); // Black capture a.Setup("rnbqkbnr/ppppp1pp/8/8/4Pp2/8/PPPP1PPP/RNBQKBNR b KQkq e3 0 1"); @@ -414,6 +416,7 @@ TEST_CASE("SimpleEnPassant", "[SimpleEnPassant]") { CHECK(a.GetFEN() == "rnbqkbnr/ppppp1pp/8/8/8/4p3/PPPP1PPP/RNBQKBNR w KQkq - 0 2"); CHECK(a.GetCapture() == 'P'); + CHECK(a.WasEnPassant()); // Check en_passant is set a.Setup( @@ -421,6 +424,7 @@ TEST_CASE("SimpleEnPassant", "[SimpleEnPassant]") { CHECK(a.Play("f7f5")); CHECK(a.GetFEN() == "r3k2r/1pqbb2p/1nn1p1p1/p2pPp2/3P1PP1/PP1B4/1B1NN2P/" "R2Q1RK1 w kq f6 0 15"); + CHECK_FALSE(a.WasEnPassant()); } TEST_CASE("ParseSAN", "[ParseSAN]") { |
