Browse Source

test_checkWin_NoWinner

main^2
fdai7726 11 months ago
committed by Peter Wiebe
parent
commit
4f5300d1f2
  1. 15
      src/test/c/test_VierGewinnt.c

15
src/test/c/test_VierGewinnt.c

@ -119,4 +119,19 @@ void test_checkWin_Vertical_O(void) {
TEST_ASSERT_EQUAL_INT(1, checkWin(board, 'O')); // Vertikale Gewinnsituation für 'X'
}
void test_checkWin_NoWinner(void) {
char board[6][7] = {
{'X', 'O', 'X', 'O', 'X', 'O', 'X'},
{'O', 'X', 'O', 'X', 'O', 'X', 'O'},
{'O', 'X', 'O', 'X', 'O', 'X', 'O'},
{'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(0, checkWin(board, 'X')); // Kein Gewinner, horizontale Reihe ist voll
TEST_ASSERT_EQUAL_INT(0, checkWin(board, 'O')); // Kein Gewinner, horizontale Reihe ist voll
}
Loading…
Cancel
Save