From cb0f5e3d5825b3a85b30a5d92a4bdcbd45b4d07d Mon Sep 17 00:00:00 2001 From: fdai7727 Date: Thu, 25 Jan 2024 19:56:30 +0100 Subject: [PATCH] =?UTF-8?q?Schreiben=20der=20Tests=20f=C3=BCr=20die=20Funk?= =?UTF-8?q?tion=20letterGuessed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/test/c/Tim/test_hangman.c | 43 +++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/src/test/c/Tim/test_hangman.c b/src/test/c/Tim/test_hangman.c index 3701b67..e2b04da 100644 --- a/src/test/c/Tim/test_hangman.c +++ b/src/test/c/Tim/test_hangman.c @@ -80,3 +80,46 @@ void test_wordGuessed_differentCaps() } +void test_letterGuessed_differentCaps_small_big() +{ + //arrange + char x ='F'; + char y[] ="Kartoffel"; + int length = 9; + char z[] ="_________"; + //assert + TEST_ASSERT_TRUE(letterGuessed(x,y,length,z)); +} + +void test_letterGuessed_differentCaps_big_small() +{ + //arrange + char x ='k'; + char y[] ="Kartoffel"; + int length = 9; + char z[] ="_________"; + //assert + TEST_ASSERT_TRUE(letterGuessed(x,y,length,z)); +} +void test_letterGuessed_sameCaps_small() +{ + //arrange + char x ='f'; + char y[] ="Kartoffel"; + int length = 9; + char z[] ="_________"; + //assert + TEST_ASSERT_TRUE(letterGuessed(x,y,length,z)); +} + +void test_letterGuessed_sameCaps_big() +{ + //arrange + char x ='K'; + char y[] ="Kartoffel"; + int length = 9; + char z[] ="_________"; + //assert + TEST_ASSERT_TRUE(letterGuessed(x,y,length,z)); +} +