|
@ -72,6 +72,22 @@ void test_TicTacToe_Winner_O_col_1(void) |
|
|
/* act */ |
|
|
/* act */ |
|
|
actual = Winner(board); |
|
|
actual = Winner(board); |
|
|
|
|
|
|
|
|
|
|
|
/* assert */ |
|
|
|
|
|
TEST_ASSERT_EQUAL_INT(expected, actual); |
|
|
|
|
|
} |
|
|
|
|
|
void test_TicTacToe_Winner_X_col_2(void) |
|
|
|
|
|
{ |
|
|
|
|
|
/* arrange */ |
|
|
|
|
|
int expected = 1; |
|
|
|
|
|
int actual; |
|
|
|
|
|
char board[3][3] = { |
|
|
|
|
|
{'O', 'X', 'X'}, |
|
|
|
|
|
{'_', 'X', 'O'}, |
|
|
|
|
|
{'O', 'X', '_'} |
|
|
|
|
|
}; |
|
|
|
|
|
/* act */ |
|
|
|
|
|
actual = Winner(board); |
|
|
|
|
|
|
|
|
/* assert */ |
|
|
/* assert */ |
|
|
TEST_ASSERT_EQUAL_INT(expected, actual); |
|
|
TEST_ASSERT_EQUAL_INT(expected, actual); |
|
|
} |
|
|
} |