Browse Source

test 8

main^2
Lucas Heil 11 months ago
committed by Peter Wiebe
parent
commit
252a0e8708
  1. 21
      src/test/c/test_sudoku.c

21
src/test/c/test_sudoku.c

@ -171,6 +171,27 @@ void test_Game_loop_1(){
printf("Unit test for Game_loop() executed.\n\n"); 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 #endif // TEST
Loading…
Cancel
Save