From 2d4a9503d4b6975ab0857c220c51b30f883aad11 Mon Sep 17 00:00:00 2001 From: fdai7892 Date: Wed, 7 Feb 2024 21:07:06 +0100 Subject: [PATCH] wenn Feld voll ist soll true ausgegeben werden --- src/test/test_duellist_spielesammlung_projekt.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/test/test_duellist_spielesammlung_projekt.c b/src/test/test_duellist_spielesammlung_projekt.c index 1c9738c..53d2e0d 100644 --- a/src/test/test_duellist_spielesammlung_projekt.c +++ b/src/test/test_duellist_spielesammlung_projekt.c @@ -173,7 +173,19 @@ void test_BoardFull_returns_false_when_board_is_not_full(void) { // Assert TEST_ASSERT_FALSE(boardFull); } +void test_BoardFull_returns_true_when_board_is_full(void) { + // Arrange + TicTacToeGame game = { .board = {{PLAYER_X, PLAYER_X, PLAYER_O}, + {PLAYER_O, PLAYER_O, PLAYER_X}, + {PLAYER_X, PLAYER_X, PLAYER_O}}, + .currentPlayer = PLAYER_X }; + // Act + int boardFull = BoardFull(&game); + + // Assert + TEST_ASSERT_TRUE(boardFull); +}