Browse Source

test_checkWin_NoWinner

remotes/origin/Ahmad
fdai7726 11 months ago
parent
commit
30327565fe
  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' 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