ToC DocOverview CGDoc RelNotes FAQ Index PermutedIndex
Allegro CL version 11.0

util.test variables


*break-on-test-failures*

variable, util.test package

When the value of this variable is nil, when a test failure occurs (that is, the behavior is not what is expected), information is collected but testing continues. When the value of this variable is true, break is called when a test failure occurs, allowing interactive debugging of the failure.

See test-harness.html for information on the Allegro CL test harness.


*error-protect-tests*

variable, util.test package

This variable has no effect when test code is compiled. When test code is not compiled, then if the value of this variable is true, each test is protected from errors. If an error occurs, then that will be taken as a test failure unless test-error is being used. If the value of this variable is nil, then if an error occurs (except in a test-error form), an error is signaled and a break loop is entered.

cl-user(17): (defun foo ()
                (util.test:test 1 (+ 0 "1")))
cl-user(18): (foo)
Error: `"1"' is not of the expected type `number'
  [condition type: type-error]
[1] cl-user(19): :res
;; When *ERROR-PROTECT-TESTS* is NIL, tests are not protected:
cl-user(20): (let ((util.test:*error-protect-tests* nil))
           (foo))
Error: `"1"' is not of the expected type `number'
  [condition type: type-error]
[1] cl-user(21): :res
;; When *ERROR-PROTECT-TESTS* is T and the test code is not
;; compiled, tests are protected:
cl-user(22): (let ((util.test:*error-protect-tests* t))
           (foo))
Condition type: TYPE-ERROR
Message: `"1"' is not of the expected type `number'
 * * * UNEXPECTED TEST FAILURE * * *
Test failed: (+ 0 "1")
Reason: an error (of type TYPE-ERROR) was detected.
nil
;; But when we compile FOO, binding *ERROR-PROTECT-TESTS*
;; to T has no effect:
cl-user(23): (compile 'foo)
foo
cl-user(24): (let ((util.test:*error-protect-tests* t))
           (foo))
Error: `"1"' is not of the expected type `number'
  [condition type: TYPE-ERROR]
[1] cl-user(25):

See test-harness.html for information on the Allegro CL test harness.


*test-errors*

variable, util.test package

The value is the number of test errors which have occurred. This variable is used by with-tests to total the errors during all the tests in the body.

See test-harness.html for information on the Allegro CL test harness.


*test-report-thread*

variable, util.test package

When the value of this variable is nil, no additional output is produced. This default setting keeps the output identical to that of earlier versions.

When the value of this variable is true, each group of output lines from the tester is prefixed with a line of the form

===== test report from tttttt[4] =====

where tttttt is the name of the Lisp thread producing the output. The number in brackets is a unique internal thread id (useful in distinguishing among threads with identical names).


*test-successes*

variable, util.test package

The value is the number of test successes which have occurred. This variable is used by with-tests to total the successes during all the tests in the body.

See test-harness.html for information on the Allegro CL test harness.


*test-unexpected-failures*

variable, util.test package

The value is the number of unexpected test failures which have occurred. This variable is used by with-tests to total the unexpected test failures during all the tests in the body.

See test-harness.html for information on the Allegro CL test harness.


Copyright (c) Franz Inc. Lafayette, CA., USA. All rights reserved.

ToC DocOverview CGDoc RelNotes FAQ Index PermutedIndex
Allegro CL version 11.0