diff --git a/test/test_timequiz.c b/test/test_timequiz.c index 086c595..b42386a 100644 --- a/test/test_timequiz.c +++ b/test/test_timequiz.c @@ -68,4 +68,14 @@ void test_processUserAnswer_wrong(void) { TEST_ASSERT_EQUAL_INT(0, totalCorrectAnswers); } +void test_processUserAnswer_correctAnswer_index3(void) { + int score = 0; + int totalCorrectAnswers = 0; + char* answers[] = {"A", "B", "C", "D"}; + processUserAnswer(4, 3, &score, &totalCorrectAnswers, answers); + TEST_ASSERT_EQUAL_INT(1, score); + TEST_ASSERT_EQUAL_INT(1, totalCorrectAnswers); +} + + #endif //TEST