The ptester Reference Manual

This is the ptester Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Sep 15 06:25:30 2024 GMT+0.

Table of Contents


1 Systems

The main system appears first, followed by any subsystem dependency.


1.1 ptester

Portable test harness package

Maintainer

Kevin M. Rosenberg <>

Author

Kevin Layer, Franz, Inc / Kevin Rosenberg

License

LLGPL

Long Description

ptester is a portable testing framework based on Franz’s tester module

Source

ptester.asd.

Child Component

src.lisp (file).


2 Files

Files are sorted by type and then listed depth-first from the systems components trees.


2.1 Lisp


2.1.1 ptester/ptester.asd

Source

ptester.asd.

Parent Component

ptester (system).

ASDF Systems

ptester.

Packages

ptester-system.


2.1.2 ptester/src.lisp

Source

ptester.asd.

Parent Component

ptester (system).

Packages

ptester.

Public Interface
Internals

3 Packages

Packages are listed by definition order.


3.1 ptester

Source

src.lisp.

Use List

common-lisp.

Public Interface
Internals

3.2 ptester-system

Source

ptester.asd.

Use List
  • asdf/interface.
  • common-lisp.

4 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


4.1 Public Interface


4.1.1 Special variables

Special Variable: *break-on-test-failures*

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

Package

ptester.

Source

src.lisp.

Special Variable: *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.

Package

ptester.

Source

src.lisp.

Special Variable: *test-errors*

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

Package

ptester.

Source

src.lisp.

Special Variable: *test-successes*

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

Package

ptester.

Source

src.lisp.

Special Variable: *test-unexpected-failures*

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

Package

ptester.

Source

src.lisp.


4.1.2 Macros

Macro: test (expected-value test-form &key test multiple-values fail-info known-failure errorset reported-form wanted-message got-message)

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.

Package

ptester.

Source

src.lisp.

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

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.

Package

ptester.

Source

src.lisp.

Macro: test-no-error (form &key announce catch-breaks fail-info known-failure)

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.

Package

ptester.

Source

src.lisp.

Macro: 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.

Package

ptester.

Source

src.lisp.

Macro: 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.

Package

ptester.

Source

src.lisp.

Macro: with-tests ((&key name) &body body)
Package

ptester.

Source

src.lisp.


4.2 Internals


4.2.1 Special variables

Special Variable: *announce-test*
Package

ptester.

Source

src.lisp.

Special Variable: *warn-cookie*
Package

ptester.

Source

src.lisp.

Special Variable: if*-keyword-list
Package

ptester.

Source

src.lisp.


4.2.2 Macros

Macro: errorset (form)
Package

ptester.

Source

src.lisp.

Macro: if* (&rest args)
Package

ptester.

Source

src.lisp.

Macro: test-values (form &optional announce catch-breaks)
Package

ptester.

Source

src.lisp.

Macro: test-values-errorset (form &optional announce catch-breaks)
Package

ptester.

Source

src.lisp.


4.2.3 Ordinary functions

Function: gc-print-state ()
Package

ptester.

Source

src.lisp.

Function: (setf gc-print-state) ()
Package

ptester.

Source

src.lisp.

Function: test-check (&key predicate 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)
Package

ptester.

Source

src.lisp.


4.2.4 Generic functions

Generic Function: conditionp (thing)
Package

ptester.

Source

src.lisp.

Methods
Method: conditionp (thing)
Method: conditionp ((thing condition))

4.2.5 Conditions

Condition: simple-break
Package

ptester.

Source

src.lisp.

Direct superclasses
  • error.
  • simple-condition.

Appendix A Indexes


A.1 Concepts