The stefil+ Reference Manual

This is the stefil+ Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Feb 26 17:57:47 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

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


2.1 stefil+

Simple Test Framework in Lisp

Author

GrammaTech

License

Public Domain

Defsystem Dependency

asdf-package-system (system).

Dependency

stefil+/stefil+ (system).

Source

stefil+.asd.


2.2 stefil+/stefil+

Author

GrammaTech

License

Public Domain

Dependencies
  • gt/full (system).
  • metabang-bind (system).
  • stefil (system).
Source

stefil+.asd.


3 Files

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


3.1 Lisp


3.1.1 stefil+/stefil+.asd

Source

stefil+.asd.

Parent Component

stefil+ (system).

ASDF Systems

3.1.2 stefil+/stefil+/file-type.lisp

Source

stefil+.asd.

Parent Component

stefil+/stefil+ (system).

Packages

stefil+.

Public Interface
Internals

4 Packages

Packages are listed by definition order.


4.1 stefil+

Source

file-type.lisp.

Use List
  • gt/full.
  • metabang.bind.
Public Interface
Internals

5 Definitions

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


5.1 Public Interface


5.1.1 Special variables

Special Variable: *long-tests*

Control execution of slow tests.

Package

stefil+.

Source

file-type.lisp.

Special Variable: *success*

Hold success of the last ‘run-batch’ run.

Package

stefil+.

Source

file-type.lisp.

Special Variable: *time-threshold*

Time threshold for tests (in seconds).

Package

stefil+.

Source

file-type.lisp.


5.1.2 Macros

Macro: defroot (name)
Package

stefil+.

Source

file-type.lisp.

Macro: defsuite (name documentation &optional test-pre-check)

Define NAME with DOCUMENTATION.
Optional TEST-PRE-CHECK if present should be one of the following: :SILENT — silently skip this test suite
NIL ——- skip this test suite with the default warning Otherwise - test-pre-check will be invoked at runtime
return non-nil when the test suite should be run and nil otherwise.

Package

stefil+.

Source

file-type.lisp.

Macro: deftest (name args &body body)

Expands on STEFIL::DEFTEST in these ways:
- Accepts (<test-name> :LONG-RUNNING) in place of <test-name> for the name - When the test is executed, if the execution time (real time) is longer than *TIME-THRESHOLD* seconds, a warning is output.

Package

stefil+.

Source

file-type.lisp.

Macro: with-each-fixture ((&rest fixtures) &body body)

Run BODY with each of multiple fixtures.

Package

stefil+.

Source

file-type.lisp.

Macro: with-retries ((number &optional failure) &body body)

Try BODY NUMBER times. If no try returns then return FAILURE. Body is executed inside of an ‘iter’ form, so iteration forms may be present.

Package

stefil+.

Source

file-type.lisp.


5.1.3 Ordinary functions

Function: long-running-p (test)

Given the name of a test, returns true iff test has been flagged long-running.

Package

stefil+.

Source

file-type.lisp.

Function: run-batch (&optional test &rest args)

Run TESTS in ’batch’ mode, printing results as a string.

Package

stefil+.

Source

file-type.lisp.


5.2 Internals


5.2.1 Constants

Constant: +long-suite-suffix+

Suffix for version of suite which contains long running tests.

Package

stefil+.

Source

file-type.lisp.


5.2.2 Special variables

Special Variable: *root-suite*

Default suite in which ‘sel-suite*’ should define tests.

Package

stefil+.

Source

file-type.lisp.


5.2.3 Macros

Macro: check-time (test-name &body body)

If elapsed real time of test exceeds *time-threshold*, a warning
is output. In any case, this macro executes BODY and returns any resulting values.

Package

stefil+.

Source

file-type.lisp.


5.2.4 Ordinary functions

Function: find-long-running-suite (suite-name)

Determine the name of the long-running suite associated with the passed suite name. If the passed suite name ends with +long-suite-suffix+ it returns the argument.

Package

stefil+.

Source

file-type.lisp.

Function: mov-test (test-name new-parent-name &rest test-args)

Move a child test to a different parent.

Package

stefil+.

Source

file-type.lisp.

Function: run-child-tests-of (test)
Package

stefil+.

Source

file-type.lisp.


5.2.5 Generic functions

Generic Reader: test-exceeds-threshold-name (condition)
Package

stefil+.

Methods
Reader Method: test-exceeds-threshold-name ((condition test-exceeds-time-threshold))
Source

file-type.lisp.

Target Slot

name.

Generic Reader: test-exceeds-threshold-time (condition)
Package

stefil+.

Methods
Reader Method: test-exceeds-threshold-time ((condition test-exceeds-time-threshold))
Source

file-type.lisp.

Target Slot

time.


5.2.6 Conditions

Condition: test-exceeds-time-threshold
Package

stefil+.

Source

file-type.lisp.

Direct superclasses

simple-warning.

Direct methods
Direct slots
Slot: name
Initargs

:name

Readers

test-exceeds-threshold-name.

Writers

This slot is read-only.

Slot: time
Package

common-lisp.

Initargs

:time

Readers

test-exceeds-threshold-time.

Writers

This slot is read-only.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   C   D   F   G   L   M   R   T   W  
Index Entry  Section

C
check-time: Private macros

D
defroot: Public macros
defsuite: Public macros
deftest: Public macros

F
find-long-running-suite: Private ordinary functions
Function, find-long-running-suite: Private ordinary functions
Function, long-running-p: Public ordinary functions
Function, mov-test: Private ordinary functions
Function, run-batch: Public ordinary functions
Function, run-child-tests-of: Private ordinary functions

G
Generic Function, test-exceeds-threshold-name: Private generic functions
Generic Function, test-exceeds-threshold-time: Private generic functions

L
long-running-p: Public ordinary functions

M
Macro, check-time: Private macros
Macro, defroot: Public macros
Macro, defsuite: Public macros
Macro, deftest: Public macros
Macro, with-each-fixture: Public macros
Macro, with-retries: Public macros
Method, test-exceeds-threshold-name: Private generic functions
Method, test-exceeds-threshold-time: Private generic functions
mov-test: Private ordinary functions

R
run-batch: Public ordinary functions
run-child-tests-of: Private ordinary functions

T
test-exceeds-threshold-name: Private generic functions
test-exceeds-threshold-name: Private generic functions
test-exceeds-threshold-time: Private generic functions
test-exceeds-threshold-time: Private generic functions

W
with-each-fixture: Public macros
with-retries: Public macros