From d09300e9b641be25a711e59f2a5df4beb3df5cb4 Mon Sep 17 00:00:00 2001 From: fdai7892 Date: Wed, 7 Feb 2024 20:15:04 +0100 Subject: [PATCH] =?UTF-8?q?Unittest:=20M=C3=BCnzwurf=20spieler=20o=20start?= =?UTF-8?q?et?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/test/test_duellist_spielesammlung_projekt.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/test/test_duellist_spielesammlung_projekt.c b/src/test/test_duellist_spielesammlung_projekt.c index 61991d6..31107bf 100644 --- a/src/test/test_duellist_spielesammlung_projekt.c +++ b/src/test/test_duellist_spielesammlung_projekt.c @@ -19,3 +19,15 @@ void test_coinflip_player_x_starts(void) { TEST_ASSERT_EQUAL(SUCCESS, result); TEST_ASSERT_TRUE(game.currentPlayer == PLAYER_X || game.currentPlayer == PLAYER_O); } + +void test_coinflip_player_o_starts(void) { + // Arrange + TicTacToeGame game; + + // Act + GameResult result = initializeGame(&game); + + // Assert + TEST_ASSERT_EQUAL(SUCCESS, result); + TEST_ASSERT_TRUE(game.currentPlayer == PLAYER_X || game.currentPlayer == PLAYER_O); +} \ No newline at end of file