|
@ -107,3 +107,19 @@ void test_TicTacToe_Winner_O_col_3(void) |
|
|
/* assert */ |
|
|
/* assert */ |
|
|
TEST_ASSERT_EQUAL_INT(expected, actual); |
|
|
TEST_ASSERT_EQUAL_INT(expected, actual); |
|
|
} |
|
|
} |
|
|
|
|
|
void test_TicTacToe_Winner_X_diagonal_1(void) |
|
|
|
|
|
{ |
|
|
|
|
|
/* arrange */ |
|
|
|
|
|
int expected = 1; |
|
|
|
|
|
int actual; |
|
|
|
|
|
char board[3][3] = { |
|
|
|
|
|
{'X', 'O', 'X'}, |
|
|
|
|
|
{'O', 'X', 'O'}, |
|
|
|
|
|
{'O', '_', 'X'} |
|
|
|
|
|
}; |
|
|
|
|
|
/* act */ |
|
|
|
|
|
actual = Winner(board); |
|
|
|
|
|
|
|
|
|
|
|
/* assert */ |
|
|
|
|
|
TEST_ASSERT_EQUAL_INT(expected, actual); |
|
|
|
|
|
} |