Each class C representing a data type definition1.3 should include a CTest method that evaluates each primitive operation for the data type on the sample data values defined for its input domain and other representative input values.
If the DrJava programming environment is not available, the main method for the class can be used instead of test. Alternatively, a tool like JUnit (see www.junit.org) can be used to run all of the test methods in a program. In fact, for large programs, tools like JUnit are essential to automate the testing process-which must be performed every time a program is modified.