|
|
@ -0,0 +1,21 @@ |
|
|
|
#ifdef TEST |
|
|
|
|
|
|
|
#include <stdlib.h> |
|
|
|
#include "unity.h" |
|
|
|
#include "quizduell.h" |
|
|
|
|
|
|
|
void setUp(void) {} |
|
|
|
|
|
|
|
void tearDown(void) {} |
|
|
|
|
|
|
|
void test_erstelleFrage(void) { |
|
|
|
QuizFrage testFrage = erstelleFrage("Testfrage", "AntwortA", "AntwortB", "AntwortC", "AntwortD", 'A'); |
|
|
|
|
|
|
|
TEST_ASSERT_EQUAL_STRING("Testfrage", testFrage.frage); |
|
|
|
TEST_ASSERT_EQUAL_STRING("AntwortA", testFrage.antwortA); |
|
|
|
TEST_ASSERT_EQUAL_STRING("AntwortB", testFrage.antwortB); |
|
|
|
TEST_ASSERT_EQUAL_STRING("AntwortC", testFrage.antwortC); |
|
|
|
TEST_ASSERT_EQUAL_STRING("AntwortD", testFrage.antwortD); |
|
|
|
TEST_ASSERT_EQUAL_CHAR('A', testFrage.korrekteAntwort); |
|
|
|
} |
|
|
|
#endif //TEST |