|
|
@ -131,6 +131,40 @@ void test_invalid_input_type1(void) { |
|
|
|
// Assert |
|
|
|
TEST_ASSERT_EQUAL(INVALID_MOVE, result); |
|
|
|
} |
|
|
|
|
|
|
|
void test_invalid_input_type2(void) { |
|
|
|
// Arrange |
|
|
|
TicTacToeGame game = { .board = {{PLAYER_X, EMPTY, EMPTY}, |
|
|
|
{EMPTY, EMPTY, EMPTY}, |
|
|
|
{EMPTY, EMPTY, EMPTY}}, |
|
|
|
.currentPlayer = PLAYER_O }; |
|
|
|
|
|
|
|
// Act |
|
|
|
GameResult result = makeMove(&game, 0, 3); |
|
|
|
|
|
|
|
// Assert |
|
|
|
TEST_ASSERT_EQUAL(INVALID_MOVE, result); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|