The checkl Reference Manual

This is the checkl Reference Manual, version 1.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Wed May 15 03:38:16 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

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


2.1 checkl

CheckL: Dynamic testing for Common Lisp

Author

Ryan Pavlik <>

License

LLGPL, BSD

Version

1.0

Dependency

marshal (system).

Source

checkl.asd.

Child Components

3 Files

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


3.1 Lisp


3.1.1 checkl/checkl.asd

Source

checkl.asd.

Parent Component

checkl (system).

ASDF Systems

checkl.


3.1.2 checkl/package.lisp

Source

checkl.asd.

Parent Component

checkl (system).

Packages

checkl.


3.1.3 checkl/checkl.lisp

Dependency

package.lisp (file).

Source

checkl.asd.

Parent Component

checkl (system).

Public Interface
Internals

4 Packages

Packages are listed by definition order.


4.1 checkl

Source

package.lisp.

Use List

common-lisp.

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 Macros

Macro: check ((&key name category output-p) &body body)

=> test-results

Run ‘BODY‘. Check resulting values against the last run using ‘CHECKL:RESULT-EQUALP‘, or store them if this is the first run. Sameness of the test is determined by comparing the body with ‘EQUALP‘, or by ‘NAME‘.

‘NAME‘ may be specified to name a test. If the test exists but is anonymous (i.e., ‘NAME‘ has not been specified), specifying ‘NAME‘ will name the test and it will no longer be anonymous.

‘CATEGORY‘ may be specified for running groups of tests.

If ‘OUTPUT-P‘ is ‘t‘, the results will be printed to ‘*standard-output*‘ as well as returned. This may be helpful if the results are too long to see in your emacs minibuffer.

Package

checkl.

Source

checkl.lisp.

Macro: check-output (&body body)

Use this within a ‘CHECK‘ block. Rebind ‘*standard-output*‘ and ‘*error-output*‘ and return a ‘CHECK‘-able result.

Package

checkl.

Source

checkl.lisp.

Macro: results (&rest values)

=> VALUES

This will evaluate each subform in order and call RESULT-TRANSLATE on the result. This is especially useful if subforms repeatedly modify and return the object, e.g. ‘(results (incf *x*) (incf *x*))‘.

If multiple values are returned, each value is mapped via RESULT-TRANSLATE and the result is returned as a list of the translated values.

Package

checkl.

Source

checkl.lisp.


5.1.2 Ordinary functions

Function: checkl-load (&optional filespec)

Load package test results from ‘FILESPEC‘

Package

checkl.

Source

checkl.lisp.

Function: checkl-store (&optional filespec)

Store package test results to ‘FILESPEC‘

Package

checkl.

Source

checkl.lisp.

Function: clear (&rest names)

Clear the test results from the tests ‘NAMES‘. For clearing anonymous test results, see ‘CLEAR-ANONYMOUS‘.

Package

checkl.

Source

checkl.lisp.

Function: clear-anonymous ()

Clear anonymous test results. For clearing named tests, see ‘CLEAR‘.

Package

checkl.

Source

checkl.lisp.

Function: run (&rest names)

=> test-results

Run tests named ‘NAMES‘, collecting their results.

Package

checkl.

Source

checkl.lisp.

Function: run-all (&optional category &rest categories)

=> test-results

Run all tests, optionally specifying categories.

Package

checkl.

Source

checkl.lisp.


5.1.3 Generic functions

Generic Function: result-equalp (o1 o2)

Generic function to compare test results ‘O1‘ to ‘O2‘. Defaults to ‘EQUALP‘.

Package

checkl.

Source

checkl.lisp.

Methods
Method: result-equalp (o1 o2)
Generic Function: result-translate (result)

RESULT-TRANSLATE is called on RESULT before calling
RESULT-EQUALP and before storing RESULT. This defaults to RESULT, but may be useful for converting more complex objects into simpler objects. For sequences and structures, COPY-SEQ and COPY-STRUCTURE are called. For STANDARD-OBJECT instances, (MS:UNMARSHAL (MS:MARSHAL OBJECT)) is called.

Package

checkl.

Source

checkl.lisp.

Methods
Method: result-translate ((result standard-object))
Method: result-translate ((result structure-object))
Method: result-translate ((result sequence))
Method: result-translate (result)

5.1.4 Standalone methods

Method: perform ((op load-op) (c tests))
Package

asdf/action.

Source

checkl.lisp.

Method: perform ((op load-op) (c test-values))
Package

asdf/action.

Source

checkl.lisp.


5.1.5 Classes

Class: test-values

An ASDF component for loading CheckL test values.

Package

checkl.

Source

checkl.lisp.

Direct superclasses

static-file.

Direct methods
Direct slots
Slot: package
Package

common-lisp.

Initargs

:package

Readers

test-values-package.

Writers

(setf test-values-package).

Class: tests

Load a file with CHECK or CHECK-FORMAL tests.

Package

checkl.

Source

checkl.lisp.

Direct superclasses

cl-source-file.

Direct methods

perform.


5.2 Internals


5.2.1 Special variables

Special Variable: *all-tests*
Package

checkl.

Source

checkl.lisp.

Special Variable: *definitions-only*
Package

checkl.

Source

checkl.lisp.


5.2.2 Macros

Macro: do-categories ((var tests) &body body)
Package

checkl.

Source

checkl.lisp.


5.2.3 Ordinary functions

Function: copy-package-tests (instance)
Package

checkl.

Source

checkl.lisp.

Function: current-tests ()
Package

checkl.

Source

checkl.lisp.

Function: ensure-test (test-name test-category test-body function)
Package

checkl.

Source

checkl.lisp.

Function: make-package-tests (&key results categories lambdas default-checkl-store)
Package

checkl.

Source

checkl.lisp.

Reader: package-tests-categories (instance)
Writer: (setf package-tests-categories) (instance)
Package

checkl.

Source

checkl.lisp.

Target Slot

categories.

Reader: package-tests-default-checkl-store (instance)
Writer: (setf package-tests-default-checkl-store) (instance)
Package

checkl.

Source

checkl.lisp.

Target Slot

default-checkl-store.

Reader: package-tests-lambdas (instance)
Writer: (setf package-tests-lambdas) (instance)
Package

checkl.

Source

checkl.lisp.

Target Slot

lambdas.

Function: package-tests-p (object)
Package

checkl.

Source

checkl.lisp.

Reader: package-tests-results (instance)
Writer: (setf package-tests-results) (instance)
Package

checkl.

Source

checkl.lisp.

Target Slot

results.

Function: verify-result (name result)
Package

checkl.

Source

checkl.lisp.


5.2.4 Generic functions

Generic Reader: result-error-index (condition)
Package

checkl.

Methods
Reader Method: result-error-index ((condition result-error))
Source

checkl.lisp.

Target Slot

result-index.

Generic Reader: result-error-last (condition)
Package

checkl.

Methods
Reader Method: result-error-last ((condition result-error))
Source

checkl.lisp.

Target Slot

last-value.

Generic Reader: result-error-value (condition)
Package

checkl.

Methods
Reader Method: result-error-value ((condition result-error))
Source

checkl.lisp.

Target Slot

result-value.

Generic Reader: test-values-package (object)
Package

checkl.

Methods
Reader Method: test-values-package ((test-values test-values))

automatically generated reader method

Source

checkl.lisp.

Target Slot

package.

Generic Writer: (setf test-values-package) (object)
Package

checkl.

Methods
Writer Method: (setf test-values-package) ((test-values test-values))

automatically generated writer method

Source

checkl.lisp.

Target Slot

package.


5.2.5 Conditions

Condition: result-error
Package

checkl.

Source

checkl.lisp.

Direct superclasses

error.

Direct methods
Direct slots
Slot: result-index
Initform

(quote nil)

Initargs

:result-index

Readers

result-error-index.

Writers

This slot is read-only.

Slot: result-value
Initform

(quote nil)

Initargs

:result-value

Readers

result-error-value.

Writers

This slot is read-only.

Slot: last-value
Initform

(quote nil)

Initargs

:last-value

Readers

result-error-last.

Writers

This slot is read-only.


5.2.6 Structures

Structure: package-tests
Package

checkl.

Source

checkl.lisp.

Direct superclasses

structure-object.

Direct slots
Slot: results
Initform

(make-hash-table :test (quote equalp))

Readers

package-tests-results.

Writers

(setf package-tests-results).

Slot: categories
Initform

(make-hash-table :test (quote equalp))

Readers

package-tests-categories.

Writers

(setf package-tests-categories).

Slot: lambdas
Initform

(make-hash-table :test (quote equalp))

Readers

package-tests-lambdas.

Writers

(setf package-tests-lambdas).

Slot: default-checkl-store
Readers

package-tests-default-checkl-store.

Writers

(setf package-tests-default-checkl-store).


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   (  
C   D   E   F   G   M   P   R   T   V  
Index Entry  Section

(
(setf package-tests-categories): Private ordinary functions
(setf package-tests-default-checkl-store): Private ordinary functions
(setf package-tests-lambdas): Private ordinary functions
(setf package-tests-results): Private ordinary functions
(setf test-values-package): Private generic functions
(setf test-values-package): Private generic functions

C
check: Public macros
check-output: Public macros
checkl-load: Public ordinary functions
checkl-store: Public ordinary functions
clear: Public ordinary functions
clear-anonymous: Public ordinary functions
copy-package-tests: Private ordinary functions
current-tests: Private ordinary functions

D
do-categories: Private macros

E
ensure-test: Private ordinary functions

F
Function, (setf package-tests-categories): Private ordinary functions
Function, (setf package-tests-default-checkl-store): Private ordinary functions
Function, (setf package-tests-lambdas): Private ordinary functions
Function, (setf package-tests-results): Private ordinary functions
Function, checkl-load: Public ordinary functions
Function, checkl-store: Public ordinary functions
Function, clear: Public ordinary functions
Function, clear-anonymous: Public ordinary functions
Function, copy-package-tests: Private ordinary functions
Function, current-tests: Private ordinary functions
Function, ensure-test: Private ordinary functions
Function, make-package-tests: Private ordinary functions
Function, package-tests-categories: Private ordinary functions
Function, package-tests-default-checkl-store: Private ordinary functions
Function, package-tests-lambdas: Private ordinary functions
Function, package-tests-p: Private ordinary functions
Function, package-tests-results: Private ordinary functions
Function, run: Public ordinary functions
Function, run-all: Public ordinary functions
Function, verify-result: Private ordinary functions

G
Generic Function, (setf test-values-package): Private generic functions
Generic Function, result-equalp: Public generic functions
Generic Function, result-error-index: Private generic functions
Generic Function, result-error-last: Private generic functions
Generic Function, result-error-value: Private generic functions
Generic Function, result-translate: Public generic functions
Generic Function, test-values-package: Private generic functions

M
Macro, check: Public macros
Macro, check-output: Public macros
Macro, do-categories: Private macros
Macro, results: Public macros
make-package-tests: Private ordinary functions
Method, (setf test-values-package): Private generic functions
Method, perform: Public standalone methods
Method, perform: Public standalone methods
Method, result-equalp: Public generic functions
Method, result-error-index: Private generic functions
Method, result-error-last: Private generic functions
Method, result-error-value: Private generic functions
Method, result-translate: Public generic functions
Method, result-translate: Public generic functions
Method, result-translate: Public generic functions
Method, result-translate: Public generic functions
Method, test-values-package: Private generic functions

P
package-tests-categories: Private ordinary functions
package-tests-default-checkl-store: Private ordinary functions
package-tests-lambdas: Private ordinary functions
package-tests-p: Private ordinary functions
package-tests-results: Private ordinary functions
perform: Public standalone methods
perform: Public standalone methods

R
result-equalp: Public generic functions
result-equalp: Public generic functions
result-error-index: Private generic functions
result-error-index: Private generic functions
result-error-last: Private generic functions
result-error-last: Private generic functions
result-error-value: Private generic functions
result-error-value: Private generic functions
result-translate: Public generic functions
result-translate: Public generic functions
result-translate: Public generic functions
result-translate: Public generic functions
result-translate: Public generic functions
results: Public macros
run: Public ordinary functions
run-all: Public ordinary functions

T
test-values-package: Private generic functions
test-values-package: Private generic functions

V
verify-result: Private ordinary functions