Browse Source

test 3

remotes/origin/Lucas
Lucas Heil 11 months ago
parent
commit
3530bf8035
  1. 21
      src/test/c/test_sudoku.c

21
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"); 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");
}

Loading…
Cancel
Save