Next: Introduction, Previous: (dir), Up: (dir) [Contents][Index]
This is the checkl Reference Manual, version 1.0, generated automatically by Declt version 3.0 "Montgomery Scott" on Tue Dec 22 11:59:27 2020 GMT+0.
• Introduction | What checkl is all about | |
• Systems | The systems documentation | |
• Files | The files documentation | |
• Packages | The packages documentation | |
• Definitions | The symbols documentation | |
• Indexes | Concepts, functions, variables and data types |
Why write programs in Common Lisp but tests like Java?
My workflow for writing Common Lisp tends to be like this:
Testing is already inherent in this process, all we need is a little bit of Common Lisp magic to take advantage of it. Thus, CheckL:
(defun foo ()
(+ 1 1))
(check () (foo)) ;; => 2
(defun foo ()
(+ 1 2))
(check () (foo))
|
v
Result 0 has changed: 3
Previous result: 2
[Condition of type CHECKL::RESULT-ERROR]
Restarts:
0: [USE-NEW-VALUE] The new value is correct, use it from now on.
1: [SKIP-TEST] Skip this, leaving the old value, but continue testing
2: [RETRY] Retry SLIME interactive evaluation request.
3: [*ABORT] Return to SLIME's top level.
4: [TERMINATE-THREAD] Terminate this thread (#<THREAD "worker" RUNNING {100586AB13}>)
See the full documentation for more details!
Next: Files, Previous: Introduction, Up: Top [Contents][Index]
The main system appears first, followed by any subsystem dependency.
• The checkl system |
Ryan Pavlik <rpavlik@gmail.com>
LLGPL, BSD
CheckL: Dynamic testing for Common Lisp
1.0
marshal
checkl.asd (file)
Files are sorted by type and then listed depth-first from the systems components trees.
• Lisp files |
• The checkl.asd file | ||
• The checkl/package.lisp file | ||
• The checkl/checkl.lisp file |
Next: The checkl/package․lisp file, Previous: Lisp files, Up: Lisp files [Contents][Index]
checkl.asd
checkl (system)
Next: The checkl/checkl․lisp file, Previous: The checkl․asd file, Up: Lisp files [Contents][Index]
Previous: The checkl/package․lisp file, Up: Lisp files [Contents][Index]
package.lisp (file)
checkl (system)
checkl.lisp
Next: Definitions, Previous: Files, Up: Top [Contents][Index]
Packages are listed by definition order.
• The checkl package |
package.lisp (file)
common-lisp
Definitions are sorted by export status, category, package, and then by lexicographic order.
• Exported definitions | ||
• Internal definitions |
Next: Internal definitions, Previous: Definitions, Up: Definitions [Contents][Index]
• Exported macros | ||
• Exported functions | ||
• Exported generic functions | ||
• Exported classes |
Next: Exported functions, Previous: Exported definitions, Up: Exported definitions [Contents][Index]
=> 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.
checkl.lisp (file)
Use this within a ‘CHECK‘ block. Rebind ‘*standard-output*‘ and ‘*error-output*‘ and return a ‘CHECK‘-able result.
checkl.lisp (file)
=> 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.
checkl.lisp (file)
Next: Exported generic functions, Previous: Exported macros, Up: Exported definitions [Contents][Index]
Load package test results from ‘FILESPEC‘
checkl.lisp (file)
Store package test results to ‘FILESPEC‘
checkl.lisp (file)
Clear the test results from the tests ‘NAMES‘. For clearing anonymous test results, see ‘CLEAR-ANONYMOUS‘.
checkl.lisp (file)
Clear anonymous test results. For clearing named tests, see ‘CLEAR‘.
checkl.lisp (file)
=> test-results
Run tests named ‘NAMES‘, collecting their results.
checkl.lisp (file)
=> test-results
Run all tests, optionally specifying categories.
checkl.lisp (file)
Next: Exported classes, Previous: Exported functions, Up: Exported definitions [Contents][Index]
Generic function to compare test results ‘O1‘ to ‘O2‘. Defaults to ‘EQUALP‘.
checkl.lisp (file)
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.
checkl.lisp (file)
Previous: Exported generic functions, Up: Exported definitions [Contents][Index]
An ASDF component for loading CheckL test values.
checkl.lisp (file)
static-file (class)
:package
test-values-package (generic function)
(setf test-values-package) (generic function)
Load a file with CHECK or CHECK-FORMAL tests.
checkl.lisp (file)
cl-source-file (class)
perform (method)
Previous: Exported definitions, Up: Definitions [Contents][Index]
• Internal special variables | ||
• Internal macros | ||
• Internal functions | ||
• Internal generic functions | ||
• Internal conditions | ||
• Internal structures |
Next: Internal macros, Previous: Internal definitions, Up: Internal definitions [Contents][Index]
checkl.lisp (file)
checkl.lisp (file)
Next: Internal functions, Previous: Internal special variables, Up: Internal definitions [Contents][Index]
checkl.lisp (file)
Next: Internal generic functions, Previous: Internal macros, Up: Internal definitions [Contents][Index]
checkl.lisp (file)
checkl.lisp (file)
checkl.lisp (file)
checkl.lisp (file)
checkl.lisp (file)
checkl.lisp (file)
checkl.lisp (file)
checkl.lisp (file)
checkl.lisp (file)
checkl.lisp (file)
Next: Internal conditions, Previous: Internal functions, Up: Internal definitions [Contents][Index]
checkl.lisp (file)
checkl.lisp (file)
checkl.lisp (file)
automatically generated reader method
checkl.lisp (file)
automatically generated writer method
checkl.lisp (file)
Next: Internal structures, Previous: Internal generic functions, Up: Internal definitions [Contents][Index]
checkl.lisp (file)
error (condition)
:result-index
(quote nil)
result-error-index (generic function)
:result-value
(quote nil)
result-error-value (generic function)
:last-value
(quote nil)
result-error-last (generic function)
Previous: Internal conditions, Up: Internal definitions [Contents][Index]
checkl.lisp (file)
structure-object (structure)
(make-hash-table :test (quote equalp))
package-tests-results (function)
(setf package-tests-results) (function)
(make-hash-table :test (quote equalp))
package-tests-categories (function)
(setf package-tests-categories) (function)
(make-hash-table :test (quote equalp))
package-tests-lambdas (function)
(setf package-tests-lambdas) (function)
package-tests-default-checkl-store (function)
(setf package-tests-default-checkl-store) (function)
Previous: Definitions, Up: Top [Contents][Index]
• Concept index | ||
• Function index | ||
• Variable index | ||
• Data type index |
Next: Function index, Previous: Indexes, Up: Indexes [Contents][Index]
Jump to: | C F L |
---|
Jump to: | C F L |
---|
Next: Variable index, Previous: Concept index, Up: Indexes [Contents][Index]
Jump to: | (
C D E F G M P R T V |
---|
Jump to: | (
C D E F G M P R T V |
---|
Next: Data type index, Previous: Function index, Up: Indexes [Contents][Index]
Jump to: | *
C D L P R S |
---|
Jump to: | *
C D L P R S |
---|
Previous: Variable index, Up: Indexes [Contents][Index]
Jump to: | C P R S T |
---|
Jump to: | C P R S T |
---|