Browse Source

Schreiben der Tests für die Funktion letterGuessed

remotes/origin/tim
fdai7727 11 months ago
parent
commit
cb0f5e3d58
  1. 43
      src/test/c/Tim/test_hangman.c

43
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));
}
Loading…
Cancel
Save