Browse Source

test_dropPiece_FullColum

remotes/origin/Ahmad
fdai7726 11 months ago
parent
commit
2824ad7a74
  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')); 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