diff --git a/build/test/cache/test_quizduell.c b/build/test/cache/test_quizduell.c index 34fd6ef..af07bf8 100644 --- a/build/test/cache/test_quizduell.c +++ b/build/test/cache/test_quizduell.c @@ -24,37 +24,37 @@ void test_erstelleFrage(void) { ((void *)0) - ), (UNITY_UINT)(14)); + ), (UNITY_UINT)(15)); UnityAssertEqualString((const char*)(("AntwortA")), (const char*)((testFrage.antwortA)), ( ((void *)0) - ), (UNITY_UINT)(15)); + ), (UNITY_UINT)(16)); UnityAssertEqualString((const char*)(("AntwortB")), (const char*)((testFrage.antwortB)), ( ((void *)0) - ), (UNITY_UINT)(16)); + ), (UNITY_UINT)(17)); UnityAssertEqualString((const char*)(("AntwortC")), (const char*)((testFrage.antwortC)), ( ((void *)0) - ), (UNITY_UINT)(17)); + ), (UNITY_UINT)(18)); UnityAssertEqualString((const char*)(("AntwortD")), (const char*)((testFrage.antwortD)), ( ((void *)0) - ), (UNITY_UINT)(18)); + ), (UNITY_UINT)(19)); UnityAssertEqualNumber((UNITY_INT)(UNITY_INT8 )(('A')), (UNITY_INT)(UNITY_INT8 )((testFrage.korrekteAntwort)), ( ((void *)0) - ), (UNITY_UINT)(19), UNITY_DISPLAY_STYLE_CHAR); + ), (UNITY_UINT)(20), UNITY_DISPLAY_STYLE_CHAR); } @@ -88,37 +88,37 @@ void test_CookingFragen(void) { ((void *)0) - ), (UNITY_UINT)(34)); + ), (UNITY_UINT)(35)); UnityAssertEqualString((const char*)(("Tomatoes")), (const char*)((kategorien[1].fragen[0].antwortA)), ( ((void *)0) - ), (UNITY_UINT)(35)); + ), (UNITY_UINT)(36)); UnityAssertEqualString((const char*)(("Basil")), (const char*)((kategorien[1].fragen[0].antwortB)), ( ((void *)0) - ), (UNITY_UINT)(36)); + ), (UNITY_UINT)(37)); UnityAssertEqualString((const char*)(("Spinach")), (const char*)((kategorien[1].fragen[0].antwortC)), ( ((void *)0) - ), (UNITY_UINT)(37)); + ), (UNITY_UINT)(38)); UnityAssertEqualString((const char*)(("Oregano")), (const char*)((kategorien[1].fragen[0].antwortD)), ( ((void *)0) - ), (UNITY_UINT)(38)); + ), (UNITY_UINT)(39)); UnityAssertEqualNumber((UNITY_INT)(UNITY_INT8 )(('B')), (UNITY_INT)(UNITY_INT8 )((kategorien[1].fragen[0].korrekteAntwort)), ( ((void *)0) - ), (UNITY_UINT)(39), UNITY_DISPLAY_STYLE_CHAR); + ), (UNITY_UINT)(40), UNITY_DISPLAY_STYLE_CHAR); @@ -156,37 +156,37 @@ void test_MountainsFragen(void) { ((void *)0) - ), (UNITY_UINT)(56)); + ), (UNITY_UINT)(57)); UnityAssertEqualString((const char*)(("2482 Meter")), (const char*)((kategorien[0].fragen[0].antwortA)), ( ((void *)0) - ), (UNITY_UINT)(57)); + ), (UNITY_UINT)(58)); UnityAssertEqualString((const char*)(("2867 Meter")), (const char*)((kategorien[0].fragen[0].antwortB)), ( ((void *)0) - ), (UNITY_UINT)(58)); + ), (UNITY_UINT)(59)); UnityAssertEqualString((const char*)(("2962 Meter")), (const char*)((kategorien[0].fragen[0].antwortC)), ( ((void *)0) - ), (UNITY_UINT)(59)); + ), (UNITY_UINT)(60)); UnityAssertEqualString((const char*)(("3173 Meter")), (const char*)((kategorien[0].fragen[0].antwortD)), ( ((void *)0) - ), (UNITY_UINT)(60)); + ), (UNITY_UINT)(61)); UnityAssertEqualNumber((UNITY_INT)(UNITY_INT8 )(('C')), (UNITY_INT)(UNITY_INT8 )((kategorien[0].fragen[0].korrekteAntwort)), ( ((void *)0) - ), (UNITY_UINT)(61), UNITY_DISPLAY_STYLE_CHAR); + ), (UNITY_UINT)(62), UNITY_DISPLAY_STYLE_CHAR); @@ -222,37 +222,37 @@ void test_createCategory2WithQuestions(void) { ((void *)0) - ), (UNITY_UINT)(77)); + ), (UNITY_UINT)(78)); UnityAssertEqualString((const char*)(("Soccer/Football")), (const char*)((kategorien[2].fragen[0].antwortA)), ( ((void *)0) - ), (UNITY_UINT)(78)); + ), (UNITY_UINT)(79)); UnityAssertEqualString((const char*)(("Baseball")), (const char*)((kategorien[2].fragen[0].antwortB)), ( ((void *)0) - ), (UNITY_UINT)(79)); + ), (UNITY_UINT)(80)); UnityAssertEqualString((const char*)(("Tennis")), (const char*)((kategorien[2].fragen[0].antwortC)), ( ((void *)0) - ), (UNITY_UINT)(80)); + ), (UNITY_UINT)(81)); UnityAssertEqualString((const char*)(("Golf")), (const char*)((kategorien[2].fragen[0].antwortD)), ( ((void *)0) - ), (UNITY_UINT)(81)); + ), (UNITY_UINT)(82)); UnityAssertEqualNumber((UNITY_INT)(UNITY_INT8 )(('B')), (UNITY_INT)(UNITY_INT8 )((kategorien[2].fragen[0].korrekteAntwort)), ( ((void *)0) - ), (UNITY_UINT)(82), UNITY_DISPLAY_STYLE_CHAR); + ), (UNITY_UINT)(83), UNITY_DISPLAY_STYLE_CHAR); @@ -280,19 +280,19 @@ void test_befreieKategorie(void) { ((void *)0) - )) {} else {UnityFail( (((" Expected NULL"))), (UNITY_UINT)((UNITY_UINT)((UNITY_UINT)(94))));}} while(0); + )) {} else {UnityFail( (((" Expected NULL"))), (UNITY_UINT)((UNITY_UINT)((UNITY_UINT)(95))));}} while(0); UnityAssertEqualNumber((UNITY_INT)((0)), (UNITY_INT)((testKategorie.anzahlFragen)), ( ((void *)0) - ), (UNITY_UINT)(95), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(96), UNITY_DISPLAY_STYLE_INT); UnityAssertEqualNumber((UNITY_INT)((0)), (UNITY_INT)((testKategorie.joker)), ( ((void *)0) - ), (UNITY_UINT)(96), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(97), UNITY_DISPLAY_STYLE_INT); } @@ -304,7 +304,7 @@ void test_pruefeAntwort_CorrectAnswer(void) { ((void *)0) - ), (UNITY_UINT)(100), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(101), UNITY_DISPLAY_STYLE_INT); } @@ -316,7 +316,7 @@ void test_pruefeAntwort_WrongAnswer(void) { ((void *)0) - ), (UNITY_UINT)(104), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(105), UNITY_DISPLAY_STYLE_INT); } @@ -346,127 +346,127 @@ void test_sportsCategoryInitialization(void) { ((void *)0) - )) {} else {UnityFail( (((" Expected Non-NULL"))), (UNITY_UINT)((UNITY_UINT)((UNITY_UINT)(117))));}} while(0); + )) {} else {UnityFail( (((" Expected Non-NULL"))), (UNITY_UINT)((UNITY_UINT)((UNITY_UINT)(118))));}} while(0); UnityAssertEqualString((const char*)(("In which sport is the term 'home run' used?")), (const char*)((kategorien[2].fragen[0].frage)), ( ((void *)0) - ), (UNITY_UINT)(118)); + ), (UNITY_UINT)(119)); UnityAssertEqualString((const char*)(("Soccer/Football")), (const char*)((kategorien[2].fragen[0].antwortA)), ( ((void *)0) - ), (UNITY_UINT)(119)); + ), (UNITY_UINT)(120)); UnityAssertEqualString((const char*)(("Baseball")), (const char*)((kategorien[2].fragen[0].antwortB)), ( ((void *)0) - ), (UNITY_UINT)(120)); + ), (UNITY_UINT)(121)); UnityAssertEqualString((const char*)(("Tennis")), (const char*)((kategorien[2].fragen[0].antwortC)), ( ((void *)0) - ), (UNITY_UINT)(121)); + ), (UNITY_UINT)(122)); UnityAssertEqualString((const char*)(("Golf")), (const char*)((kategorien[2].fragen[0].antwortD)), ( ((void *)0) - ), (UNITY_UINT)(122)); + ), (UNITY_UINT)(123)); UnityAssertEqualNumber((UNITY_INT)(('B')), (UNITY_INT)((kategorien[2].fragen[0].korrekteAntwort)), ( ((void *)0) - ), (UNITY_UINT)(123), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(124), UNITY_DISPLAY_STYLE_INT); UnityAssertEqualString((const char*)(("How many players are there normally on the pitch in a soccer/football team?")), (const char*)((kategorien[2].fragen[1].frage)), ( ((void *)0) - ), (UNITY_UINT)(124)); + ), (UNITY_UINT)(125)); UnityAssertEqualString((const char*)(("9")), (const char*)((kategorien[2].fragen[1].antwortA)), ( ((void *)0) - ), (UNITY_UINT)(125)); + ), (UNITY_UINT)(126)); UnityAssertEqualString((const char*)(("11")), (const char*)((kategorien[2].fragen[1].antwortB)), ( ((void *)0) - ), (UNITY_UINT)(126)); + ), (UNITY_UINT)(127)); UnityAssertEqualString((const char*)(("7")), (const char*)((kategorien[2].fragen[1].antwortC)), ( ((void *)0) - ), (UNITY_UINT)(127)); + ), (UNITY_UINT)(128)); UnityAssertEqualString((const char*)(("5")), (const char*)((kategorien[2].fragen[1].antwortD)), ( ((void *)0) - ), (UNITY_UINT)(128)); + ), (UNITY_UINT)(129)); UnityAssertEqualNumber((UNITY_INT)(('B')), (UNITY_INT)((kategorien[2].fragen[1].korrekteAntwort)), ( ((void *)0) - ), (UNITY_UINT)(129), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(130), UNITY_DISPLAY_STYLE_INT); UnityAssertEqualString((const char*)(("What sport is played on a pitch and has a 'wicket'?")), (const char*)((kategorien[2].fragen[2].frage)), ( ((void *)0) - ), (UNITY_UINT)(130)); + ), (UNITY_UINT)(131)); UnityAssertEqualString((const char*)(("Rugby")), (const char*)((kategorien[2].fragen[2].antwortA)), ( ((void *)0) - ), (UNITY_UINT)(131)); + ), (UNITY_UINT)(132)); UnityAssertEqualString((const char*)(("Cricket")), (const char*)((kategorien[2].fragen[2].antwortB)), ( ((void *)0) - ), (UNITY_UINT)(132)); + ), (UNITY_UINT)(133)); UnityAssertEqualString((const char*)(("American Football")), (const char*)((kategorien[2].fragen[2].antwortC)), ( ((void *)0) - ), (UNITY_UINT)(133)); + ), (UNITY_UINT)(134)); UnityAssertEqualString((const char*)(("Hockey")), (const char*)((kategorien[2].fragen[2].antwortD)), ( ((void *)0) - ), (UNITY_UINT)(134)); + ), (UNITY_UINT)(135)); UnityAssertEqualNumber((UNITY_INT)(('B')), (UNITY_INT)((kategorien[2].fragen[2].korrekteAntwort)), ( ((void *)0) - ), (UNITY_UINT)(135), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(136), UNITY_DISPLAY_STYLE_INT); UnityAssertEqualNumber((UNITY_INT)((3)), (UNITY_INT)((kategorien[2].anzahlFragen)), ( ((void *)0) - ), (UNITY_UINT)(136), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(137), UNITY_DISPLAY_STYLE_INT); UnityAssertEqualNumber((UNITY_INT)((1)), (UNITY_INT)((kategorien[2].joker)), ( ((void *)0) - ), (UNITY_UINT)(137), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(138), UNITY_DISPLAY_STYLE_INT); @@ -538,6 +538,6 @@ void test_categorySelection_Cooking(void) { ((void *)0) - ), (UNITY_UINT)(163), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(164), UNITY_DISPLAY_STYLE_INT); } diff --git a/build/test/out/c/test_quizduell.o b/build/test/out/c/test_quizduell.o index d36fcce..994c0fd 100644 Binary files a/build/test/out/c/test_quizduell.o and b/build/test/out/c/test_quizduell.o differ diff --git a/build/test/out/c/test_quizduell_runner.o b/build/test/out/c/test_quizduell_runner.o index 24748a0..9b7c63f 100644 Binary files a/build/test/out/c/test_quizduell_runner.o and b/build/test/out/c/test_quizduell_runner.o differ diff --git a/build/test/out/test_quizduell.out b/build/test/out/test_quizduell.out old mode 100755 new mode 100644 index fba414a..ea1690d Binary files a/build/test/out/test_quizduell.out and b/build/test/out/test_quizduell.out differ diff --git a/build/test/preprocess/files/test_quizduell.c b/build/test/preprocess/files/test_quizduell.c index 34fd6ef..af07bf8 100644 --- a/build/test/preprocess/files/test_quizduell.c +++ b/build/test/preprocess/files/test_quizduell.c @@ -24,37 +24,37 @@ void test_erstelleFrage(void) { ((void *)0) - ), (UNITY_UINT)(14)); + ), (UNITY_UINT)(15)); UnityAssertEqualString((const char*)(("AntwortA")), (const char*)((testFrage.antwortA)), ( ((void *)0) - ), (UNITY_UINT)(15)); + ), (UNITY_UINT)(16)); UnityAssertEqualString((const char*)(("AntwortB")), (const char*)((testFrage.antwortB)), ( ((void *)0) - ), (UNITY_UINT)(16)); + ), (UNITY_UINT)(17)); UnityAssertEqualString((const char*)(("AntwortC")), (const char*)((testFrage.antwortC)), ( ((void *)0) - ), (UNITY_UINT)(17)); + ), (UNITY_UINT)(18)); UnityAssertEqualString((const char*)(("AntwortD")), (const char*)((testFrage.antwortD)), ( ((void *)0) - ), (UNITY_UINT)(18)); + ), (UNITY_UINT)(19)); UnityAssertEqualNumber((UNITY_INT)(UNITY_INT8 )(('A')), (UNITY_INT)(UNITY_INT8 )((testFrage.korrekteAntwort)), ( ((void *)0) - ), (UNITY_UINT)(19), UNITY_DISPLAY_STYLE_CHAR); + ), (UNITY_UINT)(20), UNITY_DISPLAY_STYLE_CHAR); } @@ -88,37 +88,37 @@ void test_CookingFragen(void) { ((void *)0) - ), (UNITY_UINT)(34)); + ), (UNITY_UINT)(35)); UnityAssertEqualString((const char*)(("Tomatoes")), (const char*)((kategorien[1].fragen[0].antwortA)), ( ((void *)0) - ), (UNITY_UINT)(35)); + ), (UNITY_UINT)(36)); UnityAssertEqualString((const char*)(("Basil")), (const char*)((kategorien[1].fragen[0].antwortB)), ( ((void *)0) - ), (UNITY_UINT)(36)); + ), (UNITY_UINT)(37)); UnityAssertEqualString((const char*)(("Spinach")), (const char*)((kategorien[1].fragen[0].antwortC)), ( ((void *)0) - ), (UNITY_UINT)(37)); + ), (UNITY_UINT)(38)); UnityAssertEqualString((const char*)(("Oregano")), (const char*)((kategorien[1].fragen[0].antwortD)), ( ((void *)0) - ), (UNITY_UINT)(38)); + ), (UNITY_UINT)(39)); UnityAssertEqualNumber((UNITY_INT)(UNITY_INT8 )(('B')), (UNITY_INT)(UNITY_INT8 )((kategorien[1].fragen[0].korrekteAntwort)), ( ((void *)0) - ), (UNITY_UINT)(39), UNITY_DISPLAY_STYLE_CHAR); + ), (UNITY_UINT)(40), UNITY_DISPLAY_STYLE_CHAR); @@ -156,37 +156,37 @@ void test_MountainsFragen(void) { ((void *)0) - ), (UNITY_UINT)(56)); + ), (UNITY_UINT)(57)); UnityAssertEqualString((const char*)(("2482 Meter")), (const char*)((kategorien[0].fragen[0].antwortA)), ( ((void *)0) - ), (UNITY_UINT)(57)); + ), (UNITY_UINT)(58)); UnityAssertEqualString((const char*)(("2867 Meter")), (const char*)((kategorien[0].fragen[0].antwortB)), ( ((void *)0) - ), (UNITY_UINT)(58)); + ), (UNITY_UINT)(59)); UnityAssertEqualString((const char*)(("2962 Meter")), (const char*)((kategorien[0].fragen[0].antwortC)), ( ((void *)0) - ), (UNITY_UINT)(59)); + ), (UNITY_UINT)(60)); UnityAssertEqualString((const char*)(("3173 Meter")), (const char*)((kategorien[0].fragen[0].antwortD)), ( ((void *)0) - ), (UNITY_UINT)(60)); + ), (UNITY_UINT)(61)); UnityAssertEqualNumber((UNITY_INT)(UNITY_INT8 )(('C')), (UNITY_INT)(UNITY_INT8 )((kategorien[0].fragen[0].korrekteAntwort)), ( ((void *)0) - ), (UNITY_UINT)(61), UNITY_DISPLAY_STYLE_CHAR); + ), (UNITY_UINT)(62), UNITY_DISPLAY_STYLE_CHAR); @@ -222,37 +222,37 @@ void test_createCategory2WithQuestions(void) { ((void *)0) - ), (UNITY_UINT)(77)); + ), (UNITY_UINT)(78)); UnityAssertEqualString((const char*)(("Soccer/Football")), (const char*)((kategorien[2].fragen[0].antwortA)), ( ((void *)0) - ), (UNITY_UINT)(78)); + ), (UNITY_UINT)(79)); UnityAssertEqualString((const char*)(("Baseball")), (const char*)((kategorien[2].fragen[0].antwortB)), ( ((void *)0) - ), (UNITY_UINT)(79)); + ), (UNITY_UINT)(80)); UnityAssertEqualString((const char*)(("Tennis")), (const char*)((kategorien[2].fragen[0].antwortC)), ( ((void *)0) - ), (UNITY_UINT)(80)); + ), (UNITY_UINT)(81)); UnityAssertEqualString((const char*)(("Golf")), (const char*)((kategorien[2].fragen[0].antwortD)), ( ((void *)0) - ), (UNITY_UINT)(81)); + ), (UNITY_UINT)(82)); UnityAssertEqualNumber((UNITY_INT)(UNITY_INT8 )(('B')), (UNITY_INT)(UNITY_INT8 )((kategorien[2].fragen[0].korrekteAntwort)), ( ((void *)0) - ), (UNITY_UINT)(82), UNITY_DISPLAY_STYLE_CHAR); + ), (UNITY_UINT)(83), UNITY_DISPLAY_STYLE_CHAR); @@ -280,19 +280,19 @@ void test_befreieKategorie(void) { ((void *)0) - )) {} else {UnityFail( (((" Expected NULL"))), (UNITY_UINT)((UNITY_UINT)((UNITY_UINT)(94))));}} while(0); + )) {} else {UnityFail( (((" Expected NULL"))), (UNITY_UINT)((UNITY_UINT)((UNITY_UINT)(95))));}} while(0); UnityAssertEqualNumber((UNITY_INT)((0)), (UNITY_INT)((testKategorie.anzahlFragen)), ( ((void *)0) - ), (UNITY_UINT)(95), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(96), UNITY_DISPLAY_STYLE_INT); UnityAssertEqualNumber((UNITY_INT)((0)), (UNITY_INT)((testKategorie.joker)), ( ((void *)0) - ), (UNITY_UINT)(96), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(97), UNITY_DISPLAY_STYLE_INT); } @@ -304,7 +304,7 @@ void test_pruefeAntwort_CorrectAnswer(void) { ((void *)0) - ), (UNITY_UINT)(100), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(101), UNITY_DISPLAY_STYLE_INT); } @@ -316,7 +316,7 @@ void test_pruefeAntwort_WrongAnswer(void) { ((void *)0) - ), (UNITY_UINT)(104), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(105), UNITY_DISPLAY_STYLE_INT); } @@ -346,127 +346,127 @@ void test_sportsCategoryInitialization(void) { ((void *)0) - )) {} else {UnityFail( (((" Expected Non-NULL"))), (UNITY_UINT)((UNITY_UINT)((UNITY_UINT)(117))));}} while(0); + )) {} else {UnityFail( (((" Expected Non-NULL"))), (UNITY_UINT)((UNITY_UINT)((UNITY_UINT)(118))));}} while(0); UnityAssertEqualString((const char*)(("In which sport is the term 'home run' used?")), (const char*)((kategorien[2].fragen[0].frage)), ( ((void *)0) - ), (UNITY_UINT)(118)); + ), (UNITY_UINT)(119)); UnityAssertEqualString((const char*)(("Soccer/Football")), (const char*)((kategorien[2].fragen[0].antwortA)), ( ((void *)0) - ), (UNITY_UINT)(119)); + ), (UNITY_UINT)(120)); UnityAssertEqualString((const char*)(("Baseball")), (const char*)((kategorien[2].fragen[0].antwortB)), ( ((void *)0) - ), (UNITY_UINT)(120)); + ), (UNITY_UINT)(121)); UnityAssertEqualString((const char*)(("Tennis")), (const char*)((kategorien[2].fragen[0].antwortC)), ( ((void *)0) - ), (UNITY_UINT)(121)); + ), (UNITY_UINT)(122)); UnityAssertEqualString((const char*)(("Golf")), (const char*)((kategorien[2].fragen[0].antwortD)), ( ((void *)0) - ), (UNITY_UINT)(122)); + ), (UNITY_UINT)(123)); UnityAssertEqualNumber((UNITY_INT)(('B')), (UNITY_INT)((kategorien[2].fragen[0].korrekteAntwort)), ( ((void *)0) - ), (UNITY_UINT)(123), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(124), UNITY_DISPLAY_STYLE_INT); UnityAssertEqualString((const char*)(("How many players are there normally on the pitch in a soccer/football team?")), (const char*)((kategorien[2].fragen[1].frage)), ( ((void *)0) - ), (UNITY_UINT)(124)); + ), (UNITY_UINT)(125)); UnityAssertEqualString((const char*)(("9")), (const char*)((kategorien[2].fragen[1].antwortA)), ( ((void *)0) - ), (UNITY_UINT)(125)); + ), (UNITY_UINT)(126)); UnityAssertEqualString((const char*)(("11")), (const char*)((kategorien[2].fragen[1].antwortB)), ( ((void *)0) - ), (UNITY_UINT)(126)); + ), (UNITY_UINT)(127)); UnityAssertEqualString((const char*)(("7")), (const char*)((kategorien[2].fragen[1].antwortC)), ( ((void *)0) - ), (UNITY_UINT)(127)); + ), (UNITY_UINT)(128)); UnityAssertEqualString((const char*)(("5")), (const char*)((kategorien[2].fragen[1].antwortD)), ( ((void *)0) - ), (UNITY_UINT)(128)); + ), (UNITY_UINT)(129)); UnityAssertEqualNumber((UNITY_INT)(('B')), (UNITY_INT)((kategorien[2].fragen[1].korrekteAntwort)), ( ((void *)0) - ), (UNITY_UINT)(129), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(130), UNITY_DISPLAY_STYLE_INT); UnityAssertEqualString((const char*)(("What sport is played on a pitch and has a 'wicket'?")), (const char*)((kategorien[2].fragen[2].frage)), ( ((void *)0) - ), (UNITY_UINT)(130)); + ), (UNITY_UINT)(131)); UnityAssertEqualString((const char*)(("Rugby")), (const char*)((kategorien[2].fragen[2].antwortA)), ( ((void *)0) - ), (UNITY_UINT)(131)); + ), (UNITY_UINT)(132)); UnityAssertEqualString((const char*)(("Cricket")), (const char*)((kategorien[2].fragen[2].antwortB)), ( ((void *)0) - ), (UNITY_UINT)(132)); + ), (UNITY_UINT)(133)); UnityAssertEqualString((const char*)(("American Football")), (const char*)((kategorien[2].fragen[2].antwortC)), ( ((void *)0) - ), (UNITY_UINT)(133)); + ), (UNITY_UINT)(134)); UnityAssertEqualString((const char*)(("Hockey")), (const char*)((kategorien[2].fragen[2].antwortD)), ( ((void *)0) - ), (UNITY_UINT)(134)); + ), (UNITY_UINT)(135)); UnityAssertEqualNumber((UNITY_INT)(('B')), (UNITY_INT)((kategorien[2].fragen[2].korrekteAntwort)), ( ((void *)0) - ), (UNITY_UINT)(135), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(136), UNITY_DISPLAY_STYLE_INT); UnityAssertEqualNumber((UNITY_INT)((3)), (UNITY_INT)((kategorien[2].anzahlFragen)), ( ((void *)0) - ), (UNITY_UINT)(136), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(137), UNITY_DISPLAY_STYLE_INT); UnityAssertEqualNumber((UNITY_INT)((1)), (UNITY_INT)((kategorien[2].joker)), ( ((void *)0) - ), (UNITY_UINT)(137), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(138), UNITY_DISPLAY_STYLE_INT); @@ -538,6 +538,6 @@ void test_categorySelection_Cooking(void) { ((void *)0) - ), (UNITY_UINT)(163), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(164), UNITY_DISPLAY_STYLE_INT); } diff --git a/build/test/results/test_casualQuiz.pass b/build/test/results/test_casualQuiz.pass index ed0ab35..ee61736 100644 --- a/build/test/results/test_casualQuiz.pass +++ b/build/test/results/test_casualQuiz.pass @@ -11,4 +11,4 @@ :failed: 0 :ignored: 0 :stdout: [] -:time: 0.01713199999903736 +:time: 0.016197599999941303 diff --git a/build/test/results/test_quizduell.pass b/build/test/results/test_quizduell.pass index 8a5ec0c..184f8a2 100644 --- a/build/test/results/test_quizduell.pass +++ b/build/test/results/test_quizduell.pass @@ -4,39 +4,39 @@ :file: test_quizduell.c :successes: - :test: test_erstelleFrage - :line: 11 + :line: 12 :message: '' :unity_test_time: 0 - :test: test_CookingFragen - :line: 22 + :line: 23 :message: '' :unity_test_time: 0 - :test: test_MountainsFragen - :line: 44 + :line: 45 :message: '' :unity_test_time: 0 - :test: test_createCategory2WithQuestions - :line: 65 + :line: 66 :message: '' :unity_test_time: 0 - :test: test_befreieKategorie - :line: 86 + :line: 87 :message: '' :unity_test_time: 0 - :test: test_pruefeAntwort_CorrectAnswer - :line: 98 + :line: 99 :message: '' :unity_test_time: 0 - :test: test_pruefeAntwort_WrongAnswer - :line: 102 + :line: 103 :message: '' :unity_test_time: 0 - :test: test_sportsCategoryInitialization - :line: 106 + :line: 107 :message: '' :unity_test_time: 0 - :test: test_categorySelection_Cooking - :line: 142 + :line: 143 :message: '' :unity_test_time: 0 :failures: [] @@ -47,4 +47,4 @@ :failed: 0 :ignored: 0 :stdout: [] -:time: 0.0320902000003116 +:time: 0.03187939999952505 diff --git a/build/test/results/test_timequiz.pass b/build/test/results/test_timequiz.pass index d28e2aa..e5dafdc 100644 --- a/build/test/results/test_timequiz.pass +++ b/build/test/results/test_timequiz.pass @@ -11,4 +11,4 @@ :failed: 0 :ignored: 0 :stdout: [] -:time: 0.01697989999956917 +:time: 0.016576800000621006 diff --git a/build/test/results/test_wwm.pass b/build/test/results/test_wwm.pass index 65b68ff..2805a63 100644 --- a/build/test/results/test_wwm.pass +++ b/build/test/results/test_wwm.pass @@ -11,4 +11,4 @@ :failed: 0 :ignored: 0 :stdout: [] -:time: 0.017033699999956298 +:time: 0.016380900000513066 diff --git a/build/test/runners/test_quizduell_runner.c b/build/test/runners/test_quizduell_runner.c index adf36b6..ac6fc04 100644 --- a/build/test/runners/test_quizduell_runner.c +++ b/build/test/runners/test_quizduell_runner.c @@ -83,15 +83,15 @@ static void run_test(UnityTestFunction func, const char* name, UNITY_LINE_TYPE l int main(void) { UnityBegin("test_quizduell.c"); - run_test(test_erstelleFrage, "test_erstelleFrage", 11); - run_test(test_CookingFragen, "test_CookingFragen", 22); - run_test(test_MountainsFragen, "test_MountainsFragen", 44); - run_test(test_createCategory2WithQuestions, "test_createCategory2WithQuestions", 65); - run_test(test_befreieKategorie, "test_befreieKategorie", 86); - run_test(test_pruefeAntwort_CorrectAnswer, "test_pruefeAntwort_CorrectAnswer", 98); - run_test(test_pruefeAntwort_WrongAnswer, "test_pruefeAntwort_WrongAnswer", 102); - run_test(test_sportsCategoryInitialization, "test_sportsCategoryInitialization", 106); - run_test(test_categorySelection_Cooking, "test_categorySelection_Cooking", 142); + run_test(test_erstelleFrage, "test_erstelleFrage", 12); + run_test(test_CookingFragen, "test_CookingFragen", 23); + run_test(test_MountainsFragen, "test_MountainsFragen", 45); + run_test(test_createCategory2WithQuestions, "test_createCategory2WithQuestions", 66); + run_test(test_befreieKategorie, "test_befreieKategorie", 87); + run_test(test_pruefeAntwort_CorrectAnswer, "test_pruefeAntwort_CorrectAnswer", 99); + run_test(test_pruefeAntwort_WrongAnswer, "test_pruefeAntwort_WrongAnswer", 103); + run_test(test_sportsCategoryInitialization, "test_sportsCategoryInitialization", 107); + run_test(test_categorySelection_Cooking, "test_categorySelection_Cooking", 143); return UnityEnd(); } diff --git a/test/test_quizduell.c b/test/test_quizduell.c index da21565..391d8d5 100644 --- a/test/test_quizduell.c +++ b/test/test_quizduell.c @@ -163,4 +163,28 @@ void test_categorySelection_Cooking(void) { } TEST_ASSERT_EQUAL(1, auswahlIndex); } +void test_categorySelection_Sports(void) { + Kategorie kategorien[MAX_CATEGORIES]; + + char auswahl[50] = "Sports"; + + int auswahlIndex = -1; + + for (int i = 0; i < MAX_CATEGORIES; i++) { + if (kategorien[i].fragen != NULL && strcmp(auswahl, "Mountains") == 0) { + auswahlIndex = 0; + break; + } + else if (kategorien[i].fragen != NULL && strcmp(auswahl, "Cooking") == 0) { + auswahlIndex = 1; + break; + } + else if (kategorien[i].fragen != NULL && strcmp(auswahl, "Sports") == 0) { + auswahlIndex = 2; + break; + } + } + + TEST_ASSERT_EQUAL(2, auswahlIndex); +} #endif //TEST \ No newline at end of file