The test programmer prepares a test script using a text editor. PGMGEN reads that script and generates a C driver, which is compiled and linked with the module implementation. When the resulting program is executed, the test cases from the script are run on the module implementation and any errors are reported.
To generate the test driver, PGMGEN first generates code to record exception occurrences. Then, for each test case of the form
PGMGEN generates code that performs the steps outlined in Figure 1.
Figure 1: Steps performed for a PGMGEN test case
Following the last case, code is generated to print summary statistics.