From f1d5198ae9bcb40bb4f20ef9383d687cb4d662db Mon Sep 17 00:00:00 2001 From: Simon Hildebrandt Date: Wed, 7 Feb 2024 17:05:25 +0100 Subject: [PATCH] 15 achter 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 0dc4844..fd80b53 100644 --- a/src/test/c/test_TicTacToe.c +++ b/src/test/c/test_TicTacToe.c @@ -120,6 +120,22 @@ void test_TicTacToe_Winner_X_diagonal_1(void) /* act */ actual = Winner(board); + /* assert */ + 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); } \ No newline at end of file