You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
644 B

11 months ago
  1. #ifdef TEST
  2. #include <stdlib.h>
  3. #include "unity.h"
  4. #include "quizduell.h"
  5. void setUp(void) {}
  6. void tearDown(void) {}
  7. void test_erstelleFrage(void) {
  8. QuizFrage testFrage = erstelleFrage("Testfrage", "AntwortA", "AntwortB", "AntwortC", "AntwortD", 'A');
  9. TEST_ASSERT_EQUAL_STRING("Testfrage", testFrage.frage);
  10. TEST_ASSERT_EQUAL_STRING("AntwortA", testFrage.antwortA);
  11. TEST_ASSERT_EQUAL_STRING("AntwortB", testFrage.antwortB);
  12. TEST_ASSERT_EQUAL_STRING("AntwortC", testFrage.antwortC);
  13. TEST_ASSERT_EQUAL_STRING("AntwortD", testFrage.antwortD);
  14. TEST_ASSERT_EQUAL_CHAR('A', testFrage.korrekteAntwort);
  15. }
  16. #endif //TEST