From 6c92357703b2f1b4de2919c2071fd8cb636cf075 Mon Sep 17 00:00:00 2001 From: fdai7723 Date: Thu, 8 Feb 2024 13:16:54 +0000 Subject: [PATCH] =?UTF-8?q?test=20f=C3=BCr=20test=5FMoving.c,=20Hendrik=20?= =?UTF-8?q?Vo=C3=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/test_Moving.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test/test_Moving.c b/test/test_Moving.c index 8ef5569..6af0d61 100644 --- a/test/test_Moving.c +++ b/test/test_Moving.c @@ -145,5 +145,19 @@ void test_istzugerlaubt_Turm(void){ } free(brett); } +void test_Laeufer_black_Moving(void) { + char** brett = Schachbrett_erstellen(); + Player player = PLAYER_BLACK; + // Prüfen, ob der Zug eine Diagonale ist == true + brett[6][6] = 'b'; + TEST_ASSERT_TRUE(istzugerlaubt(brett, 6, 6, 3, 3, player)); + + for (int i = 0; i < 8; i++) { + free(brett[i]); + } + free(brett); + + +} #endif // TEST