This is the lisp-unit2 Reference Manual, version 0.9.4, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 06:52:46 2024 GMT+0.
lisp-unit2/lisp-unit2.asd
lisp-unit2/package.lisp
lisp-unit2/assert-package.lisp
lisp-unit2/vars.lisp
lisp-unit2/collectors.lisp
lisp-unit2/asserts.lisp
lisp-unit2/lisp-unit.lisp
lisp-unit2/summarize.lisp
lisp-unit2/rational.lisp
lisp-unit2/floating-point.lisp
lisp-unit2/test-anything-protocol.lisp
lisp-unit2/interop.lisp
The main system appears first, followed by any subsystem dependency.
lisp-unit2
Common Lisp library that supports unit testing.
MIT
0.9.4
alexandria
(system).
cl-interpol
(system).
iterate
(system).
symbol-munger
(system).
package.lisp
(file).
assert-package.lisp
(file).
vars.lisp
(file).
collectors.lisp
(file).
asserts.lisp
(file).
lisp-unit.lisp
(file).
summarize.lisp
(file).
rational.lisp
(file).
floating-point.lisp
(file).
test-anything-protocol.lisp
(file).
interop.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
lisp-unit2/lisp-unit2.asd
lisp-unit2/package.lisp
lisp-unit2/assert-package.lisp
lisp-unit2/vars.lisp
lisp-unit2/collectors.lisp
lisp-unit2/asserts.lisp
lisp-unit2/lisp-unit.lisp
lisp-unit2/summarize.lisp
lisp-unit2/rational.lisp
lisp-unit2/floating-point.lisp
lisp-unit2/test-anything-protocol.lisp
lisp-unit2/interop.lisp
lisp-unit2/assert-package.lisp
package.lisp
(file).
lisp-unit2
(system).
lisp-unit2/vars.lisp
assert-package.lisp
(file).
lisp-unit2
(system).
*result*
(special variable).
*results*
(special variable).
*test-db*
(special variable).
*test-stream*
(special variable).
*unit-test*
(special variable).
all-tests-complete
(condition).
all-tests-start
(condition).
collect-test-results
(condition).
missing-test
(condition).
results
(reader method).
results
(reader method).
results
(reader method).
(setf results)
(writer method).
(setf results)
(writer method).
(setf results)
(writer method).
test-complete
(condition).
test-start
(condition).
unit-test
(reader method).
(setf unit-test)
(writer method).
*log-level*
(special variable).
*test-log-stream*
(special variable).
+statuses+
(special variable).
name
(reader method).
(setf name)
(writer method).
result
(reader method).
(setf result)
(writer method).
test-name
(reader method).
(setf test-name)
(writer method).
lisp-unit2/collectors.lisp
vars.lisp
(file).
lisp-unit2
(system).
%collect
(generic function).
%collect!
(macro).
%collect-new
(generic function).
%collect-new!
(macro).
%decollect
(generic function).
%decollect!
(macro).
head
(generic function).
(setf head)
(writer method).
len
(generic function).
(setf len)
(writer method).
list-collector
(class).
tail
(generic function).
(setf tail)
(writer method).
lisp-unit2/asserts.lisp
collectors.lisp
(file).
lisp-unit2
(system).
assert-char-equal
(macro).
assert-char-not-equal
(macro).
assert-char/=
(macro).
assert-char=
(macro).
assert-eq
(macro).
assert-eql
(macro).
assert-equal
(macro).
assert-equality
(macro).
assert-equalp
(macro).
assert-error
(macro).
assert-expands
(macro).
assert-false
(macro).
assert-no-error
(macro).
assert-no-signal
(macro).
assert-no-warning
(macro).
assert-prints
(macro).
assert-signal
(macro).
assert-string-equal
(macro).
assert-string-not-equal
(macro).
assert-string/=
(macro).
assert-string=
(macro).
assert-true
(macro).
assert-typep
(macro).
assert-warning
(macro).
assert/=
(macro).
assert=
(macro).
assertion-fail
(condition).
assertion-pass
(condition).
failure-result
(class).
logically-equal
(function).
set-equal
(function).
unit-test
(reader method).
unit-test
(reader method).
unit-test
(reader method).
(setf unit-test)
(writer method).
(setf unit-test)
(writer method).
(setf unit-test)
(writer method).
with-failure-debugging
(macro).
with-failure-debugging-context
(function).
%form-equal
(function).
actual
(reader method).
(setf actual)
(writer method).
assert-passes?
(generic function).
assertion
(reader method).
assertion
(reader method).
(setf assertion)
(writer method).
(setf assertion)
(writer method).
equal-result
(class).
error-result
(class).
expand-assert
(macro).
expand-extras
(macro).
expand-macro-form
(macro).
expand-output-form
(macro).
expand-signaled-handler
(function).
expected
(reader method).
(setf expected)
(writer method).
extras
(reader method).
(setf extras)
(writer method).
failure
(reader method).
(setf failure)
(writer method).
form
(reader method).
(setf form)
(writer method).
internal-assert
(function).
macro-result
(class).
output-result
(class).
record-failure
(generic function).
signal-result
(class).
test
(reader method).
(setf test)
(writer method).
lisp-unit2/lisp-unit.lisp
asserts.lisp
(file).
lisp-unit2
(system).
define-test
(macro).
empty
(reader method).
(setf empty)
(writer method).
errors
(reader method).
(setf errors)
(writer method).
failed
(reader method).
(setf failed)
(writer method).
get-tests
(function).
initialize-instance
(method).
list-tags
(function).
list-tests
(function).
missing
(reader method).
(setf missing)
(writer method).
passed
(reader method).
(setf passed)
(writer method).
print-object
(method).
print-object
(method).
print-object
(method).
remove-tags
(function).
remove-tests
(function).
rerun-failures
(generic function).
rerun-tests
(generic function).
reset-test-database
(function).
results
(reader method).
(setf results)
(writer method).
run-test
(generic function).
run-tests
(generic function).
test-code
(function).
test-documentation
(function).
test-result
(class).
test-results-db
(class).
undefine-test
(macro).
uninstall-test
(generic function).
unit-test
(reader method).
(setf unit-test)
(writer method).
unit-test
(class).
warnings
(reader method).
(setf warnings)
(writer method).
with-test-signals-muffled
(macro).
%compile
(generic function).
%dequote
(function).
%has?
(function).
%in-package
(function).
%log
(macro).
%log-around
(macro).
%run-test
(function).
%run-test-name
(function).
%tests
(reader method).
(setf %tests)
(writer method).
%to-test
(function).
%ts
(function).
%uninstall-name
(function).
all-warnings
(generic function).
args
(reader method).
(setf args)
(writer method).
code
(reader method).
(setf code)
(writer method).
combine-contexts
(function).
contexts
(reader method).
(setf contexts)
(writer method).
data
(reader method).
(setf data)
(writer method).
do-contexts
(function).
doc
(reader method).
(setf doc)
(writer method).
end-time
(reader method).
(setf end-time)
(writer method).
eval-package
(reader method).
(setf eval-package)
(writer method).
failed-assertions
(generic function).
install-test
(generic function).
internal-end-time
(reader method).
(setf internal-end-time)
(writer method).
internal-start-time
(reader method).
(setf internal-start-time)
(writer method).
most-recent-result
(reader method).
(setf most-recent-result)
(writer method).
name
(method).
name
(reader method).
(setf name)
(method).
(setf name)
(writer method).
name-index
(reader method).
(setf name-index)
(writer method).
null-tags-warning
(condition).
null-tags-warning-report
(function).
null-tests-warning
(condition).
null-tests-warning-report
(function).
package-index
(reader method).
(setf package-index)
(writer method).
package-names
(generic function).
passed-assertions
(generic function).
record-result
(generic function).
record-result-context
(function).
return-value
(reader method).
(setf return-value)
(writer method).
run-time
(generic function).
short-full-name
(function).
start-time
(reader method).
(setf start-time)
(writer method).
status
(function).
tag-index
(reader method).
(setf tag-index)
(writer method).
tags
(reader method).
(setf tags)
(writer method).
tags-package-name
(reader method).
test-database
(class).
test-name-error
(condition).
test-name-error-report
(function).
test-results-mixin
(class).
test-signals-muffled-context
(function).
test-thunk
(generic function).
test-thunk-name
(generic function).
tests
(generic function).
(setf tests)
(writer method).
tests-package-name
(reader method).
tests-with-status
(generic function).
unit-test-control-mixin
(class).
valid-test-name
(function).
lisp-unit2/summarize.lisp
lisp-unit.lisp
(file).
lisp-unit2
(system).
print-failure-summary
(function).
print-status-summary
(generic function).
print-summary
(function).
with-assertion-summary
(macro).
with-assertion-summary-context
(function).
with-summary
(macro).
with-summary-context
(function).
with-test-results
(macro).
with-test-results-context
(function).
%out
(function).
%print-result-summary
(generic function).
%print-summary
(generic function).
pprint-test-block
(macro).
lisp-unit2/rational.lisp
summarize.lisp
(file).
lisp-unit2
(system).
assert-rational-equal
(macro).
rational-equal
(generic function).
%seq-rational-equal
(function).
lisp-unit2/floating-point.lisp
rational.lisp
(file).
lisp-unit2
(system).
*epsilon*
(special variable).
*measure*
(special variable).
*significant-figures*
(special variable).
array-error
(function).
assert-float-equal
(macro).
assert-norm-equal
(macro).
assert-number-equal
(macro).
assert-numerical-equal
(macro).
assert-sigfig-equal
(macro).
complex-random
(function).
default-epsilon
(generic function).
float-equal
(generic function).
make-2d-list
(function).
make-random-2d-array
(function).
make-random-2d-list
(function).
make-random-list
(function).
norm
(generic function).
norm-equal
(generic function).
number-equal
(function).
numerical-equal
(generic function).
relative-error
(generic function).
relative-error-norm
(generic function).
sigfig-equal
(generic function).
sump
(generic function).
sumsq
(generic function).
%array-error
(function).
%array-indices
(function).
%complex-float-random
(function).
%complex-rational-random
(function).
%norm
(generic function).
%norm-equal
(function).
%normalize-float
(function).
%relative-error
(function).
%relative-error-norm
(function).
%seq-sigfig-equal
(function).
%sequence-equal
(function).
%sequence-error
(function).
%sigfig-equal
(function).
sequence-error
(function).
lisp-unit2/test-anything-protocol.lisp
floating-point.lisp
(file).
lisp-unit2
(system).
with-tap-context
(function).
with-tap-summary
(macro).
write-tap
(function).
write-tap-to-file
(function).
%write-tap-test-result
(function).
print-tap
(function).
lisp-unit2/interop.lisp
test-anything-protocol.lisp
(file).
lisp-unit2
(system).
+interop-test-result-contexts+
(special variable).
convert-test-result
(generic function).
convert-test-results
(generic function).
get-system-list
(function).
test-asdf-system-recursive
(generic function).
Packages are listed by definition order.
lisp-unit2
common-lisp
.
iterate
.
*epsilon*
(special variable).
*measure*
(special variable).
*result*
(special variable).
*results*
(special variable).
*significant-figures*
(special variable).
*test-db*
(special variable).
*test-stream*
(special variable).
*unit-test*
(special variable).
all-tests-complete
(condition).
all-tests-start
(condition).
array-error
(function).
assert-char-equal
(macro).
assert-char-not-equal
(macro).
assert-char/=
(macro).
assert-char=
(macro).
assert-eq
(macro).
assert-eql
(macro).
assert-equal
(macro).
assert-equality
(macro).
assert-equalp
(macro).
assert-error
(macro).
assert-expands
(macro).
assert-false
(macro).
assert-float-equal
(macro).
assert-no-error
(macro).
assert-no-signal
(macro).
assert-no-warning
(macro).
assert-norm-equal
(macro).
assert-number-equal
(macro).
assert-numerical-equal
(macro).
assert-prints
(macro).
assert-rational-equal
(macro).
assert-sigfig-equal
(macro).
assert-signal
(macro).
assert-string-equal
(macro).
assert-string-not-equal
(macro).
assert-string/=
(macro).
assert-string=
(macro).
assert-true
(macro).
assert-typep
(macro).
assert-warning
(macro).
assert/=
(macro).
assert=
(macro).
assertion-fail
(condition).
assertion-pass
(condition).
collect-test-results
(condition).
complex-random
(function).
default-epsilon
(generic function).
define-test
(macro).
empty
(generic reader).
(setf empty)
(generic writer).
errors
(generic reader).
(setf errors)
(generic writer).
failed
(generic reader).
(setf failed)
(generic writer).
failure-result
(class).
float-equal
(generic function).
get-tests
(function).
list-tags
(function).
list-tests
(function).
logically-equal
(function).
make-2d-list
(function).
make-random-2d-array
(function).
make-random-2d-list
(function).
make-random-list
(function).
missing
(generic reader).
(setf missing)
(generic writer).
missing-test
(condition).
norm
(generic function).
norm-equal
(generic function).
number-equal
(function).
numerical-equal
(generic function).
passed
(generic reader).
(setf passed)
(generic writer).
print-failure-summary
(function).
print-status-summary
(generic function).
print-summary
(function).
rational-equal
(generic function).
relative-error
(generic function).
relative-error-norm
(generic function).
remove-tags
(function).
remove-tests
(function).
rerun-failures
(generic function).
rerun-tests
(generic function).
reset-test-database
(function).
results
(generic reader).
(setf results)
(generic writer).
run-test
(generic function).
run-tests
(generic function).
set-equal
(function).
sigfig-equal
(generic function).
sump
(generic function).
sumsq
(generic function).
test-code
(function).
test-complete
(condition).
test-documentation
(function).
test-result
(class).
test-results-db
(class).
test-start
(condition).
undefine-test
(macro).
uninstall-test
(generic function).
unit-test
(generic reader).
(setf unit-test)
(generic writer).
unit-test
(class).
warnings
(generic reader).
(setf warnings)
(generic writer).
with-assertion-summary
(macro).
with-assertion-summary-context
(function).
with-failure-debugging
(macro).
with-failure-debugging-context
(function).
with-summary
(macro).
with-summary-context
(function).
with-tap-context
(function).
with-tap-summary
(macro).
with-test-results
(macro).
with-test-results-context
(function).
with-test-signals-muffled
(macro).
write-tap
(function).
write-tap-to-file
(function).
%array-error
(function).
%array-indices
(function).
%collect
(generic function).
%collect!
(macro).
%collect-new
(generic function).
%collect-new!
(macro).
%compile
(generic function).
%complex-float-random
(function).
%complex-rational-random
(function).
%decollect
(generic function).
%decollect!
(macro).
%dequote
(function).
%form-equal
(function).
%has?
(function).
%in-package
(function).
%log
(macro).
%log-around
(macro).
%norm
(generic function).
%norm-equal
(function).
%normalize-float
(function).
%out
(function).
%print-result-summary
(generic function).
%print-summary
(generic function).
%relative-error
(function).
%relative-error-norm
(function).
%run-test
(function).
%run-test-name
(function).
%seq-rational-equal
(function).
%seq-sigfig-equal
(function).
%sequence-equal
(function).
%sequence-error
(function).
%sigfig-equal
(function).
%tests
(generic reader).
(setf %tests)
(generic writer).
%to-test
(function).
%ts
(function).
%uninstall-name
(function).
%write-tap-test-result
(function).
*log-level*
(special variable).
*test-log-stream*
(special variable).
+interop-test-result-contexts+
(special variable).
+statuses+
(special variable).
actual
(generic reader).
(setf actual)
(generic writer).
all-warnings
(generic function).
args
(generic reader).
(setf args)
(generic writer).
assert-passes?
(generic function).
assertion
(generic reader).
(setf assertion)
(generic writer).
code
(generic reader).
(setf code)
(generic writer).
combine-contexts
(function).
contexts
(generic reader).
(setf contexts)
(generic writer).
convert-test-result
(generic function).
convert-test-results
(generic function).
data
(generic reader).
(setf data)
(generic writer).
do-contexts
(function).
doc
(generic reader).
(setf doc)
(generic writer).
end-time
(generic reader).
(setf end-time)
(generic writer).
equal-result
(class).
error-result
(class).
eval-package
(generic reader).
(setf eval-package)
(generic writer).
expand-assert
(macro).
expand-extras
(macro).
expand-macro-form
(macro).
expand-output-form
(macro).
expand-signaled-handler
(function).
expected
(generic reader).
(setf expected)
(generic writer).
extras
(generic reader).
(setf extras)
(generic writer).
failed-assertions
(generic function).
failure
(generic reader).
(setf failure)
(generic writer).
form
(generic reader).
(setf form)
(generic writer).
get-system-list
(function).
head
(generic function).
(setf head)
(generic writer).
install-test
(generic function).
internal-assert
(function).
internal-end-time
(generic reader).
(setf internal-end-time)
(generic writer).
internal-start-time
(generic reader).
(setf internal-start-time)
(generic writer).
len
(generic function).
(setf len)
(generic writer).
list-collector
(class).
macro-result
(class).
most-recent-result
(generic reader).
(setf most-recent-result)
(generic writer).
name
(generic function).
(setf name)
(generic function).
name-index
(generic reader).
(setf name-index)
(generic writer).
null-tags-warning
(condition).
null-tags-warning-report
(function).
null-tests-warning
(condition).
null-tests-warning-report
(function).
output-result
(class).
package-index
(generic reader).
(setf package-index)
(generic writer).
package-names
(generic function).
passed-assertions
(generic function).
pprint-test-block
(macro).
print-tap
(function).
record-failure
(generic function).
record-result
(generic function).
record-result-context
(function).
result
(generic reader).
(setf result)
(generic writer).
return-value
(generic reader).
(setf return-value)
(generic writer).
run-time
(generic function).
sequence-error
(function).
short-full-name
(function).
signal-result
(class).
start-time
(generic reader).
(setf start-time)
(generic writer).
status
(function).
tag-index
(generic reader).
(setf tag-index)
(generic writer).
tags
(generic reader).
(setf tags)
(generic writer).
tags-package-name
(generic reader).
tail
(generic function).
(setf tail)
(generic writer).
test
(generic reader).
(setf test)
(generic writer).
test-asdf-system-recursive
(generic function).
test-database
(class).
test-name
(generic reader).
(setf test-name)
(generic writer).
test-name-error
(condition).
test-name-error-report
(function).
test-results-mixin
(class).
test-signals-muffled-context
(function).
test-thunk
(generic function).
test-thunk-name
(generic function).
tests
(generic function).
(setf tests)
(generic writer).
tests-package-name
(generic reader).
tests-with-status
(generic function).
unit-test-control-mixin
(class).
valid-test-name
(function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Set the error epsilon if the defaults are not acceptable.
The current test result (bound in %run-test)
The current results database (bound in run-tests)
Default to 4 significant figures.
The unit test database is a list of tests and some hashtable indexes
The currently executing unit test (bound in %run-test, ie every test function)
Assert whether expected and form are CHAR-EQUAL.
Assert whether expected and form are CHAR-NOT-EQUAL.
Assert whether expected and form are CHAR/=.
Assert whether expected and form are CHAR=.
Assert whether expected and form are EQ.
Assert whether expected and form are EQL.
Assert whether expected and form are EQUAL.
Assert whether expected and form are equal according to test.
Assert whether expected and form are EQUALP.
Assert whether form signals condition.
Assert whether form expands to expansion.
Assert whether the form is false.
Assert whether form signals condition.
Assert whether printing the form generates the output.
Assert whether expected and form are STRING-EQUAL.
Assert whether expected and form are STRING-NOT-EQUAL.
Assert whether expected and form are STRING/=.
Assert whether expected and form are STRING=.
Assert whether the form is true.
Assert whether expected and form are TYPEP.
Assert whether expected and form are /=.
Assert whether expected and form are =.
Defines a new test object, test functions and installs the test
function in the test database
name: the name of the test and the test-function
contexts: a (lambda (fn)...) (or list of) that runs the fn in a dynamic
context
tags: symbols that can be used to group tests
If package is provided, the name and any provided tags are reinterned into
package before use. Keywords are left alone. This is useful because many
times tests and the functions they test, coexist (and always could in
lisp-unit v1, now that we create test functions, we dont want them
overwriting the original function).
Note: This should probably not be used (rather opting for
packaged::symbols), but will be useful when converting from lisp-unit
1->2. See also: run-tests, get-tests reintern-package
A context macro that invokes the debugger on failed assertions
see with-test-results-context
Return a list of the indices and error between the array elements.
Return a random complex number.
finds tests by names, tags, and package
if reintern-package is provided, reintern all symbols provided for tests
and tags into the reintern-package. Mostly provided for easing conversion
of lisp-unit1 test suites
Return a list of the tags
Return a list of all tests,
use get tests to find tests by package tag or name
Return a nested list with INITIAL-ELEMENT.
Return a 2D array of random numbers.
Return a nested list of random numbers.
Return a list of random numbers.
Return true if the numbers are equal within some epsilon, optionally requiring the types to be identical.
Remove individual tags or entire sets.
Remove individual tests or entire sets.
Return true if every element of list1 is an element of list2 and vice versa.
Returns the code stored for the test name.
Return the documentation for the test.
A context that invokes the debugger on failed assertions
A context that collects test-result-databases
if collection-place-setter (lambda (new) (setf collection-place new)) exists
anytime we get a new test result we set the place to the new collection
if summarize? at the end of the block we print the results summary for all tests this defaults to T if no collection-place-setter is provided and nil otherwise
Write the test results to ‘stream‘ in TAP format. Returns the test results.
write the test results to ‘path‘ in TAP format, overwriting ‘path‘. Returns pathname to the output file
Return the default epsilon for the value.
test-results-mixin
)) ¶automatically generated reader method
test-results-mixin
)) ¶automatically generated writer method
test-results-mixin
)) ¶automatically generated reader method
test-results-mixin
)) ¶automatically generated writer method
test-results-mixin
)) ¶automatically generated reader method
test-results-mixin
)) ¶automatically generated writer method
Return true if the floating point data is equal.
test-results-mixin
)) ¶automatically generated reader method
test-results-mixin
)) ¶automatically generated writer method
Return the element-wise norm of the data.
array
) &optional measure) ¶Return the entrywise norm of the array according to the measure.
vector
) &optional measure) ¶Return the norm of the vector according to the measure.
list
) &optional measure) ¶Return the norm of the list according to the measure.
Return true if the norm of the data is equal.
array
) (data2 array
) &optional epsilon measure) ¶Return true if the arrays are equal in length and the relative error norm is less than epsilon.
vector
) (data2 vector
) &optional epsilon measure) ¶Return true if the vectors are equal in length and the relative error norm is less than epsilon.
vector
) (data2 list
) &optional epsilon measure) ¶Return true if the vector and the list are equal in length and the relative error norm is less than epsilon.
list
) (data2 vector
) &optional epsilon measure) ¶Return true if the vector and the list are equal in length and the relative error norm is less than epsilon.
list
) (data2 list
) &optional epsilon measure) ¶Return true if the lists are equal in length and the relative error norm is less than epsilon.
Return true if the results are numerically equal according to :TEST.
array
) (result2 array
) &key test) ¶Return true if the arrays are equal in dimension and each element is equal according to :TEST.
vector
) (result2 list
) &key test) ¶Return true if every element of the list is equla to the corresponding element of the vector.
list
) (result2 vector
) &key test) ¶Return true if every element of the list is equal to the corresponding element of the vector.
vector
) (result2 vector
) &key test) ¶Return true if the vectors are equal in length and each element is equal according to :TEST.
list
) (result2 list
) &key test) ¶Return true if the lists are equal in length and each element is equal according to :TEST.
number
) (result2 number
) &key test) ¶Return true if the the numbers are equal according to :TEST.
test-results-mixin
)) ¶automatically generated reader method
test-results-mixin
)) ¶automatically generated writer method
test-results-db
) (status list
)) ¶test-results-db
) (s symbol
)) ¶test-result
) (s symbol
)) ¶Return true if the rational data is equal.
array
) (data2 array
)) ¶Return true if the arrays are equal in dimension and element-wise equal.
vector
) (data2 vector
)) ¶Return true if the vectors are equal in length and element-wise equal.
vector
) (data2 list
)) ¶Return true if the vector and the list are equal in length and element-wise equal.
list
) (data2 vector
)) ¶Return true if the vector and the list are equal in length and element-wise equal.
list
) (data2 list
)) ¶Return true if the lists are equal in length and element-wise equal.
complex
) (data2 complex
)) ¶Return true if the complex parts are rational and equal.
rational
) (data2 rational
)) ¶Return true if the rational numbers are equal.
Return the relative-error between the 2 quantities.
complex
) (approximate complex
)) ¶Return the relative error of the complex numbers.
complex
) (approximate float
)) ¶Return the relative error between the float and complex number.
float
) (approximate complex
)) ¶Return the relative error between the float and complex number.
float
) (approximate float
)) ¶Return the error delta between the exact and approximate floating point value.
Return the relative error norm
array
) (approximate vector
) &optional measure) ¶Return the relative error norm of the arrays.
vector
) (approximate vector
) &optional measure) ¶Return the relative error norm of the vectors.
vector
) (approximate list
) &optional measure) ¶Return the relative error norm of the list and the vector.
list
) (approximate vector
) &optional measure) ¶Return the relative error norm of the list and the vector.
list
) (approximate list
) &optional measure) ¶Return the relative error norm of the lists.
reruns failed tests
list
) &key status) ¶test-results-db
) &key status) ¶Rerun all tests from a given run (returns new results)
list
)) ¶test-results-db
)) ¶test-results-db
)) ¶automatically generated reader method
collect-test-results
)) ¶all-tests-complete
)) ¶all-tests-start
)) ¶test-results-db
)) ¶automatically generated writer method
collect-test-results
)) ¶all-tests-complete
)) ¶all-tests-start
)) ¶Run the specified tests.
We run all the listed tests, and all tests tagged with tags. If both test
and tags are nil (the default), then we run all tests in
package (defaulting to *package*)
name is the name of the test run. Generally expected to be the name of the system
being tested. Can be defaulted with the name parameter of with-summary as well.
can also be defaulted with.
reintern-package: when looking up tests, first reintern all tests and tags
in this package. In general this should probably not be used, but is provided
for convenience in transitioning from lisp-unit 1 to 2 (see: define-test package)
test-contexts is a list of contexts that will be applied around
each individual test
run-contexts is a list of contexts that will be applied around the entire
suite (around signals)
exclude-tests, exclude-tags: tests / tags to remove from the
run. explicit inclusion overrides, explicit exclusion, overrides
implicit inclusion
EG: (define-test test-takes-forever (manual stuff) ...)
(find-test :tags ’stuff :exclude-tags ’manual)
will not find test-takes-forever
(find-test :tags ’(stuff manual) :exclude-tags ’manual)
(find-test :tests ’test-takes-forever :exclude-tags ’manual)
both will find test-takes-forever
Return true if the data have equal significant figures.
array
) (data2 array
) &optional significant-figures) ¶Return true if the arrays are equal in length and the element-wise comparison is equal to significant figures.
vector
) (data2 vector
) &optional significant-figures) ¶Return true if the vectors are equal in length and the element-wise comparison is equal to significant figures.
list
) (data2 vector
) &optional significant-figures) ¶Return true if the list and the vector are equal in length and the element-wise comparison is equal to significant figures.
vector
) (data2 list
) &optional significant-figures) ¶Return true if the vector and the list are equal in length and the element-wise comparison is equal to significant figures.
list
) (data2 list
) &optional significant-figures) ¶Return true if the lists are equal in length and the element-wise comparison is equal to significant figures.
float
) (data2 float
) &optional significant-figures) ¶Return true if the floating point numbers have equal significant figures.
Return the scaling parameter and the sum of the powers of p of the ~ data.
array
) (p real
)) ¶Return the scaling parameter and the sum of the powers of p of the ~ array.
vector
) (p real
)) ¶Return the scaling parameter and the sum of the powers of p of the ~ vector.
list
) (p real
)) ¶Return the scaling parameter and the sum of the powers of p of the ~ data.
Return the scaling parameter and the sum of the squares of the ~ data.
array
)) ¶Return the scaling parameter and the sum of the squares of the ~ array.
vector
)) ¶Return the scaling parameter and the sum of the squares of the ~ vector.
list
)) ¶Return the scaling parameter and the sum of the squares of the ~ list.
Uninstalls a previously defined unit test
symbol
)) ¶test-result
)) ¶automatically generated reader method
failure-result
)) ¶automatically generated reader method
assertion-fail
)) ¶assertion-pass
)) ¶test-start
)) ¶test-result
)) ¶automatically generated writer method
failure-result
)) ¶automatically generated writer method
assertion-fail
)) ¶assertion-pass
)) ¶test-start
)) ¶test-results-mixin
)) ¶automatically generated reader method
test-results-mixin
)) ¶automatically generated writer method
test-results-db
) &key &allow-other-keys) ¶test-results-db
) stream) ¶Print the summary counts with the object.
test-result
) s) ¶Print the auto-print-items for this instance.
Signaled when a test run is finished.
Signaled when a single test starts.
condition
.
(quote nil)
:results
condition
.
(quote lisp-unit2:*unit-test*)
:unit-test
(quote nil)
:assertion
(quote nil)
:failure
Signaled that with-test-results should collect this test-result-database
condition
.
(quote nil)
:results
Signaled when a single test is finished.
warning
.
(quote nil)
:test-name
Signaled when a single test is finished.
condition
.
(quote nil)
:result
Signaled when a single test starts.
condition
.
(quote nil)
:unit-test
Failure details of the assertion.
lisp-unit2:*unit-test*
:unit-test
:actual
:expected
:extras
Store the results of the tests for further evaluation.
%print-result-summary
.
%print-summary
.
all-warnings
.
(setf args)
.
args
.
failed-assertions
.
initialize-instance
.
(setf name)
.
name
.
package-names
.
passed-assertions
.
print-object
.
print-status-summary
.
print-status-summary
.
record-result
.
rerun-failures
.
rerun-tests
.
(setf results)
.
results
.
(setf tests)
.
tests
.
tests-with-status
.
:name
:tests
:results
Organize the unit test documentation and code.
:most-recent-result
:eval-package
List of statuses in order of priority for categorizing test runs
Expand the assertion to the internal format.
Expand extra forms.
Expand the macro form once.
Capture the output of the form in a string.
Return a list of the indices, values and error of the elements that are not equal.
Recursively calculate the indices from the row major index.
Return a random complex float number.
Return a random complex rational number.
Descend into the forms checking for equality.
The first unequal part is the second value
Return true if the relative error norm is less than epsilon.
Return the normalized floating point number and exponent.
Return the relative error of the numbers.
Return the relative error norm of the sequences.
This should only be called from run-test-name, which everyone else should call This ensures our test name is easily in the inspector and the redefining a test then retrying calls the new test body
Return true if the sequences are equal length and at each position the corresponding elements are equal.
Return true if the element-wise comparison is equal to the specified significant figures.
Return true if the sequences are equal in length and each element is equal according to :TEST.
Return a sequence of the indice and error between the sequences.
Return true if the floating point numbers have equal significant figures.
Coerces its argument to a unit-test argument
always look up by name so that rerunning a suite after uninstalling a test behaves appropriately
returns a date as {y}{mon}{d}-{h}{min}{s}, defaults to get-universal-time
intended for use in datestamping filenames
Output a single test, taking care to ensure the indentation level is the same before and after invocation.
Takes a list of nils and contexts and combines them into a single context (or null of no contexts were provided)
runs the body-fn inside of contexts, the last context will be the outermost all nils in contexts are ignored
Perform the assertion and record the results.
Write the null-tags-warning to the stream.
Write the null-tests-warning to the stream.
Alias for write-tap for backwards and forwards consistency
as we are finishing a test (ie: it has the right status) record the result
Return a sequence of the indice and error between the sequence elements.
Write the test-name-error to the stream.
Signal a type-error if the test name is not a symbol.
null
)) ¶list-collector
)) ¶null
) &key test key) ¶list-collector
) &key test key) ¶null
) &key test key) ¶list-collector
) &key test key) ¶Return the norm of the data according to measure.
vector
) (measure (eql :infinity)
)) ¶Return the infinity, or maximum, norm of the vector.
list
) (measure (eql :infinity)
)) ¶Return the infinity, or maximum, norm of the list.
vector
) (measure integer
)) ¶Return the Euclidean norm of the vector.
list
) (measure integer
)) ¶Return the Euclidean norm of the list.
vector
) (measure (eql 2)
)) ¶Return the Euclidean norm of the vector.
list
) (measure (eql 2)
)) ¶Return the Euclidean norm of the list.
vector
) (measure (eql 1)
)) ¶Return the Taxicab norm of the vector.
list
) (measure (eql 1)
)) ¶Return the Taxicab norm of the list.
test-results-db
)) ¶Print a summary of all results to the stream.
vector
)) ¶list
)) ¶test-results-db
)) ¶test-result
)) ¶failure-result
)) ¶failure-result
)) ¶error-result
)) ¶macro-result
)) ¶output-result
)) ¶warning
)) ¶error
)) ¶test-database
)) ¶automatically generated reader method
test-database
)) ¶automatically generated writer method
failure-result
)) ¶automatically generated reader method
failure-result
)) ¶automatically generated writer method
null
)) ¶test-result
)) ¶test-results-db
)) ¶test-results-db
)) ¶automatically generated reader method
args
.
test-results-db
)) ¶automatically generated writer method
args
.
Return the result of the assertion.
assertion-fail
)) ¶assertion-fail
)) ¶assertion-pass
)) ¶assertion-pass
)) ¶unit-test-control-mixin
)) ¶unit-test-control-mixin
)) ¶A function that accepts a test thunk and executes
with a given context (eg: database-connects, html-collectors,
http-context etc)
Convert the test results from a given test system to lisp-unit2:test-results-db
Convert the test results from a given test system to lisp-unit2:test-results-db
unit-test-control-mixin
)) ¶unit-test-control-mixin
)) ¶Shared data so the context
data
.
test-results-mixin
)) ¶automatically generated reader method
test-results-mixin
)) ¶automatically generated writer method
failure-result
)) ¶automatically generated reader method
failure-result
)) ¶automatically generated writer method
failure-result
)) ¶automatically generated reader method
failure-result
)) ¶automatically generated writer method
null
)) ¶test-result
)) ¶test-results-db
)) ¶assertion-fail
)) ¶assertion-fail
)) ¶failure-result
)) ¶automatically generated reader method
form
.
failure-result
)) ¶automatically generated writer method
form
.
list-collector
)) ¶automatically generated reader method
head
.
list-collector
)) ¶automatically generated writer method
head
.
Installs a unit test, generally only called from define-test
test-results-mixin
)) ¶automatically generated reader method
test-results-mixin
)) ¶automatically generated writer method
test-results-mixin
)) ¶automatically generated reader method
test-results-mixin
)) ¶automatically generated writer method
list-collector
)) ¶automatically generated reader method
len
.
list-collector
)) ¶automatically generated writer method
len
.
test-results-db
)) ¶unit-test
)) ¶automatically generated reader method
name
.
all-tests-complete
)) ¶test-results-db
)) ¶unit-test
)) ¶automatically generated writer method
name
.
all-tests-complete
)) ¶test-database
)) ¶automatically generated reader method
test-database
)) ¶automatically generated writer method
test-database
)) ¶automatically generated reader method
test-database
)) ¶automatically generated writer method
test-results-db
)) ¶null
)) ¶test-result
)) ¶test-results-db
)) ¶Record the details of the failure.
test-result
) (db test-results-db
)) ¶test-complete
)) ¶test-complete
)) ¶test-result
)) ¶automatically generated reader method
test-result
)) ¶automatically generated writer method
test-results-mixin
)) ¶test-results-mixin
)) ¶automatically generated reader method
test-results-mixin
)) ¶automatically generated writer method
test-database
)) ¶automatically generated reader method
test-database
)) ¶automatically generated writer method
null-tags-warning
)) ¶name
.
list-collector
)) ¶automatically generated reader method
tail
.
list-collector
)) ¶automatically generated writer method
tail
.
failure-result
)) ¶automatically generated reader method
test
.
failure-result
)) ¶automatically generated writer method
test
.
missing-test
)) ¶missing-test
)) ¶symbol
)) ¶test-results-db
)) ¶automatically generated reader method
test-database
)) ¶test-results-db
)) ¶automatically generated writer method
null-tests-warning
)) ¶name
.
Retrieve all tests with a given status from the database
list
) status) ¶test-results-db
) status) ¶simple-warning
.
:name
This slot is read-only.
simple-warning
.
:name
This slot is read-only.
The test name error is a type error.
type-error
.
Initarg | Value |
---|---|
:expected-type | (quote symbol) |
Result of a failed equal assertion.
Result of a failed error assertion.
Result of a failed macro expansion assertion.
Result of a failed output assertion.
Result of a failed warning assertion.
:%tests
(make-hash-table)
:name-index
(make-hash-table)
:package-index
(make-hash-table)
:tag-index
(setf empty)
.
empty
.
(setf end-time)
.
end-time
.
(setf errors)
.
errors
.
(setf failed)
.
failed
.
(setf internal-end-time)
.
internal-end-time
.
(setf internal-start-time)
.
internal-start-time
.
(setf missing)
.
missing
.
(setf passed)
.
passed
.
run-time
.
(setf start-time)
.
start-time
.
(setf warnings)
.
warnings
.
(get-universal-time)
:start-time
(get-internal-real-time)
:internal-start-time
:end-time
:internal-end-time
Helps commonize test construction by providing a shared data and dynamic context
A function that accepts a test thunk and executes
with a given context (eg: database-connects, html-collectors,
http-context etc)
:contexts
Jump to: | %
(
A C D E F G H I L M N P R S T U V W |
---|
Jump to: | %
(
A C D E F G H I L M N P R S T U V W |
---|
Jump to: | %
*
+
A C D E F H I L M N P R S T U W |
---|
Jump to: | %
*
+
A C D E F H I L M N P R S T U W |
---|
Jump to: | A C E F I L M N O P R S T U V |
---|
Jump to: | A C E F I L M N O P R S T U V |
---|