From 0584edb107467a294f17a50d063e667f22f4a47b Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Wed, 16 Feb 2022 15:18:26 +0100 Subject: Enable to retreive SAN move --- tests/board.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests/board.cpp') diff --git a/tests/board.cpp b/tests/board.cpp index eb777a3..c1f11c3 100644 --- a/tests/board.cpp +++ b/tests/board.cpp @@ -416,3 +416,15 @@ TEST_CASE("Serialize", "[board/Serialize]") { "P "); } +TEST_CASE("IsPieceMoveUnique", "[board/IsPieceMoveUnique]") { + Board b; + b.AddPiece('N', "a1"); + b.AddPiece('n', "c1"); + + CHECK(b.IsPieceMoveUnique('n', "b3")); + CHECK(b.IsPieceMoveUnique('N', "b3")); + + b.AddPiece('N', "d2"); + CHECK(b.IsPieceMoveUnique('n', "b3")); + CHECK_FALSE(b.IsPieceMoveUnique('N', "b3")); +} -- cgit v1.2.3