Question: It is required to produce test code necessary to module test a student records module, described externally by the following API: /* the longest possible

It is required to produce test code necessary to module test a student records module, described externally by the following API: /* the longest possible length of a name */ #define LONGEST_NAME 20 /* * Adds student. If firstName too long, truncates * returns: row number on success, -1 on error */ int add_student( const char *firstName, const char *lastName, const char *ID ); * Removes student. ID found: success; * otherwise fail (-1) */ int remove_student (const char *ID ) ; /* * Save the entire database: open the file, write all, close file * First line = number of students. * Then one student per line, in the format ID, 1name, fname * Return number of students saved on success, -1 otherwise */ int save( const char *filename) ; Write a test harness to perform a module test, being careful to include at least one successful call and one error call for each function to be tested
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
