Browse Source

Richtige Anzahl an Eingaben

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

12
src/test/test_duellist_spielesammlung_projekt.c

@ -146,7 +146,19 @@ void test_invalid_input_type2(void) {
TEST_ASSERT_EQUAL(INVALID_MOVE, result); TEST_ASSERT_EQUAL(INVALID_MOVE, result);
} }
void test_getNumberOfMoves_returns_correct_number_of_moves(void) {
// Arrange
TicTacToeGame game = { .board = {{PLAYER_X, EMPTY, EMPTY},
{EMPTY, PLAYER_O, EMPTY},
{EMPTY, EMPTY, EMPTY}},
.currentPlayer = PLAYER_X };
// Act
int moves = getNumberOfMoves(&game);
// Assert
TEST_ASSERT_EQUAL(2, moves);
}

Loading…
Cancel
Save