Common Lisp Package: PTESTER

README:

FUNCTION

Private

Undocumented

GC-PRINT-STATE

SETFGC-PRINT-STATE (STATE)

TEST-CHECK (&KEY (PREDICATE #'EQL) EXPECTED-RESULT TEST-RESULTS TEST-FORM MULTIPLE-VALUES FAIL-INFO KNOWN-FAILURE WANTED-MESSAGE GOT-MESSAGE CONDITION-TYPE CONDITION INCLUDE-SUBTYPES FORMAT-CONTROL FORMAT-ARGUMENTS &AUX FAIL PREDICATE-FAILED GOT WANTED)

MACRO

Public

TEST (EXPECTED-VALUE TEST-FORM &KEY (TEST #'EQL TEST-GIVEN) (MULTIPLE-VALUES NIL MULTIPLE-VALUES-GIVEN) (FAIL-INFO NIL FAIL-INFO-GIVEN) (KNOWN-FAILURE NIL KNOWN-FAILURE-GIVEN) ERRORSET REPORTED-FORM (WANTED-MESSAGE NIL WANTED-MESSAGE-GIVEN) (GOT-MESSAGE NIL GOT-MESSAGE-GIVEN))

Perform a single test. `expected-value' is the reference value for the test. `test-form' is a form that will produce the value to be compared to the expected-value. If the values are not the same, then an error is logged, otherwise a success is logged. Normally the comparison of values is done with `eql'. The `test' keyword argument can be used to specify other comparison functions, such as eq, equal,equalp, string=, string-equal, etc. Normally, only the first return value from the test-form is considered, however if `multiple-values' is t, then all values returned from test-form are considered. `fail-info' allows more information to be printed with a test failure. `known-failure' marks the test as a known failure. This allows for programs that do regression analysis on the output from a test run to discriminate on new versus known failures.

TEST-ERROR (FORM &KEY ANNOUNCE CATCH-BREAKS (FAIL-INFO NIL FAIL-INFO-GIVEN) (KNOWN-FAILURE NIL KNOWN-FAILURE-GIVEN) (CONDITION-TYPE ''SIMPLE-ERROR) (INCLUDE-SUBTYPES NIL INCLUDE-SUBTYPES-GIVEN) (FORMAT-CONTROL NIL FORMAT-CONTROL-GIVEN) (FORMAT-ARGUMENTS NIL FORMAT-ARGUMENTS-GIVEN))

Test that `form' signals an error. The order of evaluation of the arguments is keywords first, then test form. If `announce' is non-nil, then cause the error message to be printed. The `catch-breaks' is non-nil then consider a call to common-lisp:break an `error'. `fail-info' allows more information to be printed with a test failure. `known-failure' marks the test as a known failure. This allows for programs that do regression analysis on the output from a test run to discriminate on new versus known failures. If `condition-type' is non-nil, it should be a symbol naming a condition type, which is used to check against the signalled condition type. The test will fail if they do not match. `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.

TEST-NO-ERROR (FORM &KEY ANNOUNCE CATCH-BREAKS (FAIL-INFO NIL FAIL-INFO-GIVEN) (KNOWN-FAILURE NIL KNOWN-FAILURE-GIVEN))

Test that `form' does not signal an error. The order of evaluation of the arguments is keywords first, then test form. If `announce' is non-nil, then cause the error message to be printed. The `catch-breaks' is non-nil then consider a call to common-lisp:break an `error'. `fail-info' allows more information to be printed with a test failure. `known-failure' marks the test as a known failure. This allows for programs that do regression analysis on the output from a test run to discriminate on new versus known failures.

TEST-NO-WARNING (FORM &KEY FAIL-INFO KNOWN-FAILURE)

Test that `form' does not signal a warning. The order of evaluation of the arguments is keywords first, then test form. `fail-info' allows more information to be printed with a test failure. `known-failure' marks the test as a known failure. This allows for programs that do regression analysis on the output from a test run to discriminate on new versus known failures.

TEST-WARNING (FORM &KEY FAIL-INFO KNOWN-FAILURE)

Test that `form' signals a warning. The order of evaluation of the arguments is keywords first, then test form. `fail-info' allows more information to be printed with a test failure. `known-failure' marks the test as a known failure. This allows for programs that do regression analysis on the output from a test run to discriminate on new versus known failures.

Undocumented

WITH-TESTS ((&KEY (NAME unnamed)) &BODY BODY)

Private

Undocumented

ERRORSET (FORM)

IF* (&REST ARGS)

TEST-VALUES (FORM &OPTIONAL ANNOUNCE CATCH-BREAKS)

TEST-VALUES-ERRORSET (FORM &OPTIONAL ANNOUNCE CATCH-BREAKS)

GENERIC-FUNCTION

Private

Undocumented

CONDITIONP (THING)

VARIABLE

Public

*BREAK-ON-TEST-FAILURES*

When a test failure occurs, common-lisp:break is called, allowing interactive debugging of the failure.

*ERROR-PROTECT-TESTS*

Protect each test from errors. If an error occurs, then that will be taken as a test failure unless test-error is being used.

*TEST-ERRORS*

The value is the number of test errors which have occurred.

*TEST-SUCCESSES*

The value is the number of test successes which have occurred.

*TEST-UNEXPECTED-FAILURES*

The value is the number of unexpected test failures which have occurred.

Private

Undocumented

*ANNOUNCE-TEST*

IF*-KEYWORD-LIST

CONDITION

Private

Undocumented

SIMPLE-BREAK