|
@ -68,4 +68,14 @@ void test_processUserAnswer_wrong(void) { |
|
|
TEST_ASSERT_EQUAL_INT(0, totalCorrectAnswers); |
|
|
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 |
|
|
#endif //TEST |