From e8ad1176a1fa114d942c8f59ffeffc325b5b5df1 Mon Sep 17 00:00:00 2001 From: Peter Wiebe Date: Wed, 7 Feb 2024 10:33:53 +0100 Subject: [PATCH] test_gewonnen 3 --- src/test/c/test_hangman_test.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/test/c/test_hangman_test.c b/src/test/c/test_hangman_test.c index 07ceafa..e63bdba 100644 --- a/src/test/c/test_hangman_test.c +++ b/src/test/c/test_hangman_test.c @@ -130,4 +130,18 @@ void test_gewonnen_p_in_peter_falsch() { 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