diff --git a/build/test/cache/test_casualQuiz.c b/build/test/cache/test_casualQuiz.c index 1875b3f..3ba8c00 100644 --- a/build/test/cache/test_casualQuiz.c +++ b/build/test/cache/test_casualQuiz.c @@ -183,3 +183,43 @@ void test_FcheckaufRichtigkeit_incorrect_input_lower(void){ )) {} else {UnityFail( ((" Expected TRUE Was FALSE")), (UNITY_UINT)((UNITY_UINT)(71)));}} while(0); } + +void test_FzaehlernachAuswahl(void){ + + + + _Bool + + richtig = + + 1 + + ; + + int correct = 0; + + int answered = 0; + + int* correctP = &correct; + + int* answeredP = &answered; + + FzaehlernachAuswahl(richtig, answeredP, correctP); + + + + UnityAssertEqualNumber((UNITY_INT)((1)), (UNITY_INT)((correct)), ( + + ((void *)0) + + ), (UNITY_UINT)(81), UNITY_DISPLAY_STYLE_INT); + + UnityAssertEqualNumber((UNITY_INT)((1)), (UNITY_INT)((answered)), ( + + ((void *)0) + + ), (UNITY_UINT)(82), UNITY_DISPLAY_STYLE_INT); + + + +} diff --git a/build/test/out/c/test_casualQuiz.o b/build/test/out/c/test_casualQuiz.o index 50c8296..d6e2afd 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 d8460b8..7b4628b 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 0169935..5f3f74c 100755 Binary files a/build/test/out/test_casualQuiz.out and b/build/test/out/test_casualQuiz.out differ diff --git a/build/test/out/test_quizduell.out b/build/test/out/test_quizduell.out index da47e0a..91084c8 100755 Binary files a/build/test/out/test_quizduell.out and b/build/test/out/test_quizduell.out differ diff --git a/build/test/out/test_timequiz.out b/build/test/out/test_timequiz.out index 3ea79b3..732de1a 100755 Binary files a/build/test/out/test_timequiz.out and b/build/test/out/test_timequiz.out differ diff --git a/build/test/out/test_wwm.out b/build/test/out/test_wwm.out index 93d60d9..e78afd6 100755 Binary files a/build/test/out/test_wwm.out and b/build/test/out/test_wwm.out differ diff --git a/build/test/preprocess/files/test_casualQuiz.c b/build/test/preprocess/files/test_casualQuiz.c index 1875b3f..3ba8c00 100644 --- a/build/test/preprocess/files/test_casualQuiz.c +++ b/build/test/preprocess/files/test_casualQuiz.c @@ -183,3 +183,43 @@ void test_FcheckaufRichtigkeit_incorrect_input_lower(void){ )) {} else {UnityFail( ((" Expected TRUE Was FALSE")), (UNITY_UINT)((UNITY_UINT)(71)));}} while(0); } + +void test_FzaehlernachAuswahl(void){ + + + + _Bool + + richtig = + + 1 + + ; + + int correct = 0; + + int answered = 0; + + int* correctP = &correct; + + int* answeredP = &answered; + + FzaehlernachAuswahl(richtig, answeredP, correctP); + + + + UnityAssertEqualNumber((UNITY_INT)((1)), (UNITY_INT)((correct)), ( + + ((void *)0) + + ), (UNITY_UINT)(81), UNITY_DISPLAY_STYLE_INT); + + UnityAssertEqualNumber((UNITY_INT)((1)), (UNITY_INT)((answered)), ( + + ((void *)0) + + ), (UNITY_UINT)(82), UNITY_DISPLAY_STYLE_INT); + + + +} diff --git a/build/test/results/test_casualQuiz.pass b/build/test/results/test_casualQuiz.pass index e6f4a09..092b2d7 100644 --- a/build/test/results/test_casualQuiz.pass +++ b/build/test/results/test_casualQuiz.pass @@ -27,11 +27,15 @@ :line: 65 :message: '' :unity_test_time: 0 +- :test: test_FzaehlernachAuswahl + :line: 73 + :message: '' + :unity_test_time: 0 :failures: [] :ignores: [] :counts: - :total: 6 - :passed: 6 + :total: 7 + :passed: 7 :failed: 0 :ignored: 0 :stdout: @@ -45,4 +49,4 @@ - Right Answer, well done. - Wrong Input! - Wrong Input! -:time: 0.03563229998690076 +:time: 0.03667549998499453 diff --git a/build/test/results/test_quizduell.pass b/build/test/results/test_quizduell.pass index 6c3f8de..83961b0 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.01542800001334399 +:time: 0.037954800005536526 diff --git a/build/test/results/test_timequiz.pass b/build/test/results/test_timequiz.pass index 7283a5f..707d5b1 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.015153000014834106 +:time: 0.03327270000590943 diff --git a/build/test/results/test_wwm.pass b/build/test/results/test_wwm.pass index 90979a7..a6c93e7 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.014826200000243261 +:time: 0.031949899974279106 diff --git a/build/test/runners/test_casualQuiz_runner.c b/build/test/runners/test_casualQuiz_runner.c index 1adbb10..1788fc8 100644 --- a/build/test/runners/test_casualQuiz_runner.c +++ b/build/test/runners/test_casualQuiz_runner.c @@ -16,6 +16,7 @@ extern void test_FcheckaufRichtigkeit_correct_answer_atIndex3(void); extern void test_FcheckaufRichtigkeit_correct_answer_atIndex4(void); extern void test_FcheckaufRichtigkeit_incorrect_input_higher(void); extern void test_FcheckaufRichtigkeit_incorrect_input_lower(void); +extern void test_FzaehlernachAuswahl(void); /*=======Mock Management=====*/ @@ -86,6 +87,7 @@ int main(void) run_test(test_FcheckaufRichtigkeit_correct_answer_atIndex4, "test_FcheckaufRichtigkeit_correct_answer_atIndex4", 47); run_test(test_FcheckaufRichtigkeit_incorrect_input_higher, "test_FcheckaufRichtigkeit_incorrect_input_higher", 57); run_test(test_FcheckaufRichtigkeit_incorrect_input_lower, "test_FcheckaufRichtigkeit_incorrect_input_lower", 65); + run_test(test_FzaehlernachAuswahl, "test_FzaehlernachAuswahl", 73); return UnityEnd(); } diff --git a/test/test_casualQuiz.c b/test/test_casualQuiz.c index 569ca54..83174a3 100644 --- a/test/test_casualQuiz.c +++ b/test/test_casualQuiz.c @@ -70,4 +70,16 @@ void test_FcheckaufRichtigkeit_incorrect_input_lower(void){ testfall = FcheckaufRichtigkeit(TESTeingabe, TESTrichtige_antwort, TESTindex); TEST_ASSERT_TRUE(testfall != true); } +void test_FzaehlernachAuswahl(void){ + bool richtig = true; + int correct = 0; + int answered = 0; + int* correctP = &correct; + int* answeredP = &answered; + FzaehlernachAuswahl(richtig, answeredP, correctP); + + TEST_ASSERT_EQUAL_INT(1, correct); + TEST_ASSERT_EQUAL_INT(1, answered); + +} #endif //Test \ No newline at end of file