Browse Source

wenn Feld voll ist soll true ausgegeben werden

remotes/origin/homan
fdai7892 11 months ago
parent
commit
2d4a9503d4
  1. 12
      src/test/test_duellist_spielesammlung_projekt.c

12
src/test/test_duellist_spielesammlung_projekt.c

@ -173,7 +173,19 @@ void test_BoardFull_returns_false_when_board_is_not_full(void) {
// Assert // Assert
TEST_ASSERT_FALSE(boardFull); TEST_ASSERT_FALSE(boardFull);
} }
void test_BoardFull_returns_true_when_board_is_full(void) {
// Arrange
TicTacToeGame game = { .board = {{PLAYER_X, PLAYER_X, PLAYER_O},
{PLAYER_O, PLAYER_O, PLAYER_X},
{PLAYER_X, PLAYER_X, PLAYER_O}},
.currentPlayer = PLAYER_X };
// Act
int boardFull = BoardFull(&game);
// Assert
TEST_ASSERT_TRUE(boardFull);
}

Loading…
Cancel
Save