#include #include #include "curve.h" #include "db.h" // will still implement the functions // Stub for getGradeForStudent - counts the total number of // times that it is called. int numGradeCalls = 0; // global so persists int getGradeForStudent(int studentId, int hwNum) { numGradeCalls++; return 0; } // Stub for saveStudentGrade does nothing. void saveStudentGrade(int studentId, int hwNum, int grade) {} int main(int argc, char** argv) { int students[] = { 1, 2, 3, 4, 5 }; // Test case - 5 students, getGradeForStudent should be called // 5 times. Will test that 'curve' does loop through each // student curve(students, 5, 1, 12); assert(numGradeCalls == 5); curve(students, 5, 1, 12); assert(numGradeCalls == 5); // assert should fail return EXIT_SUCCESS; }