Browse Source

Bei keinem freuen Feld, false ausgeben

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

13
src/test/test_duellist_spielesammlung_projekt.c

@ -212,7 +212,20 @@ void test_FieldEmpty_returns_true_for_empty_field(void) {
TEST_ASSERT_EQUAL(1, result);
}
void test_FieldEmpty_returns_false_for_nonempty_field(void) {
// Arrange
TicTacToeGame game = { .board = {{PLAYER_X, EMPTY, EMPTY},
{EMPTY, PLAYER_O, EMPTY},
{EMPTY, EMPTY, EMPTY}} };
// Act
int result = FieldEmpty(&game, 0, 0);
// Assert
TEST_ASSERT_EQUAL(0, result);
}
#endif // TEST

Loading…
Cancel
Save