Browse Source

Unittest7

remotes/origin/Kevin
Kevin Schellberg 11 months ago
parent
commit
cead9f3be5
  1. 12
      build/test/cache/test_quizduell.c
  2. BIN
      build/test/out/c/test_quizduell.o
  3. BIN
      build/test/out/c/test_quizduell_runner.o
  4. BIN
      build/test/out/test_quizduell.out
  5. 12
      build/test/preprocess/files/test_quizduell.c
  6. 2
      build/test/results/test_casualQuiz.pass
  7. 10
      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_quizduell_runner.c
  11. 4
      test/test_quizduell.c

12
build/test/cache/test_quizduell.c

@ -295,3 +295,15 @@ void test_befreieKategorie(void) {
), (UNITY_UINT)(96), UNITY_DISPLAY_STYLE_INT);
}
void test_pruefeAntwort_CorrectAnswer(void) {
QuizFrage frage = erstelleFrage("Test Question", "Option A", "Option B", "Option C", "Option D", 'A');
UnityAssertEqualNumber((UNITY_INT)((1)), (UNITY_INT)((pruefeAntwort(frage, 'A'))), (
((void *)0)
), (UNITY_UINT)(100), UNITY_DISPLAY_STYLE_INT);
}

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

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

BIN
build/test/out/test_quizduell.out

12
build/test/preprocess/files/test_quizduell.c

@ -295,3 +295,15 @@ void test_befreieKategorie(void) {
), (UNITY_UINT)(96), UNITY_DISPLAY_STYLE_INT);
}
void test_pruefeAntwort_CorrectAnswer(void) {
QuizFrage frage = erstelleFrage("Test Question", "Option A", "Option B", "Option C", "Option D", 'A');
UnityAssertEqualNumber((UNITY_INT)((1)), (UNITY_INT)((pruefeAntwort(frage, 'A'))), (
((void *)0)
), (UNITY_UINT)(100), UNITY_DISPLAY_STYLE_INT);
}

2
build/test/results/test_casualQuiz.pass

@ -11,4 +11,4 @@
:failed: 0
:ignored: 0
:stdout: []
:time: 0.01776380000046629
:time: 0.01634360000025481

10
build/test/results/test_quizduell.pass

@ -23,12 +23,16 @@
:line: 86
:message: ''
:unity_test_time: 0
- :test: test_pruefeAntwort_CorrectAnswer
:line: 98
:message: ''
:unity_test_time: 0
:failures: []
:ignores: []
:counts:
:total: 5
:passed: 5
:total: 6
:passed: 6
:failed: 0
:ignored: 0
:stdout: []
:time: 0.030904999999620486
:time: 0.030828099999780534

2
build/test/results/test_timequiz.pass

@ -11,4 +11,4 @@
:failed: 0
:ignored: 0
:stdout: []
:time: 0.016614099999060272
:time: 0.016310499999235617

2
build/test/results/test_wwm.pass

@ -11,4 +11,4 @@
:failed: 0
:ignored: 0
:stdout: []
:time: 0.018228900000394788
:time: 0.01756539999951201

2
build/test/runners/test_quizduell_runner.c

@ -15,6 +15,7 @@ extern void test_CookingFragen(void);
extern void test_MountainsFragen(void);
extern void test_createCategory2WithQuestions(void);
extern void test_befreieKategorie(void);
extern void test_pruefeAntwort_CorrectAnswer(void);
/*=======Mock Management=====*/
@ -84,6 +85,7 @@ int main(void)
run_test(test_MountainsFragen, "test_MountainsFragen", 44);
run_test(test_createCategory2WithQuestions, "test_createCategory2WithQuestions", 65);
run_test(test_befreieKategorie, "test_befreieKategorie", 86);
run_test(test_pruefeAntwort_CorrectAnswer, "test_pruefeAntwort_CorrectAnswer", 98);
return UnityEnd();
}

4
test/test_quizduell.c

@ -99,4 +99,8 @@ void test_pruefeAntwort_CorrectAnswer(void) {
QuizFrage frage = erstelleFrage("Test Question", "Option A", "Option B", "Option C", "Option D", 'A');
TEST_ASSERT_EQUAL_INT(1, pruefeAntwort(frage, 'A'));
}
void test_pruefeAntwort_WrongAnswer(void) {
QuizFrage frage = erstelleFrage("Test Question", "Option A", "Option B", "Option C", "Option D", 'A');
TEST_ASSERT_EQUAL_INT(0, pruefeAntwort(frage, 'B'));
}
#endif //TEST
Loading…
Cancel
Save