From e5d5b7240aa92eb186aa01baadeda6bb9abc724a Mon Sep 17 00:00:00 2001 From: fdai7492 Date: Tue, 6 Feb 2024 05:04:13 +0000 Subject: [PATCH] Test KannKoenigEntkommen, Anton Lohrey --- test/test_Koenig.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/test_Koenig.c b/test/test_Koenig.c index b36ecdb..6696839 100644 --- a/test/test_Koenig.c +++ b/test/test_Koenig.c @@ -95,4 +95,12 @@ void test_Rochieren(void) { // Clean up Schachbrettspeicher_freigeben(testBrett); } +void test_KoenigKannEntkommen(void) { + char** testBrett = Schachbrett_erstellen(); + testBrett[4][4] = 'k'; + print_Schachfeld(testBrett); + + TEST_ASSERT_TRUE(KannKoenigEntkommen(testBrett, 4, 4, PLAYER_BLACK)); + TEST_ASSERT_FALSE(KannKoenigEntkommen(testBrett, 4, 7, PLAYER_BLACK)); +} #endif // TEST