Browse Source

Unittest 5 für eingabe ausßerhalb der antwortmöglichkeiten höher

remotes/origin/Florian
Florian Baeseler 11 months ago
parent
commit
fe64049780
  1. 24
      build/test/cache/test_casualQuiz.c
  2. BIN
      build/test/out/c/test_casualQuiz.o
  3. BIN
      build/test/out/c/test_casualQuiz_runner.o
  4. BIN
      build/test/out/test_casualQuiz.out
  5. 24
      build/test/preprocess/files/test_casualQuiz.c
  6. 11
      build/test/results/test_casualQuiz.pass
  7. 2
      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_casualQuiz_runner.c
  11. 8
      test/test_casualQuiz.c

24
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);
}

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

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

BIN
build/test/out/test_casualQuiz.out

24
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);
}

11
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

2
build/test/results/test_quizduell.pass

@ -11,4 +11,4 @@
:failed: 0
:ignored: 0
:stdout: []
:time: 0.014495200011879206
:time: 0.014862199983326718

2
build/test/results/test_timequiz.pass

@ -11,4 +11,4 @@
:failed: 0
:ignored: 0
:stdout: []
:time: 0.014681000000564381
:time: 0.014781000005314127

2
build/test/results/test_wwm.pass

@ -11,4 +11,4 @@
:failed: 0
:ignored: 0
:stdout: []
:time: 0.014845400000922382
:time: 0.013869599992176518

2
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();
}

8
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
Loading…
Cancel
Save