Browse Source

Unittest: Münzwurf spieler o startet

remotes/origin/homan
fdai7892 11 months ago
parent
commit
d09300e9b6
  1. 12
      src/test/test_duellist_spielesammlung_projekt.c

12
src/test/test_duellist_spielesammlung_projekt.c

@ -19,3 +19,15 @@ void test_coinflip_player_x_starts(void) {
TEST_ASSERT_EQUAL(SUCCESS, result);
TEST_ASSERT_TRUE(game.currentPlayer == PLAYER_X || game.currentPlayer == PLAYER_O);
}
void test_coinflip_player_o_starts(void) {
// Arrange
TicTacToeGame game;
// Act
GameResult result = initializeGame(&game);
// Assert
TEST_ASSERT_EQUAL(SUCCESS, result);
TEST_ASSERT_TRUE(game.currentPlayer == PLAYER_X || game.currentPlayer == PLAYER_O);
}
Loading…
Cancel
Save