|
|
@ -193,3 +193,69 @@ void test_MountainsFragen(void) { |
|
|
|
free(kategorien[0].fragen); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
void test_createCategory2WithQuestions(void) { |
|
|
|
|
|
|
|
Kategorie kategorien[3]; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
kategorien[2].fragen = (QuizFrage*)malloc(3 * sizeof(QuizFrage)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
kategorien[2].fragen[0] = erstelleFrage("In which sport is the term 'home run' used?", "Soccer/Football", "Baseball", "Tennis", "Golf", 'B'); |
|
|
|
|
|
|
|
kategorien[2].fragen[1] = erstelleFrage("How many players are there normally on the pitch in a soccer/football team?", "9", "11", "7", "5", 'B'); |
|
|
|
|
|
|
|
kategorien[2].fragen[2] = erstelleFrage("What sport is played on a pitch and has a 'wicket'?", "Rugby", "Cricket", "American Football", "Hockey", 'B'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
kategorien[2].anzahlFragen = 3; |
|
|
|
|
|
|
|
kategorien[2].joker = 1; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UnityAssertEqualString((const char*)(("In which sport is the term 'home run' used?")), (const char*)((kategorien[2].fragen[0].frage)), ( |
|
|
|
|
|
|
|
((void *)0) |
|
|
|
|
|
|
|
), (UNITY_UINT)(77)); |
|
|
|
|
|
|
|
UnityAssertEqualString((const char*)(("Soccer/Football")), (const char*)((kategorien[2].fragen[0].antwortA)), ( |
|
|
|
|
|
|
|
((void *)0) |
|
|
|
|
|
|
|
), (UNITY_UINT)(78)); |
|
|
|
|
|
|
|
UnityAssertEqualString((const char*)(("Baseball")), (const char*)((kategorien[2].fragen[0].antwortB)), ( |
|
|
|
|
|
|
|
((void *)0) |
|
|
|
|
|
|
|
), (UNITY_UINT)(79)); |
|
|
|
|
|
|
|
UnityAssertEqualString((const char*)(("Tennis")), (const char*)((kategorien[2].fragen[0].antwortC)), ( |
|
|
|
|
|
|
|
((void *)0) |
|
|
|
|
|
|
|
), (UNITY_UINT)(80)); |
|
|
|
|
|
|
|
UnityAssertEqualString((const char*)(("Golf")), (const char*)((kategorien[2].fragen[0].antwortD)), ( |
|
|
|
|
|
|
|
((void *)0) |
|
|
|
|
|
|
|
), (UNITY_UINT)(81)); |
|
|
|
|
|
|
|
UnityAssertEqualNumber((UNITY_INT)(UNITY_INT8 )(('B')), (UNITY_INT)(UNITY_INT8 )((kategorien[2].fragen[0].korrekteAntwort)), ( |
|
|
|
|
|
|
|
((void *)0) |
|
|
|
|
|
|
|
), (UNITY_UINT)(82), UNITY_DISPLAY_STYLE_CHAR); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
free(kategorien[2].fragen); |
|
|
|
|
|
|
|
} |