Browse Source

test_dropPiece_FullColum

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

13
src/test/c/test_VierGewinnt.c

@ -15,3 +15,16 @@ void test_dropPiece_ValidMove(void) {
TEST_ASSERT_EQUAL_INT(1, dropPiece(board, 3, 'X'));
}
void test_dropPiece_FullColumn(void) {
char board[6][7] = {
{'X', 'O', 'X', 'O', 'X', 'O', 'X'},
{'O', 'X', 'O', 'X', 'O', 'X', 'O'},
{'X', 'O', 'X', 'O', 'X', 'O', 'X'},
{'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, dropPiece(board, 3, 'X')); // Spalte ist voll, sollte 0 zurückgeben
}
Loading…
Cancel
Save