Browse Source

test_checkWin_Horizontal_X

remotes/origin/Ahmad
fdai7726 11 months ago
parent
commit
0b85b5496c
  1. 35
      src/test/c/test_VierGewinnt.c

35
src/test/c/test_VierGewinnt.c

@ -28,3 +28,38 @@ void test_dropPiece_FullColumn(void) {
TEST_ASSERT_EQUAL_INT(0, dropPiece(board, 3, 'X')); // Spalte ist voll, sollte 0 zurückgeben TEST_ASSERT_EQUAL_INT(0, dropPiece(board, 3, 'X')); // Spalte ist voll, sollte 0 zurückgeben
} }
void test_checkWin_Horizontal_X(void) {
char board[6][7] = {
{'X', 'X', ' ', ' ', ' ', ' ', ' '},
{'O', 'O', 'O', ' ', ' ', ' ', ' '},
{' ', ' ', ' ', ' ', ' ', ' ', ' '},
{' ', 'X', 'X', 'X', 'X', ' ', ' '},
{' ', ' ', ' ', ' ', ' ', ' ', ' '},
{' ', ' ', ' ', ' ', ' ', ' ', ' '}
};
TEST_ASSERT_EQUAL_INT(1, checkWin(board, 'X')); // Horizontale Gewinnsituation für 'X'
}
Loading…
Cancel
Save