From bd53927ab27b7c716a88c170626df8a545649f0d Mon Sep 17 00:00:00 2001 From: fdai7727 Date: Thu, 25 Jan 2024 21:05:56 +0100 Subject: [PATCH] =?UTF-8?q?Schreiben=20des=20Test=20f=C3=BCr=20unterschied?= =?UTF-8?q?liche=20Buchstaben=20bei=20letterGuessed()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/c/Tim/hangman.c | 1 + src/test/c/Tim/test_hangman.c | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/src/main/c/Tim/hangman.c b/src/main/c/Tim/hangman.c index 2c534e3..f684076 100644 --- a/src/main/c/Tim/hangman.c +++ b/src/main/c/Tim/hangman.c @@ -127,6 +127,7 @@ void hangman() }while(userSelection != '0'); printf("Danke fuers Spielen! Auf Wiedersehen!\n"); } + void getWelcomeMessageHangman() { printf("Willkommen bei Hangman!!!\n\n"); diff --git a/src/test/c/Tim/test_hangman.c b/src/test/c/Tim/test_hangman.c index a3c54c6..bfbe9c6 100644 --- a/src/test/c/Tim/test_hangman.c +++ b/src/test/c/Tim/test_hangman.c @@ -108,6 +108,16 @@ void test_letterGuessed_sameCaps_small() //assert TEST_ASSERT_TRUE(letterGuessed(x,y,length)); } +void test_letterGuessed_differentLetter() +{ + //arrange + char x ='p'; + char y[] ="Kartoffel"; + int length = 9; + //assert + TEST_ASSERT_FALSE(letterGuessed(x,y,length)); +} + void test_letterGuessed_sameCaps_big() {