From 47e3f7dd6682ab1b0912d9424185aa5c422e9e20 Mon Sep 17 00:00:00 2001 From: fdai7892 Date: Wed, 7 Feb 2024 20:56:03 +0100 Subject: [PATCH] =?UTF-8?q?G=C3=BCltige=20Eingabe?= 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 9af7c6d..1d3c97e 100644 --- a/src/test/test_duellist_spielesammlung_projekt.c +++ b/src/test/test_duellist_spielesammlung_projekt.c @@ -103,7 +103,19 @@ void test_invalid_input(void) { TEST_ASSERT_EQUAL(INVALID_MOVE, result); } +void test_valid_input(void) { + // Arrange + TicTacToeGame game = { .board = {{EMPTY, EMPTY, EMPTY}, + {EMPTY, EMPTY, EMPTY}, + {EMPTY, EMPTY, EMPTY}}, + .currentPlayer = PLAYER_X }; + // Act + GameResult result = makeMove(&game, 1, 1); + + // Assert + TEST_ASSERT_EQUAL(SUCCESS, result); +}