From e55caae5ec22a991b383a1f643902ba2b9f0859f Mon Sep 17 00:00:00 2001 From: Siamak Date: Thu, 8 Feb 2024 03:24:31 +0100 Subject: [PATCH] Testfunktion O gewinnt waagerecht oben wurde erstellt. --- 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 42ea62a..a8d95a2 100644 --- a/src/test/test_funktionen.c +++ b/src/test/test_funktionen.c @@ -258,6 +258,21 @@ void test_o_wins_onIndex_02_12_22(void) TEST_ASSERT_EQUAL_INT(expected, actual); } +void test_o_wins_onIndex_00_01_02(void) +{ + /* arrange */ + int actual; + int expected = 1; + + char board[][3] = {{'O','O','O'}, {' ',' ',' '}, {' ',' ',' '}}; + + /* act */ + actual = o_wins_00_01_02(board); + + /* assert */ + TEST_ASSERT_EQUAL_INT(expected, actual); +} + void test_stringLaenge_von_Kokosnuss(void) { /* arrange */