Browse Source

Unittest 11 Spiel wird wieder gestartet wenn already_played auf false steht

remotes/origin/Florian
Florian Baeseler 11 months ago
parent
commit
663707583e
  1. 38
      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. 38
      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. 9
      test/test_casualQuiz.c

38
build/test/cache/test_casualQuiz.c

@ -342,4 +342,42 @@ void test_FzaehlernachAuswahl_falsch_bei_1(void){
}
void test_FtryAgain_butalways_played_is_false(void){
_Bool
already_played =
0
;
_Bool
testbool =
1
;
testbool = FtryAgain(already_played);
do {if ((testbool ==
0
)) {} else {UnityFail( ((" Expected TRUE Was FALSE")), (UNITY_UINT)((UNITY_UINT)(126)));}} 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

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

@ -342,4 +342,42 @@ void test_FzaehlernachAuswahl_falsch_bei_1(void){
}
void test_FtryAgain_butalways_played_is_false(void){
_Bool
already_played =
0
;
_Bool
testbool =
1
;
testbool = FtryAgain(already_played);
do {if ((testbool ==
0
)) {} else {UnityFail( ((" Expected TRUE Was FALSE")), (UNITY_UINT)((UNITY_UINT)(126)));}} while(0);
}

11
build/test/results/test_casualQuiz.pass

@ -43,11 +43,15 @@
:line: 109
:message: ''
:unity_test_time: 0
- :test: test_FtryAgain_butalways_played_is_false
:line: 121
:message: ''
:unity_test_time: 0
:failures: []
:ignores: []
:counts:
:total: 10
:passed: 10
:total: 11
:passed: 11
:failed: 0
:ignored: 0
:stdout:
@ -61,4 +65,5 @@
- Right Answer, well done.
- Wrong Input!
- Wrong Input!
:time: 0.03417200001422316
- It looks like you havent played the program yet, starting it up...
:time: 0.03260759997647256

2
build/test/results/test_quizduell.pass

@ -11,4 +11,4 @@
:failed: 0
:ignored: 0
:stdout: []
:time: 0.02757249999558553
:time: 0.013434400025289506

2
build/test/results/test_timequiz.pass

@ -11,4 +11,4 @@
:failed: 0
:ignored: 0
:stdout: []
:time: 0.028207200055476278
:time: 0.013458699977491051

2
build/test/results/test_wwm.pass

@ -11,4 +11,4 @@
:failed: 0
:ignored: 0
:stdout: []
:time: 0.027035499981138855
:time: 0.013857100042514503

2
build/test/runners/test_casualQuiz_runner.c

@ -20,6 +20,7 @@ extern void test_FzaehlernachAuswahl(void);
extern void test_FzaehlernachAuswahl_bei1(void);
extern void test_FzaehlernachAuswahl_falsch_bei_0(void);
extern void test_FzaehlernachAuswahl_falsch_bei_1(void);
extern void test_FtryAgain_butalways_played_is_false(void);
/*=======Mock Management=====*/
@ -94,6 +95,7 @@ int main(void)
run_test(test_FzaehlernachAuswahl_bei1, "test_FzaehlernachAuswahl_bei1", 85);
run_test(test_FzaehlernachAuswahl_falsch_bei_0, "test_FzaehlernachAuswahl_falsch_bei_0", 97);
run_test(test_FzaehlernachAuswahl_falsch_bei_1, "test_FzaehlernachAuswahl_falsch_bei_1", 109);
run_test(test_FtryAgain_butalways_played_is_false, "test_FtryAgain_butalways_played_is_false", 121);
return UnityEnd();
}

9
test/test_casualQuiz.c

@ -117,5 +117,14 @@ void test_FzaehlernachAuswahl_falsch_bei_1(void){
TEST_ASSERT_EQUAL_INT(1, correct);
TEST_ASSERT_EQUAL_INT(2, answered);
}
void test_FtryAgain_butalways_played_is_false(void){
bool already_played = false;
bool testbool = true;
testbool = FtryAgain(already_played);
TEST_ASSERT_TRUE(testbool == false);
}
#endif //Test
Loading…
Cancel
Save