|
@ -19,3 +19,15 @@ void test_coinflip_player_x_starts(void) { |
|
|
TEST_ASSERT_EQUAL(SUCCESS, result); |
|
|
TEST_ASSERT_EQUAL(SUCCESS, result); |
|
|
TEST_ASSERT_TRUE(game.currentPlayer == PLAYER_X || game.currentPlayer == PLAYER_O); |
|
|
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); |
|
|
|
|
|
} |