summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2022-02-16 15:18:26 +0100
committerLoic Guegan <manzerbredes@mailbox.org>2022-02-16 15:18:26 +0100
commit0584edb107467a294f17a50d063e667f22f4a47b (patch)
tree67e95c79a1fc71562dcf9d65e9f614614154ed74 /tests
parent94c2565647d84f31d5ccac0d88717aef29d4a9a1 (diff)
Enable to retreive SAN move
Diffstat (limited to 'tests')
-rw-r--r--tests/board.cpp12
1 files changed, 12 insertions, 0 deletions
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"));
+}