|
@ -173,7 +173,19 @@ void test_BoardFull_returns_false_when_board_is_not_full(void) { |
|
|
// Assert |
|
|
// Assert |
|
|
TEST_ASSERT_FALSE(boardFull); |
|
|
TEST_ASSERT_FALSE(boardFull); |
|
|
} |
|
|
} |
|
|
|
|
|
void test_BoardFull_returns_true_when_board_is_full(void) { |
|
|
|
|
|
// Arrange |
|
|
|
|
|
TicTacToeGame game = { .board = {{PLAYER_X, PLAYER_X, PLAYER_O}, |
|
|
|
|
|
{PLAYER_O, PLAYER_O, PLAYER_X}, |
|
|
|
|
|
{PLAYER_X, PLAYER_X, PLAYER_O}}, |
|
|
|
|
|
.currentPlayer = PLAYER_X }; |
|
|
|
|
|
|
|
|
|
|
|
// Act |
|
|
|
|
|
int boardFull = BoardFull(&game); |
|
|
|
|
|
|
|
|
|
|
|
// Assert |
|
|
|
|
|
TEST_ASSERT_TRUE(boardFull); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|