MacroPackage: util.testToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.0
Unrevised from 9.0 to 10.0.
9.0 version


Arguments: form &key announce catch-breaks fail-info known-failure (condition-type (quote simple-error)) include-subtypes format-control format-arguments

Test that form signals an error. The order of evaluation of the arguments is keywords first, then form.

If announce is non-nil, then cause the error message to be printed.

If the catch-breaks is non-nil then consider a call to common-lisp:break an error.

The value of the fail-info argument should be nil or a string. If a string, it is printed if the test fails, providing more information with a test failure. (Typical strings are "bug2127" and "can fail when network is slow".)

known-failure if true, affects what is printed when the test fails or succeeds. Thus a failure is reported as "Test failed: known failure: ..." and a success as "Expected test failure for [...] did not occur."

The value of condition-type must be a symbol naming a condition type (nil is not an acceptable value). The condition type is used to check against the signaled condition type. The test will fail if they do not match. Note: the default is simple-error so if this argument is unspecified, the test will fail if an error that is not a simple-error is signaled. If you want any error, specify the value of this argument error and the value of include-subtypes t.

include-subtypes, used with condition-type, can be used to match a condition to an entire subclass of the condition type hierarchy.

format-control and format-arguments can be used to check the error message itself. The comparison is done with equal.

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

Copyright (c) 1998-2016, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 9.0 page.
Created 2015.5.21.

Allegro CL version 10.0
Unrevised from 9.0 to 10.0.
9.0 version