|
|
@ -541,3 +541,67 @@ void test_categorySelection_Cooking(void) { |
|
|
|
), (UNITY_UINT)(164), UNITY_DISPLAY_STYLE_INT); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
void test_categorySelection_Sports(void) { |
|
|
|
|
|
|
|
Kategorie kategorien[3]; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
char auswahl[50] = "Sports"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int auswahlIndex = -1; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < 3; i++) { |
|
|
|
|
|
|
|
if (kategorien[i].fragen != |
|
|
|
|
|
|
|
((void *)0) |
|
|
|
|
|
|
|
&& strcmp(auswahl, "Mountains") == 0) { |
|
|
|
|
|
|
|
auswahlIndex = 0; |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else if (kategorien[i].fragen != |
|
|
|
|
|
|
|
((void *)0) |
|
|
|
|
|
|
|
&& strcmp(auswahl, "Cooking") == 0) { |
|
|
|
|
|
|
|
auswahlIndex = 1; |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else if (kategorien[i].fragen != |
|
|
|
|
|
|
|
((void *)0) |
|
|
|
|
|
|
|
&& strcmp(auswahl, "Sports") == 0) { |
|
|
|
|
|
|
|
auswahlIndex = 2; |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UnityAssertEqualNumber((UNITY_INT)((2)), (UNITY_INT)((auswahlIndex)), ( |
|
|
|
|
|
|
|
((void *)0) |
|
|
|
|
|
|
|
), (UNITY_UINT)(188), UNITY_DISPLAY_STYLE_INT); |
|
|
|
|
|
|
|
} |