diff --git a/build/test/cache/test_quizduell.c b/build/test/cache/test_quizduell.c index af07bf8..4f871f2 100644 --- a/build/test/cache/test_quizduell.c +++ b/build/test/cache/test_quizduell.c @@ -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); + +} diff --git a/build/test/out/c/test_quizduell.o b/build/test/out/c/test_quizduell.o index 994c0fd..00167d8 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 9b7c63f..06f3103 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 index ea1690d..2480941 100644 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 af07bf8..4f871f2 100644 --- a/build/test/preprocess/files/test_quizduell.c +++ b/build/test/preprocess/files/test_quizduell.c @@ -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); + +} diff --git a/build/test/results/test_casualQuiz.pass b/build/test/results/test_casualQuiz.pass index ee61736..3301a27 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.016197599999941303 +:time: 0.0179982999979984 diff --git a/build/test/results/test_quizduell.pass b/build/test/results/test_quizduell.pass index 184f8a2..633bfd2 100644 --- a/build/test/results/test_quizduell.pass +++ b/build/test/results/test_quizduell.pass @@ -39,12 +39,16 @@ :line: 143 :message: '' :unity_test_time: 0 +- :test: test_categorySelection_Sports + :line: 166 + :message: '' + :unity_test_time: 0 :failures: [] :ignores: [] :counts: - :total: 9 - :passed: 9 + :total: 10 + :passed: 10 :failed: 0 :ignored: 0 :stdout: [] -:time: 0.03187939999952505 +:time: 0.01801990000240039 diff --git a/build/test/results/test_timequiz.pass b/build/test/results/test_timequiz.pass index e5dafdc..8e588fd 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.016576800000621006 +:time: 0.017314299999270588 diff --git a/build/test/results/test_wwm.pass b/build/test/results/test_wwm.pass index 2805a63..20ee08d 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.016380900000513066 +:time: 0.017585499997949228 diff --git a/build/test/runners/test_quizduell_runner.c b/build/test/runners/test_quizduell_runner.c index ac6fc04..14d59fc 100644 --- a/build/test/runners/test_quizduell_runner.c +++ b/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_sportsCategoryInitialization(void); extern void test_categorySelection_Cooking(void); +extern void test_categorySelection_Sports(void); /*=======Mock Management=====*/ @@ -92,6 +93,7 @@ int main(void) 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); + run_test(test_categorySelection_Sports, "test_categorySelection_Sports", 166); return UnityEnd(); }