|
|
@ -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 |