diff --git a/src/test/test_duellist_spielesammlung_projekt.c b/src/test/test_duellist_spielesammlung_projekt.c index 31107bf..dc12cd1 100644 --- a/src/test/test_duellist_spielesammlung_projekt.c +++ b/src/test/test_duellist_spielesammlung_projekt.c @@ -30,4 +30,39 @@ void test_coinflip_player_o_starts(void) { // Assert TEST_ASSERT_EQUAL(SUCCESS, result); TEST_ASSERT_TRUE(game.currentPlayer == PLAYER_X || game.currentPlayer == PLAYER_O); -} \ No newline at end of file +} + +void test_vertical_win(void) { + // Arrange + TicTacToeGame game = { .board = {{PLAYER_X, EMPTY, EMPTY}, + {PLAYER_X, EMPTY, EMPTY}, + {PLAYER_X, EMPTY, EMPTY}}, + .currentPlayer = PLAYER_O }; + + // Act + GameResult result = checkGameResult(&game); + + // Assert + TEST_ASSERT_EQUAL(GAME_WIN, result); +} + + + + + + + + + + + + + + + + + + + + +