From 4f300b4357e43a850081a72f30209242e9d848e5 Mon Sep 17 00:00:00 2001 From: Habib Date: Sun, 4 Feb 2024 15:50:45 +0100 Subject: [PATCH] =?UTF-8?q?Test=20f=C3=BCr=20x=5Fwins=5F00=5F10=5F20()=20e?= =?UTF-8?q?rstellt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/test/test_funktionen.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/test/test_funktionen.c b/src/test/test_funktionen.c index 7dc2b47..09ca587 100644 --- a/src/test/test_funktionen.c +++ b/src/test/test_funktionen.c @@ -76,4 +76,19 @@ void test_2_toThePowerOf_7(void) TEST_ASSERT_EQUAL_INT(expected, actual); } +void test_x_wins_onIndex_00_10_20(void) +{ + /* arrange */ + int actual; + int expected = 1; + + char board[][3] = {{'X',' ',' '}, {'X',' ',' '}, {'X',' ',' '}}; + + /* act */ + actual = x_wins_00_10_20(board); + + /* assert */ + TEST_ASSERT_EQUAL_INT(expected, actual); +} + #endif \ No newline at end of file