|
|
@ -1428,7 +1428,7 @@ void test_getUserChoice_invalidInput(void) |
|
|
|
|
|
|
|
freopen("invalid_input.txt", "r", |
|
|
|
|
|
|
|
(__acrt_iob_func(0)) |
|
|
|
(&_iob[0]) |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
@ -1472,7 +1472,7 @@ void test_getUserAnswer_invalidInput(void) |
|
|
|
|
|
|
|
freopen("invalid_input.txt", "r", |
|
|
|
|
|
|
|
(__acrt_iob_func(0)) |
|
|
|
(&_iob[0]) |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
@ -1489,3 +1489,451 @@ void test_getUserAnswer_invalidInput(void) |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void test_bereichauswahl_gueltige_eingabe(void) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int gewaehlterbereich; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
gewaehlterbereich = bereichauswahl(1); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UnityAssertEqualNumber((UNITY_INT)((1)), (UNITY_INT)((gewaehlterbereich)), ( |
|
|
|
|
|
|
|
((void *)0) |
|
|
|
|
|
|
|
), (UNITY_UINT)(697), UNITY_DISPLAY_STYLE_INT); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void test_bereichauswahl_ungueltige_eingabe(void) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int gewaehlterbereich; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
gewaehlterbereich = bereichauswahl(7); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UnityAssertEqualNumber((UNITY_INT)((7)), (UNITY_INT)((gewaehlterbereich)), ( |
|
|
|
|
|
|
|
((void *)0) |
|
|
|
|
|
|
|
), (UNITY_UINT)(709), UNITY_DISPLAY_STYLE_INT); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void test_bereichfalsch_gueltige_eingabe(void) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int gewaehlterbereich; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
gewaehlterbereich = bereichfalsch(3); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UnityAssertEqualNumber((UNITY_INT)((3)), (UNITY_INT)((gewaehlterbereich)), ( |
|
|
|
|
|
|
|
((void *)0) |
|
|
|
|
|
|
|
), (UNITY_UINT)(721), UNITY_DISPLAY_STYLE_INT); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void test_bereichfalsch_ungueltige_eingabe(void) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int gewaehlterbereich; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
gewaehlterbereich = bereichfalsch(9); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UnityAssertEqualNumber((UNITY_INT)((9)), (UNITY_INT)((gewaehlterbereich)), ( |
|
|
|
|
|
|
|
((void *)0) |
|
|
|
|
|
|
|
), (UNITY_UINT)(733), UNITY_DISPLAY_STYLE_INT); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void test_bereich1_richtige_antwort(void) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int richtige_antwort1 = 2; |
|
|
|
|
|
|
|
int antwort1 = 0; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
antwort1 = 2; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UnityAssertEqualNumber((UNITY_INT)((richtige_antwort1)), (UNITY_INT)((antwort1)), ( |
|
|
|
|
|
|
|
((void *)0) |
|
|
|
|
|
|
|
), (UNITY_UINT)(746), UNITY_DISPLAY_STYLE_INT); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void test_bereich1_falsche_antwort(void) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int falsche_antwort1 = 4; |
|
|
|
|
|
|
|
int antwort1 = 0; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
antwort1 = 4; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UnityAssertEqualNumber((UNITY_INT)((falsche_antwort1)), (UNITY_INT)((antwort1)), ( |
|
|
|
|
|
|
|
((void *)0) |
|
|
|
|
|
|
|
), (UNITY_UINT)(759), UNITY_DISPLAY_STYLE_INT); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void test_bereich3_richtige_antwort(void) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int richtige_antwort1 = 2; |
|
|
|
|
|
|
|
int antwort1 = 0; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
antwort1 = 2; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UnityAssertEqualNumber((UNITY_INT)((richtige_antwort1)), (UNITY_INT)((antwort1)), ( |
|
|
|
|
|
|
|
((void *)0) |
|
|
|
|
|
|
|
), (UNITY_UINT)(772), UNITY_DISPLAY_STYLE_INT); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void test_bereich3_falsche_antwort(void) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int falsche_antwort1 = 1; |
|
|
|
|
|
|
|
int antwort1 = 0; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
antwort1 = 1; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UnityAssertEqualNumber((UNITY_INT)((falsche_antwort1)), (UNITY_INT)((antwort1)), ( |
|
|
|
|
|
|
|
((void *)0) |
|
|
|
|
|
|
|
), (UNITY_UINT)(785), UNITY_DISPLAY_STYLE_INT); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void test_bereich3_gewinner_spieler1(void) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int ergebnis_spieler1_gewinnt = 4; |
|
|
|
|
|
|
|
int ergebnis_spieler1 = 0; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ergebnis_spieler1 = 4; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UnityAssertEqualNumber((UNITY_INT)((ergebnis_spieler1_gewinnt)), (UNITY_INT)((ergebnis_spieler1)), ( |
|
|
|
|
|
|
|
((void *)0) |
|
|
|
|
|
|
|
), (UNITY_UINT)(798), UNITY_DISPLAY_STYLE_INT); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void test_bereich3_gewinner_spieler2(void) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int ergebnis_spieler2_gewinnt = 2; |
|
|
|
|
|
|
|
int ergebnis_spieler2 = 0; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ergebnis_spieler2 = 2; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UnityAssertEqualNumber((UNITY_INT)((ergebnis_spieler2_gewinnt)), (UNITY_INT)((ergebnis_spieler2)), ( |
|
|
|
|
|
|
|
((void *)0) |
|
|
|
|
|
|
|
), (UNITY_UINT)(811), UNITY_DISPLAY_STYLE_INT); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void test_bereich4_richtige_antwort(void) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int richtige_antwort1 = 3; |
|
|
|
|
|
|
|
int antwort1 = 0; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
antwort1 = 3; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UnityAssertEqualNumber((UNITY_INT)((richtige_antwort1)), (UNITY_INT)((antwort1)), ( |
|
|
|
|
|
|
|
((void *)0) |
|
|
|
|
|
|
|
), (UNITY_UINT)(824), UNITY_DISPLAY_STYLE_INT); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void test_bereich4_falsche_antwort(void) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int falsche_antwort1 = 2; |
|
|
|
|
|
|
|
int antwort1 = 0; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
antwort1 = 2; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UnityAssertEqualNumber((UNITY_INT)((falsche_antwort1)), (UNITY_INT)((antwort1)), ( |
|
|
|
|
|
|
|
((void *)0) |
|
|
|
|
|
|
|
), (UNITY_UINT)(837), UNITY_DISPLAY_STYLE_INT); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void test_bereich4_gewinner_spieler1(void) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int ergebnis_spieler1_gewinnt = 1; |
|
|
|
|
|
|
|
int ergebnis_spieler1 = 0; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ergebnis_spieler1 = 1; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UnityAssertEqualNumber((UNITY_INT)((ergebnis_spieler1_gewinnt)), (UNITY_INT)((ergebnis_spieler1)), ( |
|
|
|
|
|
|
|
((void *)0) |
|
|
|
|
|
|
|
), (UNITY_UINT)(850), UNITY_DISPLAY_STYLE_INT); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void test_bereich4_gewinner_spieler2(void) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int ergebnis_spieler2_gewinnt = 5; |
|
|
|
|
|
|
|
int ergebnis_spieler2 = 0; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ergebnis_spieler2 = 5; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UnityAssertEqualNumber((UNITY_INT)((ergebnis_spieler2_gewinnt)), (UNITY_INT)((ergebnis_spieler2)), ( |
|
|
|
|
|
|
|
((void *)0) |
|
|
|
|
|
|
|
), (UNITY_UINT)(863), UNITY_DISPLAY_STYLE_INT); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void test_bereich5_richtige_antwort(void) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int richtige_antwort1 = 2; |
|
|
|
|
|
|
|
int antwort1 = 0; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
antwort1 = 2; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UnityAssertEqualNumber((UNITY_INT)((richtige_antwort1)), (UNITY_INT)((antwort1)), ( |
|
|
|
|
|
|
|
((void *)0) |
|
|
|
|
|
|
|
), (UNITY_UINT)(876), UNITY_DISPLAY_STYLE_INT); |
|
|
|
|
|
|
|
} |