@ -54,3 +54,13 @@ int x_wins_01_11_21(char board[][3]) {
return 1;
}
int string_character_counter(char string[]) {
int stringLength = 0;
for (int i = 0; string[i] != '\0'; i++) {
stringLength++;
return stringLength;
@ -106,4 +106,19 @@ void test_x_wins_onIndex_01_11_21(void)
TEST_ASSERT_EQUAL_INT(expected, actual);
void test_stringLaenge_von_Kokosnuss(void)
{
/* arrange */
int actual;
int expected = 9;
char string[] = "Kokosnuss";
/* act */
actual = string_character_counter(string);
/* assert */
#endif