Browse Source

test_checkWin_Horizontal_X

main^2
fdai7726 11 months ago
committed by Peter Wiebe
parent
commit
e8d721f19b
  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