|
@ -116,4 +116,18 @@ void test_gewonnen_petr_in_peter_richtig() { |
|
|
TEST_ASSERT_EQUAL_INT(expected, actual); |
|
|
TEST_ASSERT_EQUAL_INT(expected, actual); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void test_gewonnen_p_in_peter_falsch() { |
|
|
|
|
|
// arrange |
|
|
|
|
|
int expected = 0; |
|
|
|
|
|
char actual; |
|
|
|
|
|
char secret_word[100] = "peter"; |
|
|
|
|
|
char guessed_letters[100] = "p"; |
|
|
|
|
|
|
|
|
|
|
|
// act |
|
|
|
|
|
actual = gewonnen(secret_word, guessed_letters); |
|
|
|
|
|
|
|
|
|
|
|
// assert |
|
|
|
|
|
TEST_ASSERT_EQUAL_INT(expected, actual); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
#endif // TEST |
|
|
#endif // TEST |