Browse Source

Unittest 2 für richtige Eingabe index2

remotes/origin/Florian
Florian Baeseler 11 months ago
parent
commit
abc519d384
  1. 28
      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. 28
      build/test/preprocess/files/test_casualQuiz.c
  6. 12
      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. 10
      test/test_casualQuiz.c

28
build/test/cache/test_casualQuiz.c

@ -52,4 +52,32 @@ void test_FcheckaufRichtigkeit_correct_answer_atIndex1(void){
}
void test_FcheckaufRichtigkeit_correct_answer_atIndex2(void){
int TESTeingabe = 2;
int TESTindex = 0;
int TESTrichtige_antwort[]={2};
_Bool
testfall;
testfall = FcheckaufRichtigkeit(TESTeingabe, TESTrichtige_antwort, TESTindex);
do {if ((testfall ==
1
)) {} else {UnityFail( ((" Expected TRUE Was FALSE")), (UNITY_UINT)((UNITY_UINT)(35)));}} 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

28
build/test/preprocess/files/test_casualQuiz.c

@ -52,4 +52,32 @@ void test_FcheckaufRichtigkeit_correct_answer_atIndex1(void){
}
void test_FcheckaufRichtigkeit_correct_answer_atIndex2(void){
int TESTeingabe = 2;
int TESTindex = 0;
int TESTrichtige_antwort[]={2};
_Bool
testfall;
testfall = FcheckaufRichtigkeit(TESTeingabe, TESTrichtige_antwort, TESTindex);
do {if ((testfall ==
1
)) {} else {UnityFail( ((" Expected TRUE Was FALSE")), (UNITY_UINT)((UNITY_UINT)(35)));}} while(0);
} }

12
build/test/results/test_casualQuiz.pass

@ -7,14 +7,20 @@
:line: 18 :line: 18
:message: '' :message: ''
:unity_test_time: 0 :unity_test_time: 0
- :test: test_FcheckaufRichtigkeit_correct_answer_atIndex2
:line: 28
:message: ''
:unity_test_time: 0
:failures: [] :failures: []
:ignores: [] :ignores: []
:counts: :counts:
:total: 1
:passed: 1
:total: 2
:passed: 2
:failed: 0 :failed: 0
:ignored: 0 :ignored: 0
:stdout: :stdout:
- Case 1 - Case 1
- Right Answer, well done. - Right Answer, well done.
:time: 0.01348839999991469
- Case 2
- Right Answer, well done.
:time: 0.014663799986010417

2
build/test/results/test_quizduell.pass

@ -11,4 +11,4 @@
:failed: 0 :failed: 0
:ignored: 0 :ignored: 0
:stdout: [] :stdout: []
:time: 0.03404470000532456
:time: 0.014229999971576035

2
build/test/results/test_timequiz.pass

@ -11,4 +11,4 @@
:failed: 0 :failed: 0
:ignored: 0 :ignored: 0
:stdout: [] :stdout: []
:time: 0.03424040001118556
:time: 0.01512130000628531

2
build/test/results/test_wwm.pass

@ -11,4 +11,4 @@
:failed: 0 :failed: 0
:ignored: 0 :ignored: 0
:stdout: [] :stdout: []
:time: 0.034191499988082796
:time: 0.016113399993628263

2
build/test/runners/test_casualQuiz_runner.c

@ -11,6 +11,7 @@ char* GlobalOrderError;
extern void setUp(void); extern void setUp(void);
extern void tearDown(void); extern void tearDown(void);
extern void test_FcheckaufRichtigkeit_correct_answer_atIndex1(void); extern void test_FcheckaufRichtigkeit_correct_answer_atIndex1(void);
extern void test_FcheckaufRichtigkeit_correct_answer_atIndex2(void);
/*=======Mock Management=====*/ /*=======Mock Management=====*/
@ -76,6 +77,7 @@ int main(void)
{ {
UnityBegin("test_casualQuiz.c"); UnityBegin("test_casualQuiz.c");
run_test(test_FcheckaufRichtigkeit_correct_answer_atIndex1, "test_FcheckaufRichtigkeit_correct_answer_atIndex1", 18); run_test(test_FcheckaufRichtigkeit_correct_answer_atIndex1, "test_FcheckaufRichtigkeit_correct_answer_atIndex1", 18);
run_test(test_FcheckaufRichtigkeit_correct_answer_atIndex2, "test_FcheckaufRichtigkeit_correct_answer_atIndex2", 28);
return UnityEnd(); return UnityEnd();
} }

10
test/test_casualQuiz.c

@ -24,5 +24,15 @@ void test_FcheckaufRichtigkeit_correct_answer_atIndex1(void){
TEST_ASSERT_TRUE(testfall == true); TEST_ASSERT_TRUE(testfall == true);
}
void test_FcheckaufRichtigkeit_correct_answer_atIndex2(void){
int TESTeingabe = 2;
int TESTindex = 0;
int TESTrichtige_antwort[]={2};
bool testfall;
testfall = FcheckaufRichtigkeit(TESTeingabe, TESTrichtige_antwort, TESTindex);
TEST_ASSERT_TRUE(testfall == true);
} }
#endif //Test #endif //Test
Loading…
Cancel
Save