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