From 252a0e8708e7c42aa291d037cda149bca9a5d06d Mon Sep 17 00:00:00 2001 From: Lucas Heil Date: Wed, 7 Feb 2024 17:46:29 +0100 Subject: [PATCH] test 8 --- src/test/c/test_sudoku.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/test/c/test_sudoku.c b/src/test/c/test_sudoku.c index f3ff12d..0dfa07e 100644 --- a/src/test/c/test_sudoku.c +++ b/src/test/c/test_sudoku.c @@ -171,6 +171,27 @@ void test_Game_loop_1(){ printf("Unit test for Game_loop() executed.\n\n"); } +//7 + +void test_Level_Selection_2_2(){ + test_help = true; + int Sudoku_grid[SIZE_OF_GAMEBORD_AXIS_X][SIZE_OF_GAMEBORD_AXIS_Y]; + selected_difficulty = 1; + selected_level = 1; + + Level_Selection(Sudoku_grid); + + int expected = EMPTY; + + + for (int i = 0; i < SIZE_OF_GAMEBORD_AXIS_X; ++i) { + for (int j = 0; j < SIZE_OF_GAMEBORD_AXIS_Y; ++j) { + TEST_ASSERT_EQUAL_INT_MESSAGE(expected, Sudoku_grid[i][j], "Checking if level gets initialized correctly"); + } + } + + printf("Unit test for Level_Selection() executed.\n\n"); +} #endif // TEST