Browse Source

test_isColumnFull

remotes/origin/Ahmad
fdai7726 11 months ago
parent
commit
46ae979f08
  1. 14
      src/test/c/test_VierGewinnt.c

14
src/test/c/test_VierGewinnt.c

@ -135,3 +135,17 @@ char board[6][7] = {
TEST_ASSERT_EQUAL_INT(0, checkWin(board, 'X')); // Kein Gewinner, horizontale Reihe ist voll
TEST_ASSERT_EQUAL_INT(0, checkWin(board, 'O')); // Kein Gewinner, horizontale Reihe ist voll
}
void test_isColumnFull(void) {
char board[6][7] = {
{'X', 'O', 'X', 'O', 'X', 'O', 'X'},
{'O', 'X', 'O', 'X', 'O', 'X', 'O'},
{'X', 'O', 'X', 'O', 'X', 'O', 'X'},
{'O', 'X', 'O', 'X', 'O', 'X', 'O'},
{'X', 'O', 'X', 'O', 'X', 'O', 'X'},
{'O', 'X', 'O', 'X', 'O', 'X', 'O'}
};
TEST_ASSERT_EQUAL_INT(1, isColumnFull(board, 3)); // Column 3 is full
}
Loading…
Cancel
Save