Browse Source

wenn Feld nicht voll ist soll false ausgegeben werden

remotes/origin/homan
fdai7892 11 months ago
parent
commit
7f2ce4bc21
  1. 14
      src/test/test_duellist_spielesammlung_projekt.c

14
src/test/test_duellist_spielesammlung_projekt.c

@ -160,6 +160,20 @@ void test_getNumberOfMoves_returns_correct_number_of_moves(void) {
TEST_ASSERT_EQUAL(2, moves); TEST_ASSERT_EQUAL(2, moves);
} }
void test_BoardFull_returns_false_when_board_is_not_full(void) {
// Arrange
TicTacToeGame game = { .board = {{PLAYER_X, EMPTY, EMPTY},
{EMPTY, PLAYER_O, EMPTY},
{EMPTY, EMPTY, EMPTY}},
.currentPlayer = PLAYER_X };
// Act
int boardFull = BoardFull(&game);
// Assert
TEST_ASSERT_FALSE(boardFull);
}

Loading…
Cancel
Save