|
|
@ -121,4 +121,20 @@ void test_stringLaenge_von_Kokosnuss(void) |
|
|
|
TEST_ASSERT_EQUAL_INT(expected, actual); |
|
|
|
} |
|
|
|
|
|
|
|
void test_howManyTimes_e_appearsIn_Beere(void) |
|
|
|
{ |
|
|
|
/* arrange */ |
|
|
|
int actual; |
|
|
|
int expected = 3; |
|
|
|
|
|
|
|
char c = 'e'; |
|
|
|
char string[] = "Beere"; |
|
|
|
|
|
|
|
/* act */ |
|
|
|
actual = characterAppearanceInString(c, string); |
|
|
|
|
|
|
|
/* assert */ |
|
|
|
TEST_ASSERT_EQUAL_INT(expected, actual); |
|
|
|
} |
|
|
|
|
|
|
|
#endif |