From 8e9e7fa7bce677a4c5eff3ba67c0471115fad0fc Mon Sep 17 00:00:00 2001 From: Lucas Heil Date: Wed, 7 Feb 2024 17:45:30 +0100 Subject: [PATCH] test 5 --- src/test/c/test_sudoku.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/test/c/test_sudoku.c b/src/test/c/test_sudoku.c index 92a9053..973b108 100644 --- a/src/test/c/test_sudoku.c +++ b/src/test/c/test_sudoku.c @@ -91,6 +91,29 @@ void test_create_playing_field_level_medium_two() { printf("Unit test for create_playing_field() executed.\n\n"); } +//4 + +// Unit test for printGrid() function +void test_printGrid() { + int Sudoku_grid[SIZE_OF_GAMEBORD_AXIS_X][SIZE_OF_GAMEBORD_AXIS_Y] = { + {5, 3, 0, 0, 7, 0, 0, 0, 0}, + {6, 0, 0, 1, 9, 5, 0, 0, 0}, + {0, 9, 8, 0, 0, 0, 0, 6, 0}, + {8, 0, 0, 0, 6, 0, 0, 0, 3}, + {4, 0, 0, 8, 0, 3, 0, 0, 1}, + {7, 0, 0, 0, 2, 0, 0, 0, 6}, + {0, 6, 0, 0, 0, 0, 2, 8, 0}, + {0, 0, 0, 4, 1, 9, 0, 0, 5}, + {0, 0, 0, 0, 8, 0, 0, 7, 9} + }; + + printf("Sudoku Grid:\n"); + printGrid(Sudoku_grid); + //TEST_PASS(); + printf("Unit test for printGrid() executed.\n\n"); +} + +