Browse Source

Mergecommit

remotes/origin/Kevin
Kevin Schellberg 11 months ago
parent
commit
dc4ed16f2b
  1. 64
      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. 64
      build/test/preprocess/files/test_quizduell.c
  6. 2
      build/test/results/test_casualQuiz.pass
  7. 10
      build/test/results/test_quizduell.pass
  8. 2
      build/test/results/test_timequiz.pass
  9. 2
      build/test/results/test_wwm.pass
  10. 2
      build/test/runners/test_quizduell_runner.c

64
build/test/cache/test_quizduell.c

@ -541,3 +541,67 @@ void test_categorySelection_Cooking(void) {
), (UNITY_UINT)(164), UNITY_DISPLAY_STYLE_INT); ), (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);
}

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

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

BIN
build/test/out/test_quizduell.out

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

@ -541,3 +541,67 @@ void test_categorySelection_Cooking(void) {
), (UNITY_UINT)(164), UNITY_DISPLAY_STYLE_INT); ), (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);
}

2
build/test/results/test_casualQuiz.pass

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

10
build/test/results/test_quizduell.pass

@ -39,12 +39,16 @@
:line: 143 :line: 143
:message: '' :message: ''
:unity_test_time: 0 :unity_test_time: 0
- :test: test_categorySelection_Sports
:line: 166
:message: ''
:unity_test_time: 0
:failures: [] :failures: []
:ignores: [] :ignores: []
:counts: :counts:
:total: 9
:passed: 9
:total: 10
:passed: 10
:failed: 0 :failed: 0
:ignored: 0 :ignored: 0
:stdout: [] :stdout: []
:time: 0.03187939999952505
:time: 0.01801990000240039

2
build/test/results/test_timequiz.pass

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

2
build/test/results/test_wwm.pass

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

2
build/test/runners/test_quizduell_runner.c

@ -19,6 +19,7 @@ extern void test_pruefeAntwort_CorrectAnswer(void);
extern void test_pruefeAntwort_WrongAnswer(void); extern void test_pruefeAntwort_WrongAnswer(void);
extern void test_sportsCategoryInitialization(void); extern void test_sportsCategoryInitialization(void);
extern void test_categorySelection_Cooking(void); extern void test_categorySelection_Cooking(void);
extern void test_categorySelection_Sports(void);
/*=======Mock Management=====*/ /*=======Mock Management=====*/
@ -92,6 +93,7 @@ int main(void)
run_test(test_pruefeAntwort_WrongAnswer, "test_pruefeAntwort_WrongAnswer", 103); run_test(test_pruefeAntwort_WrongAnswer, "test_pruefeAntwort_WrongAnswer", 103);
run_test(test_sportsCategoryInitialization, "test_sportsCategoryInitialization", 107); run_test(test_sportsCategoryInitialization, "test_sportsCategoryInitialization", 107);
run_test(test_categorySelection_Cooking, "test_categorySelection_Cooking", 143); run_test(test_categorySelection_Cooking, "test_categorySelection_Cooking", 143);
run_test(test_categorySelection_Sports, "test_categorySelection_Sports", 166);
return UnityEnd(); return UnityEnd();
} }
Loading…
Cancel
Save