diff --git a/build/test/cache/test_casualQuiz.c b/build/test/cache/test_casualQuiz.c index 11ba3af..b71a1c0 100644 --- a/build/test/cache/test_casualQuiz.c +++ b/build/test/cache/test_casualQuiz.c @@ -135,3 +135,27 @@ void test_FcheckaufRichtigkeit_correct_answer_atIndex3(void){ } + +void test_FcheckaufRichtigkeit_incorrect_input(void){ + + int TESTeingabe = 5; + + int TESTindex = 0; + + int TESTrichtige_antwort[]={3}; + + + + _Bool + + testfall; + + testfall = FcheckaufRichtigkeit(TESTeingabe, TESTrichtige_antwort, TESTindex); + + do {if ((testfall != + + 1 + + )) {} else {UnityFail( ((" Expected TRUE Was FALSE")), (UNITY_UINT)((UNITY_UINT)(63)));}} while(0); + +} diff --git a/build/test/out/c/test_casualQuiz.o b/build/test/out/c/test_casualQuiz.o index 24bcba5..3b8094f 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 65b6835..47fabb1 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 38c7ef7..9367705 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 11ba3af..b71a1c0 100644 --- a/build/test/preprocess/files/test_casualQuiz.c +++ b/build/test/preprocess/files/test_casualQuiz.c @@ -135,3 +135,27 @@ void test_FcheckaufRichtigkeit_correct_answer_atIndex3(void){ } + +void test_FcheckaufRichtigkeit_incorrect_input(void){ + + int TESTeingabe = 5; + + int TESTindex = 0; + + int TESTrichtige_antwort[]={3}; + + + + _Bool + + testfall; + + testfall = FcheckaufRichtigkeit(TESTeingabe, TESTrichtige_antwort, TESTindex); + + do {if ((testfall != + + 1 + + )) {} else {UnityFail( ((" Expected TRUE Was FALSE")), (UNITY_UINT)((UNITY_UINT)(63)));}} while(0); + +} diff --git a/build/test/results/test_casualQuiz.pass b/build/test/results/test_casualQuiz.pass index afee640..37b2407 100644 --- a/build/test/results/test_casualQuiz.pass +++ b/build/test/results/test_casualQuiz.pass @@ -19,11 +19,15 @@ :line: 47 :message: '' :unity_test_time: 0 +- :test: test_FcheckaufRichtigkeit_incorrect_input + :line: 57 + :message: '' + :unity_test_time: 0 :failures: [] :ignores: [] :counts: - :total: 4 - :passed: 4 + :total: 5 + :passed: 5 :failed: 0 :ignored: 0 :stdout: @@ -35,4 +39,5 @@ - Right Answer, well done. - Case 4 - Right Answer, well done. -:time: 0.03753680002409965 +- Wrong Input! +:time: 0.035433499986538664 diff --git a/build/test/results/test_quizduell.pass b/build/test/results/test_quizduell.pass index 97bbe86..923abc1 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.014495200011879206 +:time: 0.014862199983326718 diff --git a/build/test/results/test_timequiz.pass b/build/test/results/test_timequiz.pass index f8ff8d1..ac053f3 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.014681000000564381 +:time: 0.014781000005314127 diff --git a/build/test/results/test_wwm.pass b/build/test/results/test_wwm.pass index 9e25939..50dfda3 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.014845400000922382 +:time: 0.013869599992176518 diff --git a/build/test/runners/test_casualQuiz_runner.c b/build/test/runners/test_casualQuiz_runner.c index c86592b..32524cf 100644 --- a/build/test/runners/test_casualQuiz_runner.c +++ b/build/test/runners/test_casualQuiz_runner.c @@ -14,6 +14,7 @@ extern void test_FcheckaufRichtigkeit_correct_answer_atIndex1(void); extern void test_FcheckaufRichtigkeit_correct_answer_atIndex2(void); extern void test_FcheckaufRichtigkeit_correct_answer_atIndex3(void); extern void test_FcheckaufRichtigkeit_correct_answer_atIndex4(void); +extern void test_FcheckaufRichtigkeit_incorrect_input(void); /*=======Mock Management=====*/ @@ -82,6 +83,7 @@ int main(void) run_test(test_FcheckaufRichtigkeit_correct_answer_atIndex2, "test_FcheckaufRichtigkeit_correct_answer_atIndex2", 28); run_test(test_FcheckaufRichtigkeit_correct_answer_atIndex3, "test_FcheckaufRichtigkeit_correct_answer_atIndex3", 38); run_test(test_FcheckaufRichtigkeit_correct_answer_atIndex4, "test_FcheckaufRichtigkeit_correct_answer_atIndex4", 47); + run_test(test_FcheckaufRichtigkeit_incorrect_input, "test_FcheckaufRichtigkeit_incorrect_input", 57); return UnityEnd(); } diff --git a/test/test_casualQuiz.c b/test/test_casualQuiz.c index 6e80ffa..f9c1609 100644 --- a/test/test_casualQuiz.c +++ b/test/test_casualQuiz.c @@ -54,4 +54,12 @@ void test_FcheckaufRichtigkeit_correct_answer_atIndex3(void){ TEST_ASSERT_TRUE(testfall == true); } +void test_FcheckaufRichtigkeit_incorrect_input(void){ + int TESTeingabe = 5; + int TESTindex = 0; + int TESTrichtige_antwort[]={3}; + bool testfall; + testfall = FcheckaufRichtigkeit(TESTeingabe, TESTrichtige_antwort, TESTindex); + TEST_ASSERT_TRUE(testfall != true); +} #endif //Test \ No newline at end of file