From 61519475efddad8a3fc712f5bf9e4dffab514eea Mon Sep 17 00:00:00 2001 From: Emman Mensdorf Date: Mon, 5 Feb 2024 21:53:05 +0100 Subject: [PATCH] Dame test positive horizontal bewegung, Emman Mensdorf --- test/test_Dame.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/test/test_Dame.c b/test/test_Dame.c index cdd6abc..44547fd 100644 --- a/test/test_Dame.c +++ b/test/test_Dame.c @@ -5,6 +5,30 @@ #include "Dame.h" #include +void test_Dame_positive_horizontal_Bewegung(void) { + + char** brett = Schachbrett_erstellen(); + int startX = 3; + int startY = 2; + int endX = 3; + int endY = 4; + Player player = PLAYER_WHITE; + + + TEST_ASSERT_NOT_NULL(brett); + + brett[2][3] = 'Q'; + print_Schachfeld(brett); + + + TEST_ASSERT_TRUE(istzugerlaubt_Dame(brett, startX, startY, endX, endY, player)); + + + for (int i = 0; i < 8; i++) { + free(brett[i]); + } + free(brett); +} void test_Dame_Falsche_Bewegung(void) {