diff --git a/build/test/cache/test_casualQuiz.c b/build/test/cache/test_casualQuiz.c index 09ecd51..729b49d 100644 --- a/build/test/cache/test_casualQuiz.c +++ b/build/test/cache/test_casualQuiz.c @@ -262,4 +262,44 @@ void test_FzaehlernachAuswahl_bei1(void){ +} + +void test_FzaehlernachAuswahl_falsch_bei_0(void){ + + + + _Bool + + richtig = + + 0 + + ; + + int correct = 0; + + int answered = 0; + + int* correctP = &correct; + + int* answeredP = &answered; + + FzaehlernachAuswahl(richtig, answeredP, correctP); + + + + UnityAssertEqualNumber((UNITY_INT)((0)), (UNITY_INT)((correct)), ( + + ((void *)0) + + ), (UNITY_UINT)(105), UNITY_DISPLAY_STYLE_INT); + + UnityAssertEqualNumber((UNITY_INT)((1)), (UNITY_INT)((answered)), ( + + ((void *)0) + + ), (UNITY_UINT)(106), UNITY_DISPLAY_STYLE_INT); + + + } diff --git a/build/test/out/c/test_casualQuiz.o b/build/test/out/c/test_casualQuiz.o index 9a12873..f00b736 100644 Binary files a/build/test/out/c/test_casualQuiz.o and b/build/test/out/c/test_casualQuiz.o differ diff --git a/build/test/out/c/test_casualQuiz_runner.o b/build/test/out/c/test_casualQuiz_runner.o index 8497e24..aaa39aa 100644 Binary files a/build/test/out/c/test_casualQuiz_runner.o and b/build/test/out/c/test_casualQuiz_runner.o differ diff --git a/build/test/out/test_casualQuiz.out b/build/test/out/test_casualQuiz.out index d642237..e8c4c92 100755 Binary files a/build/test/out/test_casualQuiz.out and b/build/test/out/test_casualQuiz.out differ diff --git a/build/test/preprocess/files/test_casualQuiz.c b/build/test/preprocess/files/test_casualQuiz.c index 09ecd51..729b49d 100644 --- a/build/test/preprocess/files/test_casualQuiz.c +++ b/build/test/preprocess/files/test_casualQuiz.c @@ -262,4 +262,44 @@ void test_FzaehlernachAuswahl_bei1(void){ +} + +void test_FzaehlernachAuswahl_falsch_bei_0(void){ + + + + _Bool + + richtig = + + 0 + + ; + + int correct = 0; + + int answered = 0; + + int* correctP = &correct; + + int* answeredP = &answered; + + FzaehlernachAuswahl(richtig, answeredP, correctP); + + + + UnityAssertEqualNumber((UNITY_INT)((0)), (UNITY_INT)((correct)), ( + + ((void *)0) + + ), (UNITY_UINT)(105), UNITY_DISPLAY_STYLE_INT); + + UnityAssertEqualNumber((UNITY_INT)((1)), (UNITY_INT)((answered)), ( + + ((void *)0) + + ), (UNITY_UINT)(106), UNITY_DISPLAY_STYLE_INT); + + + } diff --git a/build/test/results/test_casualQuiz.pass b/build/test/results/test_casualQuiz.pass index 6332ccd..c01e43f 100644 --- a/build/test/results/test_casualQuiz.pass +++ b/build/test/results/test_casualQuiz.pass @@ -35,11 +35,15 @@ :line: 85 :message: '' :unity_test_time: 0 +- :test: test_FzaehlernachAuswahl_falsch_bei_0 + :line: 97 + :message: '' + :unity_test_time: 0 :failures: [] :ignores: [] :counts: - :total: 8 - :passed: 8 + :total: 9 + :passed: 9 :failed: 0 :ignored: 0 :stdout: @@ -53,4 +57,4 @@ - Right Answer, well done. - Wrong Input! - Wrong Input! -:time: 0.03635380003834143 +:time: 0.035101499990560114 diff --git a/build/test/results/test_quizduell.pass b/build/test/results/test_quizduell.pass index b8bf4b2..8a7b9ce 100644 --- a/build/test/results/test_quizduell.pass +++ b/build/test/results/test_quizduell.pass @@ -11,4 +11,4 @@ :failed: 0 :ignored: 0 :stdout: [] -:time: 0.01403949997620657 +:time: 0.013820099993608892 diff --git a/build/test/results/test_timequiz.pass b/build/test/results/test_timequiz.pass index 4713100..470ad6a 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.01435820001643151 +:time: 0.014337700034957379 diff --git a/build/test/results/test_wwm.pass b/build/test/results/test_wwm.pass index 89e7006..d11fb5b 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.013466000033076853 +:time: 0.01380850002169609 diff --git a/build/test/runners/test_casualQuiz_runner.c b/build/test/runners/test_casualQuiz_runner.c index b0a86c8..6200a14 100644 --- a/build/test/runners/test_casualQuiz_runner.c +++ b/build/test/runners/test_casualQuiz_runner.c @@ -18,6 +18,7 @@ extern void test_FcheckaufRichtigkeit_incorrect_input_higher(void); extern void test_FcheckaufRichtigkeit_incorrect_input_lower(void); extern void test_FzaehlernachAuswahl(void); extern void test_FzaehlernachAuswahl_bei1(void); +extern void test_FzaehlernachAuswahl_falsch_bei_0(void); /*=======Mock Management=====*/ @@ -90,6 +91,7 @@ int main(void) run_test(test_FcheckaufRichtigkeit_incorrect_input_lower, "test_FcheckaufRichtigkeit_incorrect_input_lower", 65); run_test(test_FzaehlernachAuswahl, "test_FzaehlernachAuswahl", 73); run_test(test_FzaehlernachAuswahl_bei1, "test_FzaehlernachAuswahl_bei1", 85); + run_test(test_FzaehlernachAuswahl_falsch_bei_0, "test_FzaehlernachAuswahl_falsch_bei_0", 97); return UnityEnd(); } diff --git a/test/test_casualQuiz.c b/test/test_casualQuiz.c index ae58165..1b4b2c2 100644 --- a/test/test_casualQuiz.c +++ b/test/test_casualQuiz.c @@ -93,5 +93,17 @@ void test_FzaehlernachAuswahl_bei1(void){ TEST_ASSERT_EQUAL_INT(2, correct); TEST_ASSERT_EQUAL_INT(2, answered); +} +void test_FzaehlernachAuswahl_falsch_bei_0(void){ + bool richtig = false; + int correct = 0; + int answered = 0; + int* correctP = &correct; + int* answeredP = &answered; + FzaehlernachAuswahl(richtig, answeredP, correctP); + + TEST_ASSERT_EQUAL_INT(0, correct); + TEST_ASSERT_EQUAL_INT(1, answered); + } #endif //Test \ No newline at end of file