|
@ -20,7 +20,7 @@ void test_FcheckaufRichtigkeit_correct_answer_atIndex1(void){ |
|
|
int TESTindex = 0; |
|
|
int TESTindex = 0; |
|
|
int TESTrichtige_antwort[]={1}; |
|
|
int TESTrichtige_antwort[]={1}; |
|
|
bool testfall; |
|
|
bool testfall; |
|
|
testfall = FcheckaufRichtigkeit(TESTeingabe, TESTrichtige_antwort, TESTindex); |
|
|
|
|
|
|
|
|
testfall = fcheckaufRichtigkeit(TESTeingabe, TESTrichtige_antwort, TESTindex); |
|
|
|
|
|
|
|
|
TEST_ASSERT_TRUE(testfall == true); |
|
|
TEST_ASSERT_TRUE(testfall == true); |
|
|
|
|
|
|
|
@ -30,7 +30,7 @@ void test_FcheckaufRichtigkeit_correct_answer_atIndex2(void){ |
|
|
int TESTindex = 0; |
|
|
int TESTindex = 0; |
|
|
int TESTrichtige_antwort[]={2}; |
|
|
int TESTrichtige_antwort[]={2}; |
|
|
bool testfall; |
|
|
bool testfall; |
|
|
testfall = FcheckaufRichtigkeit(TESTeingabe, TESTrichtige_antwort, TESTindex); |
|
|
|
|
|
|
|
|
testfall = fcheckaufRichtigkeit(TESTeingabe, TESTrichtige_antwort, TESTindex); |
|
|
|
|
|
|
|
|
TEST_ASSERT_TRUE(testfall == true); |
|
|
TEST_ASSERT_TRUE(testfall == true); |
|
|
|
|
|
|
|
@ -40,7 +40,7 @@ void test_FcheckaufRichtigkeit_correct_answer_atIndex3(void){ |
|
|
int TESTindex = 0; |
|
|
int TESTindex = 0; |
|
|
int TESTrichtige_antwort[]={3}; |
|
|
int TESTrichtige_antwort[]={3}; |
|
|
bool testfall; |
|
|
bool testfall; |
|
|
testfall = FcheckaufRichtigkeit(TESTeingabe, TESTrichtige_antwort, TESTindex); |
|
|
|
|
|
|
|
|
testfall = fcheckaufRichtigkeit(TESTeingabe, TESTrichtige_antwort, TESTindex); |
|
|
|
|
|
|
|
|
TEST_ASSERT_TRUE(testfall == true); |
|
|
TEST_ASSERT_TRUE(testfall == true); |
|
|
|
|
|
|
|
@ -49,7 +49,7 @@ void test_FcheckaufRichtigkeit_correct_answer_atIndex3(void){ |
|
|
int TESTindex = 0; |
|
|
int TESTindex = 0; |
|
|
int TESTrichtige_antwort[]={4}; |
|
|
int TESTrichtige_antwort[]={4}; |
|
|
bool testfall; |
|
|
bool testfall; |
|
|
testfall = FcheckaufRichtigkeit(TESTeingabe, TESTrichtige_antwort, TESTindex); |
|
|
|
|
|
|
|
|
testfall = fcheckaufRichtigkeit(TESTeingabe, TESTrichtige_antwort, TESTindex); |
|
|
|
|
|
|
|
|
TEST_ASSERT_TRUE(testfall == true); |
|
|
TEST_ASSERT_TRUE(testfall == true); |
|
|
|
|
|
|
|
@ -59,7 +59,7 @@ void test_FcheckaufRichtigkeit_incorrect_input_higher(void){ |
|
|
int TESTindex = 0; |
|
|
int TESTindex = 0; |
|
|
int TESTrichtige_antwort[]={3}; |
|
|
int TESTrichtige_antwort[]={3}; |
|
|
bool testfall; |
|
|
bool testfall; |
|
|
testfall = FcheckaufRichtigkeit(TESTeingabe, TESTrichtige_antwort, TESTindex); |
|
|
|
|
|
|
|
|
testfall = fcheckaufRichtigkeit(TESTeingabe, TESTrichtige_antwort, TESTindex); |
|
|
TEST_ASSERT_TRUE(testfall != true); |
|
|
TEST_ASSERT_TRUE(testfall != true); |
|
|
} |
|
|
} |
|
|
void test_FcheckaufRichtigkeit_incorrect_input_lower(void){ |
|
|
void test_FcheckaufRichtigkeit_incorrect_input_lower(void){ |
|
@ -67,7 +67,7 @@ void test_FcheckaufRichtigkeit_incorrect_input_lower(void){ |
|
|
int TESTindex = 0; |
|
|
int TESTindex = 0; |
|
|
int TESTrichtige_antwort[]={3}; |
|
|
int TESTrichtige_antwort[]={3}; |
|
|
bool testfall; |
|
|
bool testfall; |
|
|
testfall = FcheckaufRichtigkeit(TESTeingabe, TESTrichtige_antwort, TESTindex); |
|
|
|
|
|
|
|
|
testfall = fcheckaufRichtigkeit(TESTeingabe, TESTrichtige_antwort, TESTindex); |
|
|
TEST_ASSERT_TRUE(testfall != true); |
|
|
TEST_ASSERT_TRUE(testfall != true); |
|
|
} |
|
|
} |
|
|
void test_FzaehlernachAuswahl(void){ |
|
|
void test_FzaehlernachAuswahl(void){ |
|
@ -76,7 +76,7 @@ void test_FzaehlernachAuswahl(void){ |
|
|
int answered = 0; |
|
|
int answered = 0; |
|
|
int* correctP = &correct; |
|
|
int* correctP = &correct; |
|
|
int* answeredP = &answered; |
|
|
int* answeredP = &answered; |
|
|
FzaehlernachAuswahl(richtig, answeredP, correctP); |
|
|
|
|
|
|
|
|
fzaehlernachAuswahl(richtig, answeredP, correctP); |
|
|
|
|
|
|
|
|
TEST_ASSERT_EQUAL_INT(1, correct); |
|
|
TEST_ASSERT_EQUAL_INT(1, correct); |
|
|
TEST_ASSERT_EQUAL_INT(1, answered); |
|
|
TEST_ASSERT_EQUAL_INT(1, answered); |
|
@ -88,7 +88,7 @@ void test_FzaehlernachAuswahl_bei1(void){ |
|
|
int answered = 1; |
|
|
int answered = 1; |
|
|
int* correctP = &correct; |
|
|
int* correctP = &correct; |
|
|
int* answeredP = &answered; |
|
|
int* answeredP = &answered; |
|
|
FzaehlernachAuswahl(richtig, answeredP, correctP); |
|
|
|
|
|
|
|
|
fzaehlernachAuswahl(richtig, answeredP, correctP); |
|
|
|
|
|
|
|
|
TEST_ASSERT_EQUAL_INT(2, correct); |
|
|
TEST_ASSERT_EQUAL_INT(2, correct); |
|
|
TEST_ASSERT_EQUAL_INT(2, answered); |
|
|
TEST_ASSERT_EQUAL_INT(2, answered); |
|
@ -100,7 +100,7 @@ void test_FzaehlernachAuswahl_falsch_bei_0(void){ |
|
|
int answered = 0; |
|
|
int answered = 0; |
|
|
int* correctP = &correct; |
|
|
int* correctP = &correct; |
|
|
int* answeredP = &answered; |
|
|
int* answeredP = &answered; |
|
|
FzaehlernachAuswahl(richtig, answeredP, correctP); |
|
|
|
|
|
|
|
|
fzaehlernachAuswahl(richtig, answeredP, correctP); |
|
|
|
|
|
|
|
|
TEST_ASSERT_EQUAL_INT(0, correct); |
|
|
TEST_ASSERT_EQUAL_INT(0, correct); |
|
|
TEST_ASSERT_EQUAL_INT(1, answered); |
|
|
TEST_ASSERT_EQUAL_INT(1, answered); |
|
@ -112,7 +112,7 @@ void test_FzaehlernachAuswahl_falsch_bei_1(void){ |
|
|
int answered = 1; |
|
|
int answered = 1; |
|
|
int* correctP = &correct; |
|
|
int* correctP = &correct; |
|
|
int* answeredP = &answered; |
|
|
int* answeredP = &answered; |
|
|
FzaehlernachAuswahl(richtig, answeredP, correctP); |
|
|
|
|
|
|
|
|
fzaehlernachAuswahl(richtig, answeredP, correctP); |
|
|
|
|
|
|
|
|
TEST_ASSERT_EQUAL_INT(1, correct); |
|
|
TEST_ASSERT_EQUAL_INT(1, correct); |
|
|
TEST_ASSERT_EQUAL_INT(2, answered); |
|
|
TEST_ASSERT_EQUAL_INT(2, answered); |
|
@ -122,7 +122,7 @@ void test_FtryAgain_butalways_played_is_false(void){ |
|
|
bool already_played = false; |
|
|
bool already_played = false; |
|
|
bool testbool = true; |
|
|
bool testbool = true; |
|
|
|
|
|
|
|
|
testbool = FtryAgain(already_played); |
|
|
|
|
|
|
|
|
testbool = ftryAgain(already_played); |
|
|
TEST_ASSERT_TRUE(testbool == false); |
|
|
TEST_ASSERT_TRUE(testbool == false); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|