| Version 1.9 Build 1556
|
|
Next: Documentation
Up: Code Review Process
Previous: For the Reviewer
The programmer must provide one or more programs that thorougly test
the newly submitted code. These programs should be very simple to
run, and should exercise all aspects of the new code.7.6
To indicate a successful test, it will often suffice for the test
program to simply print``OK'' to standard output, and return 0
as the value of the main program. In the test program fails, it
should print a descriptive error message, and return some non-zero
value to the environment. Some classes and global functions
(especially those which employ numerical methods) can only be
adequately tested by comparing a list of expected results against
actual results, making allowance for tolerable roundoff
differences7.7.
The programmer may use two strategies here:
- 1.
- Create tMyClass.out, which contains the expected results, and
tMyClass.exec, a shell script which runs tMyClass, redirects
the actual results to a file, and compares them to the
contents of tMyClass.out.
- 2.
- Alternatively, the tMyClass program itself creates the new
results file, and runs the comparison, using a system call;
when the comparison of results is complete, tMyClass prints ``OK''
and returns 0 to the environment if it is successful, just as
the simpler test programs do.
Next: Documentation
Up: Code Review Process
Previous: For the Reviewer
  Contents
  Index
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc.,
Washington, D.C.
Return to AIPS++ Home Page
2006-10-15