|
|
@ -146,7 +146,7 @@ void test_invalid_input_overflow_column(void) { |
|
|
|
TEST_ASSERT_EQUAL(INVALID_MOVE, result); |
|
|
|
} |
|
|
|
|
|
|
|
void test_getNumberOfMoves_returns_correct_number_of_moves(void) { |
|
|
|
void test_NumberOfMoves_returns_correct_number_of_moves(void) { |
|
|
|
// Arrange |
|
|
|
TicTacToeGame game = { .board = {{PLAYER_X, EMPTY, EMPTY}, |
|
|
|
{EMPTY, PLAYER_O, EMPTY}, |
|
|
@ -154,7 +154,7 @@ void test_getNumberOfMoves_returns_correct_number_of_moves(void) { |
|
|
|
.currentPlayer = PLAYER_X }; |
|
|
|
|
|
|
|
// Act |
|
|
|
int moves = getNumberOfMoves(&game); |
|
|
|
int moves = NumberOfMoves(&game); |
|
|
|
|
|
|
|
// Assert |
|
|
|
TEST_ASSERT_EQUAL(2, moves); |
|
|
@ -186,7 +186,7 @@ void test_BoardFull_returns_true_when_board_is_full(void) { |
|
|
|
// Assert |
|
|
|
TEST_ASSERT_TRUE(boardFull); |
|
|
|
} |
|
|
|
void test_getCurrentPlayer_returns_correct_player(void) { |
|
|
|
void test_CurrentPlayer_returns_correct_player(void) { |
|
|
|
// Arrange |
|
|
|
TicTacToeGame game = { .board = {{PLAYER_X, EMPTY, EMPTY}, |
|
|
|
{EMPTY, PLAYER_O, EMPTY}, |
|
|
@ -194,7 +194,7 @@ void test_getCurrentPlayer_returns_correct_player(void) { |
|
|
|
.currentPlayer = PLAYER_O }; |
|
|
|
|
|
|
|
// Act |
|
|
|
Player currentPlayer = getCurrentPlayer(&game); |
|
|
|
Player currentPlayer = CurrentPlayer(&game); |
|
|
|
|
|
|
|
// Assert |
|
|
|
TEST_ASSERT_EQUAL(PLAYER_O, currentPlayer); |
|
|
|