|
@ -95,59 +95,59 @@ void test_wordGuessed_differentCaps() |
|
|
void test_letterGuessed_differentCaps_small_big() |
|
|
void test_letterGuessed_differentCaps_small_big() |
|
|
{ |
|
|
{ |
|
|
//arrange |
|
|
//arrange |
|
|
char x ='F'; |
|
|
|
|
|
char y[] ="Kartoffel"; |
|
|
|
|
|
|
|
|
char bigLetter ='F'; |
|
|
|
|
|
char wordWithSmallLetter[] ="Kartoffel"; |
|
|
int length = 9; |
|
|
int length = 9; |
|
|
//assert |
|
|
//assert |
|
|
TEST_ASSERT_TRUE(letterGuessed(x,y,length)); |
|
|
|
|
|
|
|
|
TEST_ASSERT_TRUE(letterGuessed(bigLetter,wordWithSmallLetter,length)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void test_letterGuessed_differentCaps_big_small() |
|
|
void test_letterGuessed_differentCaps_big_small() |
|
|
{ |
|
|
{ |
|
|
//arrange |
|
|
//arrange |
|
|
char x ='k'; |
|
|
|
|
|
char y[] ="Kartoffel"; |
|
|
|
|
|
|
|
|
char smallLetter ='k'; |
|
|
|
|
|
char wordWithBigLetter[] ="Kartoffel"; |
|
|
int length = 9; |
|
|
int length = 9; |
|
|
//assert |
|
|
//assert |
|
|
TEST_ASSERT_TRUE(letterGuessed(x,y,length)); |
|
|
|
|
|
|
|
|
TEST_ASSERT_TRUE(letterGuessed(smallLetter,wordWithBigLetter,length)); |
|
|
} |
|
|
} |
|
|
void test_letterGuessed_sameCaps_small() |
|
|
void test_letterGuessed_sameCaps_small() |
|
|
{ |
|
|
{ |
|
|
//arrange |
|
|
//arrange |
|
|
char x ='f'; |
|
|
|
|
|
char y[] ="Kartoffel"; |
|
|
|
|
|
|
|
|
char smallLetter ='f'; |
|
|
|
|
|
char wordWithSmallLetter[] ="Kartoffel"; |
|
|
int length = 9; |
|
|
int length = 9; |
|
|
//assert |
|
|
//assert |
|
|
TEST_ASSERT_TRUE(letterGuessed(x,y,length)); |
|
|
|
|
|
|
|
|
TEST_ASSERT_TRUE(letterGuessed(smallLetter,wordWithSmallLetter,length)); |
|
|
} |
|
|
} |
|
|
void test_letterGuessed_differentLetter_small() |
|
|
void test_letterGuessed_differentLetter_small() |
|
|
{ |
|
|
{ |
|
|
//arrange |
|
|
//arrange |
|
|
char x ='p'; |
|
|
|
|
|
|
|
|
char randomSmallLetter ='p'; |
|
|
char y[] ="Kartoffel"; |
|
|
char y[] ="Kartoffel"; |
|
|
int length = 9; |
|
|
int length = 9; |
|
|
//assert |
|
|
//assert |
|
|
TEST_ASSERT_FALSE(letterGuessed(x,y,length)); |
|
|
|
|
|
|
|
|
TEST_ASSERT_FALSE(letterGuessed(randomSmallLetter,y,length)); |
|
|
} |
|
|
} |
|
|
void test_letterGuessed_differentLetter_big() |
|
|
void test_letterGuessed_differentLetter_big() |
|
|
{ |
|
|
{ |
|
|
//arrange |
|
|
//arrange |
|
|
char x ='P'; |
|
|
|
|
|
|
|
|
char randomBigLetter ='P'; |
|
|
char y[] ="Kartoffel"; |
|
|
char y[] ="Kartoffel"; |
|
|
int length = 9; |
|
|
int length = 9; |
|
|
//assert |
|
|
//assert |
|
|
TEST_ASSERT_FALSE(letterGuessed(x,y,length)); |
|
|
|
|
|
|
|
|
TEST_ASSERT_FALSE(letterGuessed(randomBigLetter,y,length)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void test_letterGuessed_sameCaps_big() |
|
|
void test_letterGuessed_sameCaps_big() |
|
|
{ |
|
|
{ |
|
|
//arrange |
|
|
//arrange |
|
|
char x ='K'; |
|
|
|
|
|
char y[] ="Kartoffel"; |
|
|
|
|
|
|
|
|
char bigLetter ='K'; |
|
|
|
|
|
char wordWithBigLetter[] ="Kartoffel"; |
|
|
int length = 9; |
|
|
int length = 9; |
|
|
//assert |
|
|
//assert |
|
|
TEST_ASSERT_TRUE(letterGuessed(x,y,length)); |
|
|
|
|
|
|
|
|
TEST_ASSERT_TRUE(letterGuessed(bigLetter,wordWithBigLetter,length)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void test_noTrysLeft_x_equals_POSSIBLE_TRYS() |
|
|
void test_noTrysLeft_x_equals_POSSIBLE_TRYS() |
|
|