Browse Source

Unittest1

remotes/origin/Kevin
Kevin Schellberg 11 months ago
parent
commit
6d7135426a
  1. 2
      build/test/results/test_casualQuiz.pass
  2. 2
      build/test/results/test_quizduell.pass
  3. 2
      build/test/results/test_timequiz.pass
  4. 2
      build/test/results/test_wwm.pass
  5. 21
      test/test_quizduell.c

2
build/test/results/test_casualQuiz.pass

@ -11,4 +11,4 @@
:failed: 0 :failed: 0
:ignored: 0 :ignored: 0
:stdout: [] :stdout: []
:time: 0.01711440000008224
:time: 0.030125300000008792

2
build/test/results/test_quizduell.pass

@ -11,4 +11,4 @@
:failed: 0 :failed: 0
:ignored: 0 :ignored: 0
:stdout: [] :stdout: []
:time: 0.017044999999939137
:time: 0.027771300000040355

2
build/test/results/test_timequiz.pass

@ -11,4 +11,4 @@
:failed: 0 :failed: 0
:ignored: 0 :ignored: 0
:stdout: [] :stdout: []
:time: 0.01672519999999622
:time: 0.028294399999936104

2
build/test/results/test_wwm.pass

@ -11,4 +11,4 @@
:failed: 0 :failed: 0
:ignored: 0 :ignored: 0
:stdout: [] :stdout: []
:time: 0.016789599999924576
:time: 0.027808699999923192

21
test/test_quizduell.c

@ -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
Loading…
Cancel
Save