|
|
@ -259,3 +259,39 @@ void test_createCategory2WithQuestions(void) { |
|
|
|
free(kategorien[2].fragen); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
void test_befreieKategorie(void) { |
|
|
|
|
|
|
|
Kategorie testKategorie; |
|
|
|
|
|
|
|
testKategorie.fragen = (QuizFrage*)malloc(3 * sizeof(QuizFrage)); |
|
|
|
|
|
|
|
testKategorie.anzahlFragen = 3; |
|
|
|
|
|
|
|
testKategorie.joker = 1; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
befreieKategorie(&testKategorie); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
do {if ((((testKategorie.fragen)) == |
|
|
|
|
|
|
|
((void *)0) |
|
|
|
|
|
|
|
)) {} else {UnityFail( (((" Expected NULL"))), (UNITY_UINT)((UNITY_UINT)((UNITY_UINT)(94))));}} while(0); |
|
|
|
|
|
|
|
UnityAssertEqualNumber((UNITY_INT)((0)), (UNITY_INT)((testKategorie.anzahlFragen)), ( |
|
|
|
|
|
|
|
((void *)0) |
|
|
|
|
|
|
|
), (UNITY_UINT)(95), UNITY_DISPLAY_STYLE_INT); |
|
|
|
|
|
|
|
UnityAssertEqualNumber((UNITY_INT)((0)), (UNITY_INT)((testKategorie.joker)), ( |
|
|
|
|
|
|
|
((void *)0) |
|
|
|
|
|
|
|
), (UNITY_UINT)(96), UNITY_DISPLAY_STYLE_INT); |
|
|
|
|
|
|
|
} |