;Used for automatic unit testing. ;obj1 is the tested unit's return value on a given data set. ;obj2 is the required results that the unit should return ; on that data set. ;msg is the unit's name. (define test (lambda (msg obj1 obj2) ;Equal? recursively compares the contents of ;pairs, vectors, and strings, applying eqv? ;on other objects such as numbers and symbols. (cond ((not (equal? obj1 obj2)) (display "Error*** Unit test failed in: ") (display msg) (newline) ) ) ) )