Browse Source

Unittest10

remotes/origin/Kevin
Kevin Schellberg 11 months ago
parent
commit
e9a593cbdd
  1. 102
      build/test/cache/test_quizduell.c
  2. BIN
      build/test/out/c/test_quizduell.o
  3. BIN
      build/test/out/c/test_quizduell_runner.o
  4. BIN
      build/test/out/test_quizduell.out
  5. 102
      build/test/preprocess/files/test_quizduell.c
  6. 2
      build/test/results/test_casualQuiz.pass
  7. 20
      build/test/results/test_quizduell.pass
  8. 2
      build/test/results/test_timequiz.pass
  9. 2
      build/test/results/test_wwm.pass
  10. 18
      build/test/runners/test_quizduell_runner.c
  11. 24
      test/test_quizduell.c

102
build/test/cache/test_quizduell.c

@ -24,37 +24,37 @@ void test_erstelleFrage(void) {
((void *)0) ((void *)0)
), (UNITY_UINT)(14));
), (UNITY_UINT)(15));
UnityAssertEqualString((const char*)(("AntwortA")), (const char*)((testFrage.antwortA)), ( UnityAssertEqualString((const char*)(("AntwortA")), (const char*)((testFrage.antwortA)), (
((void *)0) ((void *)0)
), (UNITY_UINT)(15));
), (UNITY_UINT)(16));
UnityAssertEqualString((const char*)(("AntwortB")), (const char*)((testFrage.antwortB)), ( UnityAssertEqualString((const char*)(("AntwortB")), (const char*)((testFrage.antwortB)), (
((void *)0) ((void *)0)
), (UNITY_UINT)(16));
), (UNITY_UINT)(17));
UnityAssertEqualString((const char*)(("AntwortC")), (const char*)((testFrage.antwortC)), ( UnityAssertEqualString((const char*)(("AntwortC")), (const char*)((testFrage.antwortC)), (
((void *)0) ((void *)0)
), (UNITY_UINT)(17));
), (UNITY_UINT)(18));
UnityAssertEqualString((const char*)(("AntwortD")), (const char*)((testFrage.antwortD)), ( UnityAssertEqualString((const char*)(("AntwortD")), (const char*)((testFrage.antwortD)), (
((void *)0) ((void *)0)
), (UNITY_UINT)(18));
), (UNITY_UINT)(19));
UnityAssertEqualNumber((UNITY_INT)(UNITY_INT8 )(('A')), (UNITY_INT)(UNITY_INT8 )((testFrage.korrekteAntwort)), ( UnityAssertEqualNumber((UNITY_INT)(UNITY_INT8 )(('A')), (UNITY_INT)(UNITY_INT8 )((testFrage.korrekteAntwort)), (
((void *)0) ((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) ((void *)0)
), (UNITY_UINT)(34));
), (UNITY_UINT)(35));
UnityAssertEqualString((const char*)(("Tomatoes")), (const char*)((kategorien[1].fragen[0].antwortA)), ( UnityAssertEqualString((const char*)(("Tomatoes")), (const char*)((kategorien[1].fragen[0].antwortA)), (
((void *)0) ((void *)0)
), (UNITY_UINT)(35));
), (UNITY_UINT)(36));
UnityAssertEqualString((const char*)(("Basil")), (const char*)((kategorien[1].fragen[0].antwortB)), ( UnityAssertEqualString((const char*)(("Basil")), (const char*)((kategorien[1].fragen[0].antwortB)), (
((void *)0) ((void *)0)
), (UNITY_UINT)(36));
), (UNITY_UINT)(37));
UnityAssertEqualString((const char*)(("Spinach")), (const char*)((kategorien[1].fragen[0].antwortC)), ( UnityAssertEqualString((const char*)(("Spinach")), (const char*)((kategorien[1].fragen[0].antwortC)), (
((void *)0) ((void *)0)
), (UNITY_UINT)(37));
), (UNITY_UINT)(38));
UnityAssertEqualString((const char*)(("Oregano")), (const char*)((kategorien[1].fragen[0].antwortD)), ( UnityAssertEqualString((const char*)(("Oregano")), (const char*)((kategorien[1].fragen[0].antwortD)), (
((void *)0) ((void *)0)
), (UNITY_UINT)(38));
), (UNITY_UINT)(39));
UnityAssertEqualNumber((UNITY_INT)(UNITY_INT8 )(('B')), (UNITY_INT)(UNITY_INT8 )((kategorien[1].fragen[0].korrekteAntwort)), ( UnityAssertEqualNumber((UNITY_INT)(UNITY_INT8 )(('B')), (UNITY_INT)(UNITY_INT8 )((kategorien[1].fragen[0].korrekteAntwort)), (
((void *)0) ((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) ((void *)0)
), (UNITY_UINT)(56));
), (UNITY_UINT)(57));
UnityAssertEqualString((const char*)(("2482 Meter")), (const char*)((kategorien[0].fragen[0].antwortA)), ( UnityAssertEqualString((const char*)(("2482 Meter")), (const char*)((kategorien[0].fragen[0].antwortA)), (
((void *)0) ((void *)0)
), (UNITY_UINT)(57));
), (UNITY_UINT)(58));
UnityAssertEqualString((const char*)(("2867 Meter")), (const char*)((kategorien[0].fragen[0].antwortB)), ( UnityAssertEqualString((const char*)(("2867 Meter")), (const char*)((kategorien[0].fragen[0].antwortB)), (
((void *)0) ((void *)0)
), (UNITY_UINT)(58));
), (UNITY_UINT)(59));
UnityAssertEqualString((const char*)(("2962 Meter")), (const char*)((kategorien[0].fragen[0].antwortC)), ( UnityAssertEqualString((const char*)(("2962 Meter")), (const char*)((kategorien[0].fragen[0].antwortC)), (
((void *)0) ((void *)0)
), (UNITY_UINT)(59));
), (UNITY_UINT)(60));
UnityAssertEqualString((const char*)(("3173 Meter")), (const char*)((kategorien[0].fragen[0].antwortD)), ( UnityAssertEqualString((const char*)(("3173 Meter")), (const char*)((kategorien[0].fragen[0].antwortD)), (
((void *)0) ((void *)0)
), (UNITY_UINT)(60));
), (UNITY_UINT)(61));
UnityAssertEqualNumber((UNITY_INT)(UNITY_INT8 )(('C')), (UNITY_INT)(UNITY_INT8 )((kategorien[0].fragen[0].korrekteAntwort)), ( UnityAssertEqualNumber((UNITY_INT)(UNITY_INT8 )(('C')), (UNITY_INT)(UNITY_INT8 )((kategorien[0].fragen[0].korrekteAntwort)), (
((void *)0) ((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) ((void *)0)
), (UNITY_UINT)(77));
), (UNITY_UINT)(78));
UnityAssertEqualString((const char*)(("Soccer/Football")), (const char*)((kategorien[2].fragen[0].antwortA)), ( UnityAssertEqualString((const char*)(("Soccer/Football")), (const char*)((kategorien[2].fragen[0].antwortA)), (
((void *)0) ((void *)0)
), (UNITY_UINT)(78));
), (UNITY_UINT)(79));
UnityAssertEqualString((const char*)(("Baseball")), (const char*)((kategorien[2].fragen[0].antwortB)), ( UnityAssertEqualString((const char*)(("Baseball")), (const char*)((kategorien[2].fragen[0].antwortB)), (
((void *)0) ((void *)0)
), (UNITY_UINT)(79));
), (UNITY_UINT)(80));
UnityAssertEqualString((const char*)(("Tennis")), (const char*)((kategorien[2].fragen[0].antwortC)), ( UnityAssertEqualString((const char*)(("Tennis")), (const char*)((kategorien[2].fragen[0].antwortC)), (
((void *)0) ((void *)0)
), (UNITY_UINT)(80));
), (UNITY_UINT)(81));
UnityAssertEqualString((const char*)(("Golf")), (const char*)((kategorien[2].fragen[0].antwortD)), ( UnityAssertEqualString((const char*)(("Golf")), (const char*)((kategorien[2].fragen[0].antwortD)), (
((void *)0) ((void *)0)
), (UNITY_UINT)(81));
), (UNITY_UINT)(82));
UnityAssertEqualNumber((UNITY_INT)(UNITY_INT8 )(('B')), (UNITY_INT)(UNITY_INT8 )((kategorien[2].fragen[0].korrekteAntwort)), ( UnityAssertEqualNumber((UNITY_INT)(UNITY_INT8 )(('B')), (UNITY_INT)(UNITY_INT8 )((kategorien[2].fragen[0].korrekteAntwort)), (
((void *)0) ((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) ((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)), ( UnityAssertEqualNumber((UNITY_INT)((0)), (UNITY_INT)((testKategorie.anzahlFragen)), (
((void *)0) ((void *)0)
), (UNITY_UINT)(95), UNITY_DISPLAY_STYLE_INT);
), (UNITY_UINT)(96), UNITY_DISPLAY_STYLE_INT);
UnityAssertEqualNumber((UNITY_INT)((0)), (UNITY_INT)((testKategorie.joker)), ( UnityAssertEqualNumber((UNITY_INT)((0)), (UNITY_INT)((testKategorie.joker)), (
((void *)0) ((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) ((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) ((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) ((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)), ( UnityAssertEqualString((const char*)(("In which sport is the term 'home run' used?")), (const char*)((kategorien[2].fragen[0].frage)), (
((void *)0) ((void *)0)
), (UNITY_UINT)(118));
), (UNITY_UINT)(119));
UnityAssertEqualString((const char*)(("Soccer/Football")), (const char*)((kategorien[2].fragen[0].antwortA)), ( UnityAssertEqualString((const char*)(("Soccer/Football")), (const char*)((kategorien[2].fragen[0].antwortA)), (
((void *)0) ((void *)0)
), (UNITY_UINT)(119));
), (UNITY_UINT)(120));
UnityAssertEqualString((const char*)(("Baseball")), (const char*)((kategorien[2].fragen[0].antwortB)), ( UnityAssertEqualString((const char*)(("Baseball")), (const char*)((kategorien[2].fragen[0].antwortB)), (
((void *)0) ((void *)0)
), (UNITY_UINT)(120));
), (UNITY_UINT)(121));
UnityAssertEqualString((const char*)(("Tennis")), (const char*)((kategorien[2].fragen[0].antwortC)), ( UnityAssertEqualString((const char*)(("Tennis")), (const char*)((kategorien[2].fragen[0].antwortC)), (
((void *)0) ((void *)0)
), (UNITY_UINT)(121));
), (UNITY_UINT)(122));
UnityAssertEqualString((const char*)(("Golf")), (const char*)((kategorien[2].fragen[0].antwortD)), ( UnityAssertEqualString((const char*)(("Golf")), (const char*)((kategorien[2].fragen[0].antwortD)), (
((void *)0) ((void *)0)
), (UNITY_UINT)(122));
), (UNITY_UINT)(123));
UnityAssertEqualNumber((UNITY_INT)(('B')), (UNITY_INT)((kategorien[2].fragen[0].korrekteAntwort)), ( UnityAssertEqualNumber((UNITY_INT)(('B')), (UNITY_INT)((kategorien[2].fragen[0].korrekteAntwort)), (
((void *)0) ((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)), ( 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) ((void *)0)
), (UNITY_UINT)(124));
), (UNITY_UINT)(125));
UnityAssertEqualString((const char*)(("9")), (const char*)((kategorien[2].fragen[1].antwortA)), ( UnityAssertEqualString((const char*)(("9")), (const char*)((kategorien[2].fragen[1].antwortA)), (
((void *)0) ((void *)0)
), (UNITY_UINT)(125));
), (UNITY_UINT)(126));
UnityAssertEqualString((const char*)(("11")), (const char*)((kategorien[2].fragen[1].antwortB)), ( UnityAssertEqualString((const char*)(("11")), (const char*)((kategorien[2].fragen[1].antwortB)), (
((void *)0) ((void *)0)
), (UNITY_UINT)(126));
), (UNITY_UINT)(127));
UnityAssertEqualString((const char*)(("7")), (const char*)((kategorien[2].fragen[1].antwortC)), ( UnityAssertEqualString((const char*)(("7")), (const char*)((kategorien[2].fragen[1].antwortC)), (
((void *)0) ((void *)0)
), (UNITY_UINT)(127));
), (UNITY_UINT)(128));
UnityAssertEqualString((const char*)(("5")), (const char*)((kategorien[2].fragen[1].antwortD)), ( UnityAssertEqualString((const char*)(("5")), (const char*)((kategorien[2].fragen[1].antwortD)), (
((void *)0) ((void *)0)
), (UNITY_UINT)(128));
), (UNITY_UINT)(129));
UnityAssertEqualNumber((UNITY_INT)(('B')), (UNITY_INT)((kategorien[2].fragen[1].korrekteAntwort)), ( UnityAssertEqualNumber((UNITY_INT)(('B')), (UNITY_INT)((kategorien[2].fragen[1].korrekteAntwort)), (
((void *)0) ((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)), ( UnityAssertEqualString((const char*)(("What sport is played on a pitch and has a 'wicket'?")), (const char*)((kategorien[2].fragen[2].frage)), (
((void *)0) ((void *)0)
), (UNITY_UINT)(130));
), (UNITY_UINT)(131));
UnityAssertEqualString((const char*)(("Rugby")), (const char*)((kategorien[2].fragen[2].antwortA)), ( UnityAssertEqualString((const char*)(("Rugby")), (const char*)((kategorien[2].fragen[2].antwortA)), (
((void *)0) ((void *)0)
), (UNITY_UINT)(131));
), (UNITY_UINT)(132));
UnityAssertEqualString((const char*)(("Cricket")), (const char*)((kategorien[2].fragen[2].antwortB)), ( UnityAssertEqualString((const char*)(("Cricket")), (const char*)((kategorien[2].fragen[2].antwortB)), (
((void *)0) ((void *)0)
), (UNITY_UINT)(132));
), (UNITY_UINT)(133));
UnityAssertEqualString((const char*)(("American Football")), (const char*)((kategorien[2].fragen[2].antwortC)), ( UnityAssertEqualString((const char*)(("American Football")), (const char*)((kategorien[2].fragen[2].antwortC)), (
((void *)0) ((void *)0)
), (UNITY_UINT)(133));
), (UNITY_UINT)(134));
UnityAssertEqualString((const char*)(("Hockey")), (const char*)((kategorien[2].fragen[2].antwortD)), ( UnityAssertEqualString((const char*)(("Hockey")), (const char*)((kategorien[2].fragen[2].antwortD)), (
((void *)0) ((void *)0)
), (UNITY_UINT)(134));
), (UNITY_UINT)(135));
UnityAssertEqualNumber((UNITY_INT)(('B')), (UNITY_INT)((kategorien[2].fragen[2].korrekteAntwort)), ( UnityAssertEqualNumber((UNITY_INT)(('B')), (UNITY_INT)((kategorien[2].fragen[2].korrekteAntwort)), (
((void *)0) ((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)), ( UnityAssertEqualNumber((UNITY_INT)((3)), (UNITY_INT)((kategorien[2].anzahlFragen)), (
((void *)0) ((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)), ( UnityAssertEqualNumber((UNITY_INT)((1)), (UNITY_INT)((kategorien[2].joker)), (
((void *)0) ((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) ((void *)0)
), (UNITY_UINT)(163), UNITY_DISPLAY_STYLE_INT);
), (UNITY_UINT)(164), UNITY_DISPLAY_STYLE_INT);
} }

BIN
build/test/out/c/test_quizduell.o

BIN
build/test/out/c/test_quizduell_runner.o

BIN
build/test/out/test_quizduell.out

102
build/test/preprocess/files/test_quizduell.c

@ -24,37 +24,37 @@ void test_erstelleFrage(void) {
((void *)0) ((void *)0)
), (UNITY_UINT)(14));
), (UNITY_UINT)(15));
UnityAssertEqualString((const char*)(("AntwortA")), (const char*)((testFrage.antwortA)), ( UnityAssertEqualString((const char*)(("AntwortA")), (const char*)((testFrage.antwortA)), (
((void *)0) ((void *)0)
), (UNITY_UINT)(15));
), (UNITY_UINT)(16));
UnityAssertEqualString((const char*)(("AntwortB")), (const char*)((testFrage.antwortB)), ( UnityAssertEqualString((const char*)(("AntwortB")), (const char*)((testFrage.antwortB)), (
((void *)0) ((void *)0)
), (UNITY_UINT)(16));
), (UNITY_UINT)(17));
UnityAssertEqualString((const char*)(("AntwortC")), (const char*)((testFrage.antwortC)), ( UnityAssertEqualString((const char*)(("AntwortC")), (const char*)((testFrage.antwortC)), (
((void *)0) ((void *)0)
), (UNITY_UINT)(17));
), (UNITY_UINT)(18));
UnityAssertEqualString((const char*)(("AntwortD")), (const char*)((testFrage.antwortD)), ( UnityAssertEqualString((const char*)(("AntwortD")), (const char*)((testFrage.antwortD)), (
((void *)0) ((void *)0)
), (UNITY_UINT)(18));
), (UNITY_UINT)(19));
UnityAssertEqualNumber((UNITY_INT)(UNITY_INT8 )(('A')), (UNITY_INT)(UNITY_INT8 )((testFrage.korrekteAntwort)), ( UnityAssertEqualNumber((UNITY_INT)(UNITY_INT8 )(('A')), (UNITY_INT)(UNITY_INT8 )((testFrage.korrekteAntwort)), (
((void *)0) ((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) ((void *)0)
), (UNITY_UINT)(34));
), (UNITY_UINT)(35));
UnityAssertEqualString((const char*)(("Tomatoes")), (const char*)((kategorien[1].fragen[0].antwortA)), ( UnityAssertEqualString((const char*)(("Tomatoes")), (const char*)((kategorien[1].fragen[0].antwortA)), (
((void *)0) ((void *)0)
), (UNITY_UINT)(35));
), (UNITY_UINT)(36));
UnityAssertEqualString((const char*)(("Basil")), (const char*)((kategorien[1].fragen[0].antwortB)), ( UnityAssertEqualString((const char*)(("Basil")), (const char*)((kategorien[1].fragen[0].antwortB)), (
((void *)0) ((void *)0)
), (UNITY_UINT)(36));
), (UNITY_UINT)(37));
UnityAssertEqualString((const char*)(("Spinach")), (const char*)((kategorien[1].fragen[0].antwortC)), ( UnityAssertEqualString((const char*)(("Spinach")), (const char*)((kategorien[1].fragen[0].antwortC)), (
((void *)0) ((void *)0)
), (UNITY_UINT)(37));
), (UNITY_UINT)(38));
UnityAssertEqualString((const char*)(("Oregano")), (const char*)((kategorien[1].fragen[0].antwortD)), ( UnityAssertEqualString((const char*)(("Oregano")), (const char*)((kategorien[1].fragen[0].antwortD)), (
((void *)0) ((void *)0)
), (UNITY_UINT)(38));
), (UNITY_UINT)(39));
UnityAssertEqualNumber((UNITY_INT)(UNITY_INT8 )(('B')), (UNITY_INT)(UNITY_INT8 )((kategorien[1].fragen[0].korrekteAntwort)), ( UnityAssertEqualNumber((UNITY_INT)(UNITY_INT8 )(('B')), (UNITY_INT)(UNITY_INT8 )((kategorien[1].fragen[0].korrekteAntwort)), (
((void *)0) ((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) ((void *)0)
), (UNITY_UINT)(56));
), (UNITY_UINT)(57));
UnityAssertEqualString((const char*)(("2482 Meter")), (const char*)((kategorien[0].fragen[0].antwortA)), ( UnityAssertEqualString((const char*)(("2482 Meter")), (const char*)((kategorien[0].fragen[0].antwortA)), (
((void *)0) ((void *)0)
), (UNITY_UINT)(57));
), (UNITY_UINT)(58));
UnityAssertEqualString((const char*)(("2867 Meter")), (const char*)((kategorien[0].fragen[0].antwortB)), ( UnityAssertEqualString((const char*)(("2867 Meter")), (const char*)((kategorien[0].fragen[0].antwortB)), (
((void *)0) ((void *)0)
), (UNITY_UINT)(58));
), (UNITY_UINT)(59));
UnityAssertEqualString((const char*)(("2962 Meter")), (const char*)((kategorien[0].fragen[0].antwortC)), ( UnityAssertEqualString((const char*)(("2962 Meter")), (const char*)((kategorien[0].fragen[0].antwortC)), (
((void *)0) ((void *)0)
), (UNITY_UINT)(59));
), (UNITY_UINT)(60));
UnityAssertEqualString((const char*)(("3173 Meter")), (const char*)((kategorien[0].fragen[0].antwortD)), ( UnityAssertEqualString((const char*)(("3173 Meter")), (const char*)((kategorien[0].fragen[0].antwortD)), (
((void *)0) ((void *)0)
), (UNITY_UINT)(60));
), (UNITY_UINT)(61));
UnityAssertEqualNumber((UNITY_INT)(UNITY_INT8 )(('C')), (UNITY_INT)(UNITY_INT8 )((kategorien[0].fragen[0].korrekteAntwort)), ( UnityAssertEqualNumber((UNITY_INT)(UNITY_INT8 )(('C')), (UNITY_INT)(UNITY_INT8 )((kategorien[0].fragen[0].korrekteAntwort)), (
((void *)0) ((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) ((void *)0)
), (UNITY_UINT)(77));
), (UNITY_UINT)(78));
UnityAssertEqualString((const char*)(("Soccer/Football")), (const char*)((kategorien[2].fragen[0].antwortA)), ( UnityAssertEqualString((const char*)(("Soccer/Football")), (const char*)((kategorien[2].fragen[0].antwortA)), (
((void *)0) ((void *)0)
), (UNITY_UINT)(78));
), (UNITY_UINT)(79));
UnityAssertEqualString((const char*)(("Baseball")), (const char*)((kategorien[2].fragen[0].antwortB)), ( UnityAssertEqualString((const char*)(("Baseball")), (const char*)((kategorien[2].fragen[0].antwortB)), (
((void *)0) ((void *)0)
), (UNITY_UINT)(79));
), (UNITY_UINT)(80));
UnityAssertEqualString((const char*)(("Tennis")), (const char*)((kategorien[2].fragen[0].antwortC)), ( UnityAssertEqualString((const char*)(("Tennis")), (const char*)((kategorien[2].fragen[0].antwortC)), (
((void *)0) ((void *)0)
), (UNITY_UINT)(80));
), (UNITY_UINT)(81));
UnityAssertEqualString((const char*)(("Golf")), (const char*)((kategorien[2].fragen[0].antwortD)), ( UnityAssertEqualString((const char*)(("Golf")), (const char*)((kategorien[2].fragen[0].antwortD)), (
((void *)0) ((void *)0)
), (UNITY_UINT)(81));
), (UNITY_UINT)(82));
UnityAssertEqualNumber((UNITY_INT)(UNITY_INT8 )(('B')), (UNITY_INT)(UNITY_INT8 )((kategorien[2].fragen[0].korrekteAntwort)), ( UnityAssertEqualNumber((UNITY_INT)(UNITY_INT8 )(('B')), (UNITY_INT)(UNITY_INT8 )((kategorien[2].fragen[0].korrekteAntwort)), (
((void *)0) ((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) ((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)), ( UnityAssertEqualNumber((UNITY_INT)((0)), (UNITY_INT)((testKategorie.anzahlFragen)), (
((void *)0) ((void *)0)
), (UNITY_UINT)(95), UNITY_DISPLAY_STYLE_INT);
), (UNITY_UINT)(96), UNITY_DISPLAY_STYLE_INT);
UnityAssertEqualNumber((UNITY_INT)((0)), (UNITY_INT)((testKategorie.joker)), ( UnityAssertEqualNumber((UNITY_INT)((0)), (UNITY_INT)((testKategorie.joker)), (
((void *)0) ((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) ((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) ((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) ((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)), ( UnityAssertEqualString((const char*)(("In which sport is the term 'home run' used?")), (const char*)((kategorien[2].fragen[0].frage)), (
((void *)0) ((void *)0)
), (UNITY_UINT)(118));
), (UNITY_UINT)(119));
UnityAssertEqualString((const char*)(("Soccer/Football")), (const char*)((kategorien[2].fragen[0].antwortA)), ( UnityAssertEqualString((const char*)(("Soccer/Football")), (const char*)((kategorien[2].fragen[0].antwortA)), (
((void *)0) ((void *)0)
), (UNITY_UINT)(119));
), (UNITY_UINT)(120));
UnityAssertEqualString((const char*)(("Baseball")), (const char*)((kategorien[2].fragen[0].antwortB)), ( UnityAssertEqualString((const char*)(("Baseball")), (const char*)((kategorien[2].fragen[0].antwortB)), (
((void *)0) ((void *)0)
), (UNITY_UINT)(120));
), (UNITY_UINT)(121));
UnityAssertEqualString((const char*)(("Tennis")), (const char*)((kategorien[2].fragen[0].antwortC)), ( UnityAssertEqualString((const char*)(("Tennis")), (const char*)((kategorien[2].fragen[0].antwortC)), (
((void *)0) ((void *)0)
), (UNITY_UINT)(121));
), (UNITY_UINT)(122));
UnityAssertEqualString((const char*)(("Golf")), (const char*)((kategorien[2].fragen[0].antwortD)), ( UnityAssertEqualString((const char*)(("Golf")), (const char*)((kategorien[2].fragen[0].antwortD)), (
((void *)0) ((void *)0)
), (UNITY_UINT)(122));
), (UNITY_UINT)(123));
UnityAssertEqualNumber((UNITY_INT)(('B')), (UNITY_INT)((kategorien[2].fragen[0].korrekteAntwort)), ( UnityAssertEqualNumber((UNITY_INT)(('B')), (UNITY_INT)((kategorien[2].fragen[0].korrekteAntwort)), (
((void *)0) ((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)), ( 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) ((void *)0)
), (UNITY_UINT)(124));
), (UNITY_UINT)(125));
UnityAssertEqualString((const char*)(("9")), (const char*)((kategorien[2].fragen[1].antwortA)), ( UnityAssertEqualString((const char*)(("9")), (const char*)((kategorien[2].fragen[1].antwortA)), (
((void *)0) ((void *)0)
), (UNITY_UINT)(125));
), (UNITY_UINT)(126));
UnityAssertEqualString((const char*)(("11")), (const char*)((kategorien[2].fragen[1].antwortB)), ( UnityAssertEqualString((const char*)(("11")), (const char*)((kategorien[2].fragen[1].antwortB)), (
((void *)0) ((void *)0)
), (UNITY_UINT)(126));
), (UNITY_UINT)(127));
UnityAssertEqualString((const char*)(("7")), (const char*)((kategorien[2].fragen[1].antwortC)), ( UnityAssertEqualString((const char*)(("7")), (const char*)((kategorien[2].fragen[1].antwortC)), (
((void *)0) ((void *)0)
), (UNITY_UINT)(127));
), (UNITY_UINT)(128));
UnityAssertEqualString((const char*)(("5")), (const char*)((kategorien[2].fragen[1].antwortD)), ( UnityAssertEqualString((const char*)(("5")), (const char*)((kategorien[2].fragen[1].antwortD)), (
((void *)0) ((void *)0)
), (UNITY_UINT)(128));
), (UNITY_UINT)(129));
UnityAssertEqualNumber((UNITY_INT)(('B')), (UNITY_INT)((kategorien[2].fragen[1].korrekteAntwort)), ( UnityAssertEqualNumber((UNITY_INT)(('B')), (UNITY_INT)((kategorien[2].fragen[1].korrekteAntwort)), (
((void *)0) ((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)), ( UnityAssertEqualString((const char*)(("What sport is played on a pitch and has a 'wicket'?")), (const char*)((kategorien[2].fragen[2].frage)), (
((void *)0) ((void *)0)
), (UNITY_UINT)(130));
), (UNITY_UINT)(131));
UnityAssertEqualString((const char*)(("Rugby")), (const char*)((kategorien[2].fragen[2].antwortA)), ( UnityAssertEqualString((const char*)(("Rugby")), (const char*)((kategorien[2].fragen[2].antwortA)), (
((void *)0) ((void *)0)
), (UNITY_UINT)(131));
), (UNITY_UINT)(132));
UnityAssertEqualString((const char*)(("Cricket")), (const char*)((kategorien[2].fragen[2].antwortB)), ( UnityAssertEqualString((const char*)(("Cricket")), (const char*)((kategorien[2].fragen[2].antwortB)), (
((void *)0) ((void *)0)
), (UNITY_UINT)(132));
), (UNITY_UINT)(133));
UnityAssertEqualString((const char*)(("American Football")), (const char*)((kategorien[2].fragen[2].antwortC)), ( UnityAssertEqualString((const char*)(("American Football")), (const char*)((kategorien[2].fragen[2].antwortC)), (
((void *)0) ((void *)0)
), (UNITY_UINT)(133));
), (UNITY_UINT)(134));
UnityAssertEqualString((const char*)(("Hockey")), (const char*)((kategorien[2].fragen[2].antwortD)), ( UnityAssertEqualString((const char*)(("Hockey")), (const char*)((kategorien[2].fragen[2].antwortD)), (
((void *)0) ((void *)0)
), (UNITY_UINT)(134));
), (UNITY_UINT)(135));
UnityAssertEqualNumber((UNITY_INT)(('B')), (UNITY_INT)((kategorien[2].fragen[2].korrekteAntwort)), ( UnityAssertEqualNumber((UNITY_INT)(('B')), (UNITY_INT)((kategorien[2].fragen[2].korrekteAntwort)), (
((void *)0) ((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)), ( UnityAssertEqualNumber((UNITY_INT)((3)), (UNITY_INT)((kategorien[2].anzahlFragen)), (
((void *)0) ((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)), ( UnityAssertEqualNumber((UNITY_INT)((1)), (UNITY_INT)((kategorien[2].joker)), (
((void *)0) ((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) ((void *)0)
), (UNITY_UINT)(163), UNITY_DISPLAY_STYLE_INT);
), (UNITY_UINT)(164), UNITY_DISPLAY_STYLE_INT);
} }

2
build/test/results/test_casualQuiz.pass

@ -11,4 +11,4 @@
:failed: 0 :failed: 0
:ignored: 0 :ignored: 0
:stdout: [] :stdout: []
:time: 0.01713199999903736
:time: 0.016197599999941303

20
build/test/results/test_quizduell.pass

@ -4,39 +4,39 @@
:file: test_quizduell.c :file: test_quizduell.c
:successes: :successes:
- :test: test_erstelleFrage - :test: test_erstelleFrage
:line: 11
:line: 12
:message: '' :message: ''
:unity_test_time: 0 :unity_test_time: 0
- :test: test_CookingFragen - :test: test_CookingFragen
:line: 22
:line: 23
:message: '' :message: ''
:unity_test_time: 0 :unity_test_time: 0
- :test: test_MountainsFragen - :test: test_MountainsFragen
:line: 44
:line: 45
:message: '' :message: ''
:unity_test_time: 0 :unity_test_time: 0
- :test: test_createCategory2WithQuestions - :test: test_createCategory2WithQuestions
:line: 65
:line: 66
:message: '' :message: ''
:unity_test_time: 0 :unity_test_time: 0
- :test: test_befreieKategorie - :test: test_befreieKategorie
:line: 86
:line: 87
:message: '' :message: ''
:unity_test_time: 0 :unity_test_time: 0
- :test: test_pruefeAntwort_CorrectAnswer - :test: test_pruefeAntwort_CorrectAnswer
:line: 98
:line: 99
:message: '' :message: ''
:unity_test_time: 0 :unity_test_time: 0
- :test: test_pruefeAntwort_WrongAnswer - :test: test_pruefeAntwort_WrongAnswer
:line: 102
:line: 103
:message: '' :message: ''
:unity_test_time: 0 :unity_test_time: 0
- :test: test_sportsCategoryInitialization - :test: test_sportsCategoryInitialization
:line: 106
:line: 107
:message: '' :message: ''
:unity_test_time: 0 :unity_test_time: 0
- :test: test_categorySelection_Cooking - :test: test_categorySelection_Cooking
:line: 142
:line: 143
:message: '' :message: ''
:unity_test_time: 0 :unity_test_time: 0
:failures: [] :failures: []
@ -47,4 +47,4 @@
:failed: 0 :failed: 0
:ignored: 0 :ignored: 0
:stdout: [] :stdout: []
:time: 0.0320902000003116
:time: 0.03187939999952505

2
build/test/results/test_timequiz.pass

@ -11,4 +11,4 @@
:failed: 0 :failed: 0
:ignored: 0 :ignored: 0
:stdout: [] :stdout: []
:time: 0.01697989999956917
:time: 0.016576800000621006

2
build/test/results/test_wwm.pass

@ -11,4 +11,4 @@
:failed: 0 :failed: 0
:ignored: 0 :ignored: 0
:stdout: [] :stdout: []
:time: 0.017033699999956298
:time: 0.016380900000513066

18
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) int main(void)
{ {
UnityBegin("test_quizduell.c"); 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(); return UnityEnd();
} }

24
test/test_quizduell.c

@ -163,4 +163,28 @@ void test_categorySelection_Cooking(void) {
} }
TEST_ASSERT_EQUAL(1, auswahlIndex); 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 #endif //TEST
Loading…
Cancel
Save