Writing Test Scripts

As with the rest of HATE, test scripts are written in the Tcl programming language. However, writing a test script does not require an in-depth knowledge of Tcl; reading through the following guidelines and looking at an example should be enough to get you going.

A well-formed test script comprises two procedures:

Each invocation of HATE_Test should pass the following four arguments:

  1. the test name, a unique identifier for this particular test; this is used in the production of verbose output
  2. a value that indicates whether the test is expected to succeed or fail; the values 1 and 0 are normally used for success and failure respectively
  3. the input to the test program
  4. the expected output from the test program


Adrian F. Clark
VASE Laboratory
Electronic Systems Engineering
University of Essex
Wivenhoe Park, Colchester, CO4 3SQ, UK
Email: alien@essex.ac.uk