diff --git a/src/test/test_duellist_spielesammlung_projekt.c b/src/test/test_duellist_spielesammlung_projekt.c index 89df4de..b2425e1 100644 --- a/src/test/test_duellist_spielesammlung_projekt.c +++ b/src/test/test_duellist_spielesammlung_projekt.c @@ -199,7 +199,18 @@ void test_getCurrentPlayer_returns_correct_player(void) { // Assert TEST_ASSERT_EQUAL(PLAYER_O, currentPlayer); } +void test_FieldEmpty_returns_true_for_empty_field(void) { + // Arrange + TicTacToeGame game = { .board = {{PLAYER_X, EMPTY, EMPTY}, + {EMPTY, PLAYER_O, EMPTY}, + {EMPTY, EMPTY, EMPTY}} }; + // Act + int result = FieldEmpty(&game, 0, 2); + + // Assert + TEST_ASSERT_EQUAL(1, result); +}