From 513091fe1bd5d0943880f2447553651fe54fe499 Mon Sep 17 00:00:00 2001 From: fdai7727 Date: Mon, 5 Feb 2024 15:41:34 +0100 Subject: [PATCH 1/2] =?UTF-8?q?refactoring:=20Umbenennen=20der=20Variablen?= =?UTF-8?q?=20eines=20Test=20zu=20verst=C3=A4ndlicheren=20Namen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/test/c/Tim/test_hangman.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/test/c/Tim/test_hangman.c b/src/test/c/Tim/test_hangman.c index 47f8e40..98a05b7 100644 --- a/src/test/c/Tim/test_hangman.c +++ b/src/test/c/Tim/test_hangman.c @@ -95,11 +95,11 @@ void test_wordGuessed_differentCaps() void test_letterGuessed_differentCaps_small_big() { //arrange - char x ='F'; - char y[] ="Kartoffel"; + char bigLetter ='F'; + char wordWithSmallLetter[] ="Kartoffel"; int length = 9; //assert - TEST_ASSERT_TRUE(letterGuessed(x,y,length)); + TEST_ASSERT_TRUE(letterGuessed(bigLetter,wordWithSmallLetter,length)); } void test_letterGuessed_differentCaps_big_small() From d63fb4b5634406444ef691fe9a77badcfac157c4 Mon Sep 17 00:00:00 2001 From: fdai7727 Date: Mon, 5 Feb 2024 15:47:34 +0100 Subject: [PATCH 2/2] =?UTF-8?q?refactoring:=20Umbenennen=20der=20restliche?= =?UTF-8?q?n=20Variablen=20zum=20Testfall=20letterGuessed=20zu=20verst?= =?UTF-8?q?=C3=A4ndlicheren=20Namen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/test/c/Tim/test_hangman.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/test/c/Tim/test_hangman.c b/src/test/c/Tim/test_hangman.c index 98a05b7..ecf68b8 100644 --- a/src/test/c/Tim/test_hangman.c +++ b/src/test/c/Tim/test_hangman.c @@ -105,49 +105,49 @@ void test_letterGuessed_differentCaps_small_big() void test_letterGuessed_differentCaps_big_small() { //arrange - char x ='k'; - char y[] ="Kartoffel"; + char smallLetter ='k'; + char wordWithBigLetter[] ="Kartoffel"; int length = 9; //assert - TEST_ASSERT_TRUE(letterGuessed(x,y,length)); + TEST_ASSERT_TRUE(letterGuessed(smallLetter,wordWithBigLetter,length)); } void test_letterGuessed_sameCaps_small() { //arrange - char x ='f'; - char y[] ="Kartoffel"; + char smallLetter ='f'; + char wordWithSmallLetter[] ="Kartoffel"; int length = 9; //assert - TEST_ASSERT_TRUE(letterGuessed(x,y,length)); + TEST_ASSERT_TRUE(letterGuessed(smallLetter,wordWithSmallLetter,length)); } void test_letterGuessed_differentLetter_small() { //arrange - char x ='p'; + char randomSmallLetter ='p'; char y[] ="Kartoffel"; int length = 9; //assert - TEST_ASSERT_FALSE(letterGuessed(x,y,length)); + TEST_ASSERT_FALSE(letterGuessed(randomSmallLetter,y,length)); } void test_letterGuessed_differentLetter_big() { //arrange - char x ='P'; + char randomBigLetter ='P'; char y[] ="Kartoffel"; int length = 9; //assert - TEST_ASSERT_FALSE(letterGuessed(x,y,length)); + TEST_ASSERT_FALSE(letterGuessed(randomBigLetter,y,length)); } void test_letterGuessed_sameCaps_big() { //arrange - char x ='K'; - char y[] ="Kartoffel"; + char bigLetter ='K'; + char wordWithBigLetter[] ="Kartoffel"; int length = 9; //assert - TEST_ASSERT_TRUE(letterGuessed(x,y,length)); + TEST_ASSERT_TRUE(letterGuessed(bigLetter,wordWithBigLetter,length)); } void test_noTrysLeft_x_equals_POSSIBLE_TRYS()