From cb7a7bc6682401d132f5734543df7d29ef286fed Mon Sep 17 00:00:00 2001 From: Simon Hildebrandt Date: Wed, 7 Feb 2024 17:04:28 +0100 Subject: [PATCH] 14 siebter Test --- src/test/c/test_TicTacToe.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/test/c/test_TicTacToe.c b/src/test/c/test_TicTacToe.c index f0d5ab7..0dc4844 100644 --- a/src/test/c/test_TicTacToe.c +++ b/src/test/c/test_TicTacToe.c @@ -104,6 +104,22 @@ void test_TicTacToe_Winner_O_col_3(void) /* act */ actual = Winner(board); + /* assert */ + 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); } \ No newline at end of file