From 97f63e0b665cc2b7775dae4a64ee2692ababb0f9 Mon Sep 17 00:00:00 2001 From: fdai7892 Date: Wed, 7 Feb 2024 20:59:59 +0100 Subject: [PATCH] Spaltennnummer>2 --- .../test_duellist_spielesammlung_projekt.c | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/src/test/test_duellist_spielesammlung_projekt.c b/src/test/test_duellist_spielesammlung_projekt.c index 74e6dda..e3a3a10 100644 --- a/src/test/test_duellist_spielesammlung_projekt.c +++ b/src/test/test_duellist_spielesammlung_projekt.c @@ -131,6 +131,40 @@ void test_invalid_input_type1(void) { // Assert TEST_ASSERT_EQUAL(INVALID_MOVE, result); } + +void test_invalid_input_type2(void) { + // Arrange + TicTacToeGame game = { .board = {{PLAYER_X, EMPTY, EMPTY}, + {EMPTY, EMPTY, EMPTY}, + {EMPTY, EMPTY, EMPTY}}, + .currentPlayer = PLAYER_O }; + + // Act + GameResult result = makeMove(&game, 0, 3); + + // Assert + TEST_ASSERT_EQUAL(INVALID_MOVE, result); +} + + + + + + + + + + + + + + + + + + + +