Browse Source

test_checkWin_Diagonal_X

main^2
fdai7726 11 months ago
committed by Peter Wiebe
parent
commit
03702d7b79
  1. 13
      src/test/c/test_VierGewinnt.c

13
src/test/c/test_VierGewinnt.c

@ -56,6 +56,19 @@ void test_checkWin_Horizontal_O(void) {
TEST_ASSERT_EQUAL_INT(1, checkWin(board, 'O')); // Horizontale Gewinnsituation für 'X' TEST_ASSERT_EQUAL_INT(1, checkWin(board, 'O')); // Horizontale Gewinnsituation für 'X'
} }
void test_checkWin_Diagonal_X(void) {
char board[6][7] = {
{'X', 'X', ' ', ' ', ' ', ' ', ' '},
{'O', 'O', 'O', 'X', ' ', ' ', ' '},
{' ', 'X', ' ', ' ', ' ', ' ', ' '},
{' ', 'X', 'X', 'X', 'X', ' ', ' '},
{' ', ' ', ' ','X', ' ', ' ', ' '},
{' ', ' ', ' ', ' ', ' ', 'X', ' '}
};
TEST_ASSERT_EQUAL_INT(1, checkWin(board, 'X')); // Horizontale Gewinnsituation für 'X'
}

Loading…
Cancel
Save