From 3530bf8035af32b5db254f10438404b48b7ef46f Mon Sep 17 00:00:00 2001 From: Lucas Heil Date: Wed, 7 Feb 2024 17:44:35 +0100 Subject: [PATCH] test 3 --- 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 e58d373..674cf9b 100644 --- a/src/test/c/test_sudoku.c +++ b/src/test/c/test_sudoku.c @@ -43,6 +43,27 @@ void test_Level_Pool_neg_1() { printf("Unit test for Level_Pool_-1() executed.\n\n"); } +//2 + +void test_initializeGrid() { + int Sudoku_grid[SIZE_OF_GAMEBORD_AXIS_X][SIZE_OF_GAMEBORD_AXIS_Y]; + + + initializeGrid(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 every space is 0"); + } + } + + + printf("Unit test for initializeGrid() executed.\n\n"); +} + +