Subject: do-test To: xclispcore^ cc: nuyens.pa This msg is stored on {eris}cml>test>do-test.tedit The tester is on {eris}library>do-test.dcom. The main entries are the following: (DO-TEST name forms) A test succeeds if the final form returns a non-nil result. Name is just the name which can be an atom or string. Forms are presumed to be read with the Common Lisp reader. (DO-TEST-GROUP name&options forms) For associating a group of tests. For instance, a group of tests may all require the same setup and cleanup. If there are any options (see below) then the CAR of name&options is the name and the CDR is a keyword/value list. (EXPECT-ERRORS error-types forms) Error-types is a list of errors that may occur while executing the forms. If one of the listed errors occurs, EXPECT-ERRORS returns (values t error-that-occurred), otherwise nil. (DO-TEST-FILE filename) Reads and executes a file of tests. The file should be clear text (clearput in TEdit) or terminate with a STOP. The first choice is preferred. The format for test names is Chap#[-sec#[-subsec#]]-comment.TEST (DO-ALL-TESTS &key (results *test-batch-results*) (pattern *test-file-pattern*) (sysout-type nil)) Runs all tests in files that match pattern, printing the results to a new version of results. The head of the results file is a message of the date and time the tests are being run and the MAKESYSDATE of the sysout; if sysout-type is supplied, a line for it goes out too. TEST-SETQ, TEST-DEFUN, TEST-DEFMACRO These work like SETQ, DEFUN, and DEFMACRO, except that if they are executed within a DO-TEST-GROUP, their effects are manually undone (old values are saved and then restored) upon leaving the DO-TEST-GROUP. Use these in :BEFORE forms that a whole group of DO-TESTs want to see. DON'T use TEST-SETQ on locally-bound variables. Relevant variables: *TEST-MODE* Default is :batch, which means to report errors on *TEST-STREAM*. Other value is :interactive which means to produce a break window. *TEST-BATCH-RESULTS* Defaults to "{eris}cml>test>test-results" *TEST-FILE-PATTERN* Defaults to "{eris}cml>test>*.test;" which runs all the internal tests. *TEST-COMPILE* If this switch is non-nil, DO-TEST compiles its forms before testing them. This will be more useful later when the real compiler and real unwinder come on line. Options to do-test-group. :before allows for a setup form for a group of tests. :after allows a form to be run after the tests without affecting results. Please feel free to suggest ,implement and *document* others. Suggestions: eval/compile, after, signals-to-catch, etc. Greg TIMESROMAN  TIMESROMAN  TIMESROMAN Ó 4 V 8ò+ —ø rzº