Browse Source

15 achter Test

main^2
Simon Hildebrandt 11 months ago
committed by Peter Wiebe
parent
commit
037a64fecc
  1. 16
      src/test/c/test_TicTacToe.c

16
src/test/c/test_TicTacToe.c

@ -123,3 +123,19 @@ void test_TicTacToe_Winner_X_diagonal_1(void)
/* assert */ /* assert */
TEST_ASSERT_EQUAL_INT(expected, actual); TEST_ASSERT_EQUAL_INT(expected, actual);
} }
void test_TicTacToe_Winner_O_diagonal_2(void)
{
/* arrange */
int expected = 2;
int actual;
char board[3][3] = {
{'O', 'X', 'O'},
{'X', 'O', 'X'},
{'O', '_', '_'}
};
/* act */
actual = Winner(board);
/* assert */
TEST_ASSERT_EQUAL_INT(expected, actual);
}
Loading…
Cancel
Save