diff --git a/build/test/out/c/quizduell.o b/build/test/out/c/quizduell.o index f8cae85..c1f2cb3 100644 Binary files a/build/test/out/c/quizduell.o and b/build/test/out/c/quizduell.o differ diff --git a/build/test/out/test_quizduell.out b/build/test/out/test_quizduell.out index 20f79a8..063255b 100755 Binary files a/build/test/out/test_quizduell.out and b/build/test/out/test_quizduell.out differ diff --git a/build/test/results/test_casualQuiz.pass b/build/test/results/test_casualQuiz.pass index 1e5245a..fd5d9e1 100644 --- a/build/test/results/test_casualQuiz.pass +++ b/build/test/results/test_casualQuiz.pass @@ -11,4 +11,4 @@ :failed: 0 :ignored: 0 :stdout: [] -:time: 0.016042600000218954 +:time: 0.016859499999554828 diff --git a/build/test/results/test_quizduell.pass b/build/test/results/test_quizduell.pass index a7d6bf4..97341cc 100644 --- a/build/test/results/test_quizduell.pass +++ b/build/test/results/test_quizduell.pass @@ -15,4 +15,4 @@ :failed: 0 :ignored: 0 :stdout: [] -:time: 0.03114080000023023 +:time: 0.01654910000070231 diff --git a/build/test/results/test_timequiz.pass b/build/test/results/test_timequiz.pass index 4662d41..21426f5 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.01592659999960233 +:time: 0.016376399998989655 diff --git a/build/test/results/test_wwm.pass b/build/test/results/test_wwm.pass index 5e5f5bb..8437dac 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.015713100000084523 +:time: 0.01621040000100038 diff --git a/test/test_quizduell.c b/test/test_quizduell.c index 73c8c94..dc909a3 100644 --- a/test/test_quizduell.c +++ b/test/test_quizduell.c @@ -18,4 +18,28 @@ void test_erstelleFrage(void) { TEST_ASSERT_EQUAL_STRING("AntwortD", testFrage.antwortD); TEST_ASSERT_EQUAL_CHAR('A', testFrage.korrekteAntwort); } + +void test_CookingFragen(void) { + Kategorie kategorien[MAX_CATEGORIES]; + + kategorien[1].fragen = (QuizFrage*)malloc(MAX_QUESTIONS_PER_CATEGORY * sizeof(QuizFrage)); + + kategorien[1].fragen[0] = erstelleFrage("Which Ingredient is used traditionally for Pesto?", "Tomatoes", "Basil", "Spinach", "Oregano", 'B'); + kategorien[1].fragen[1] = erstelleFrage("Which meal is known for its usage of rice?", "Lasagna", "Sushi", "Pizza", "Hamburger", 'B'); + kategorien[1].fragen[2] = erstelleFrage("Which color has a ripe banana?", "Red", "Green", "Yellow", "Orange", 'C'); + + kategorien[1].anzahlFragen = MAX_QUESTIONS_PER_CATEGORY; + kategorien[1].joker = 1; + + TEST_ASSERT_EQUAL_STRING("Which Ingredient is used traditionally for Pesto?", kategorien[1].fragen[0].frage); + TEST_ASSERT_EQUAL_STRING("Tomatoes", kategorien[1].fragen[0].antwortA); + TEST_ASSERT_EQUAL_STRING("Basil", kategorien[1].fragen[0].antwortB); + TEST_ASSERT_EQUAL_STRING("Spinach", kategorien[1].fragen[0].antwortC); + TEST_ASSERT_EQUAL_STRING("Oregano", kategorien[1].fragen[0].antwortD); + TEST_ASSERT_EQUAL_CHAR('B', kategorien[1].fragen[0].korrekteAntwort); + + + free(kategorien[1].fragen); +} + #endif //TEST \ No newline at end of file