Browse Source

test_gewonnen 3

main^2
Peter Wiebe 11 months ago
committed by Peter Wiebe
parent
commit
46941fe4a1
  1. 14
      src/test/c/test_hangman_test.c

14
src/test/c/test_hangman_test.c

@ -130,4 +130,18 @@ void test_gewonnen_p_in_peter_falsch() {
TEST_ASSERT_EQUAL_INT(expected, actual); TEST_ASSERT_EQUAL_INT(expected, actual);
} }
void test_gewonnen_petr_in_leerstring_richtig() {
// arrange
int expected = 1;
char actual;
char secret_word[100] = "";
char guessed_letters[100] = "petr";
// act
actual = gewonnen(secret_word, guessed_letters);
// assert
TEST_ASSERT_EQUAL_INT(expected, actual);
}
#endif // TEST #endif // TEST
Loading…
Cancel
Save