This is the clunit Reference Manual, version 0.2.3, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 05:43:21 2024 GMT+0.
clunit/clunit.asd
clunit/src/package.lisp
clunit/src/specials.lisp
clunit/src/classes/assertion-conditions.lisp
clunit/src/classes/clunit-report.lisp
clunit/src/classes/clunit-test-case.lisp
clunit/src/classes/clunit-test-suite.lisp
clunit/src/classes/clunit-test-report.lisp
clunit/src/functions/assertion-functions.lisp
clunit/src/functions/generic-functions.lisp
clunit/src/functions/test-case-functions.lisp
clunit/src/functions/test-suite-functions.lisp
clunit/src/functions/rerun-failed-tests.lisp
clunit/src/functions/progress-report-functions.lisp
clunit/src/report-formats/report-format-default.lisp
clunit/src/report-formats/report-format-tap.lisp
clunit/src/report-formats/print-object.lisp
clunit/src/macros/utility-macros.lisp
clunit/src/macros/assertion-macros.lisp
clunit/src/macros/deffixture.lisp
clunit/src/macros/defsuite.lisp
clunit/src/macros/deftest.lisp
The main system appears first, followed by any subsystem dependency.
clunit
CLUnit is a Common Lisp unit testing framework.
Tapiwa Gutu <tgutu@ml.sun.ac.za>
BSD
CLUnit is a Common Lisp unit testing framework. It is designed to be easy to use so that you can quickly start testing.
CLUnit provides a rich set of features aimed at improving your unit testing experience:
* Multiple inheritance for test suites allows you to group tests into hierarchies.
* Composes the test results of each test run into a single report.
* Allows redefinition of inline functions and macros without having to redefine your tests.
* Supports composable test suite fixtures.
* Allows for an interactive testing process which gives you access to the test environment.
* Provides visual feedback of the unit test progress.
* Extensible test reporting. Builtin support for default reporting and TAP output.
0.2.3
src
(module).
Modules are listed depth-first from the system components tree.
clunit/src
clunit
(system).
package.lisp
(file).
specials.lisp
(file).
classes
(module).
functions
(module).
report-formats
(module).
macros
(module).
clunit/src/classes
specials.lisp
(file).
src
(module).
assertion-conditions.lisp
(file).
clunit-report.lisp
(file).
clunit-test-case.lisp
(file).
clunit-test-suite.lisp
(file).
clunit-test-report.lisp
(file).
clunit/src/functions
classes
(module).
src
(module).
assertion-functions.lisp
(file).
generic-functions.lisp
(file).
test-case-functions.lisp
(file).
test-suite-functions.lisp
(file).
rerun-failed-tests.lisp
(file).
progress-report-functions.lisp
(file).
clunit/src/report-formats
functions
(module).
src
(module).
report-format-default.lisp
(file).
report-format-tap.lisp
(file).
print-object.lisp
(file).
clunit/src/macros
report-formats
(module).
src
(module).
utility-macros.lisp
(file).
assertion-macros.lisp
(file).
deffixture.lisp
(file).
defsuite.lisp
(file).
deftest.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
clunit/clunit.asd
clunit/src/package.lisp
clunit/src/specials.lisp
clunit/src/classes/assertion-conditions.lisp
clunit/src/classes/clunit-report.lisp
clunit/src/classes/clunit-test-case.lisp
clunit/src/classes/clunit-test-suite.lisp
clunit/src/classes/clunit-test-report.lisp
clunit/src/functions/assertion-functions.lisp
clunit/src/functions/generic-functions.lisp
clunit/src/functions/test-case-functions.lisp
clunit/src/functions/test-suite-functions.lisp
clunit/src/functions/rerun-failed-tests.lisp
clunit/src/functions/progress-report-functions.lisp
clunit/src/report-formats/report-format-default.lisp
clunit/src/report-formats/report-format-tap.lisp
clunit/src/report-formats/print-object.lisp
clunit/src/macros/utility-macros.lisp
clunit/src/macros/assertion-macros.lisp
clunit/src/macros/deffixture.lisp
clunit/src/macros/defsuite.lisp
clunit/src/macros/deftest.lisp
clunit/src/specials.lisp
package.lisp
(file).
src
(module).
*clunit-equality-test*
(special variable).
*clunit-report-format*
(special variable).
*clunit-report*
(special variable).
*clunit-test-report*
(special variable).
*last-clunit-report*
(special variable).
*queued-test-reports*
(special variable).
*report-progress*
(special variable).
*stop-on-fail*
(special variable).
*suite-name*
(special variable).
*tab-width*
(special variable).
*test-case-hashtable*
(special variable).
*test-name*
(special variable).
*test-suite-hashtable*
(special variable).
*use-debugger*
(special variable).
clunit/src/classes/assertion-conditions.lisp
classes
(module).
assertion-condition
(condition).
assertion-error
(condition).
assertion-fail-forced
(condition).
assertion-failed
(condition).
assertion-passed
(condition).
clunit/src/classes/clunit-report.lisp
classes
(module).
clunit-report
(class).
test-reports
(reader method).
clunit/src/classes/clunit-test-case.lisp
classes
(module).
clunit-test-case
(class).
clunit/src/classes/clunit-test-suite.lisp
classes
(module).
clunit-test-suite
(class).
clunit/src/classes/clunit-test-report.lisp
classes
(module).
clunit-test-report
(class).
test-report-name
(reader method).
test-report-passed-p
(reader method).
clunit/src/functions/assertion-functions.lisp
functions
(module).
handle-assertion
(function).
handle-error
(function).
signal-assertion
(function).
clunit/src/functions/generic-functions.lisp
functions
(module).
expand-fixture
(generic function).
print-format
(generic function).
clunit/src/functions/test-case-functions.lisp
functions
(module).
defined-test-p
(function).
get-defined-tests
(function).
run-test
(function).
delete-test-case
(function).
execute-test-case
(function).
get-test-case
(function).
(setf get-test-case)
(function).
process-queued-tests
(function).
queue-test-case
(function).
skip-test-case
(function).
test-case-execution-action
(function).
clunit/src/functions/test-suite-functions.lisp
functions
(module).
defined-suite-p
(function).
get-child-suites
(function).
get-child-tests
(function).
get-defined-suites
(function).
run-suite
(function).
delete-test-suite
(function).
execute-test-suite
(function).
get-test-suite
(function).
(setf get-test-suite)
(function).
clunit/src/functions/rerun-failed-tests.lisp
functions
(module).
rerun-failed-tests
(function).
clunit/src/functions/progress-report-functions.lisp
functions
(module).
report-assertion-progress
(function).
report-suite-progress
(function).
report-test-progress
(function).
clunit/src/report-formats/report-format-default.lisp
report-formats
(module).
print-format
(method).
print-format
(method).
print-format
(method).
print-format
(method).
print-format
(method).
clunit/src/report-formats/report-format-tap.lisp
report-formats
(module).
*tap-test-num*
(special variable).
print-format
(method).
print-format
(method).
print-format
(method).
print-format
(method).
print-format
(method).
clunit/src/report-formats/print-object.lisp
report-formats
(module).
print-object
(method).
print-object
(method).
print-object
(method).
clunit/src/macros/utility-macros.lisp
macros
(module).
with-assert-restart
(macro).
with-gensyms
(macro).
with-test-restart
(macro).
clunit/src/macros/assertion-macros.lisp
utility-macros.lisp
(file).
macros
(module).
assert-condition
(macro).
assert-eq
(macro).
assert-eql
(macro).
assert-equal
(macro).
assert-equality
(macro).
assert-equality*
(macro).
assert-equalp
(macro).
assert-expands
(macro).
assert-fail
(function).
assert-false
(macro).
assert-true
(macro).
assertion-expander
(function).
form-expander
(function).
clunit/src/macros/deffixture.lisp
assertion-macros.lisp
(file).
macros
(module).
deffixture
(macro).
undeffixture
(macro).
clunit/src/macros/defsuite.lisp
deffixture.lisp
(file).
macros
(module).
defsuite
(macro).
undefsuite
(macro).
clunit/src/macros/deftest.lisp
defsuite.lisp
(file).
macros
(module).
Packages are listed by definition order.
clunit
common-lisp
.
*clunit-equality-test*
(special variable).
*clunit-report-format*
(special variable).
assert-condition
(macro).
assert-eq
(macro).
assert-eql
(macro).
assert-equal
(macro).
assert-equality
(macro).
assert-equality*
(macro).
assert-equalp
(macro).
assert-expands
(macro).
assert-fail
(function).
assert-false
(macro).
assert-true
(macro).
clunit-report
(class).
clunit-test-report
(class).
deffixture
(macro).
defined-suite-p
(function).
defined-test-p
(function).
defsuite
(macro).
deftest
(macro).
get-child-suites
(function).
get-child-tests
(function).
get-defined-suites
(function).
get-defined-tests
(function).
rerun-failed-tests
(function).
run-suite
(function).
run-test
(function).
test-report-name
(generic reader).
test-report-passed-p
(generic reader).
test-reports
(generic reader).
undeffixture
(macro).
undefsuite
(macro).
undeftest
(macro).
*clunit-report*
(special variable).
*clunit-test-report*
(special variable).
*last-clunit-report*
(special variable).
*queued-test-reports*
(special variable).
*report-progress*
(special variable).
*stop-on-fail*
(special variable).
*suite-name*
(special variable).
*tab-width*
(special variable).
*tap-test-num*
(special variable).
*test-case-hashtable*
(special variable).
*test-name*
(special variable).
*test-suite-hashtable*
(special variable).
*use-debugger*
(special variable).
assertion-condition
(condition).
assertion-error
(condition).
assertion-expander
(function).
assertion-fail-forced
(condition).
assertion-failed
(condition).
assertion-passed
(condition).
clunit-test-case
(class).
clunit-test-suite
(class).
delete-test-case
(function).
delete-test-suite
(function).
execute-test-case
(function).
execute-test-suite
(function).
expand-fixture
(generic function).
form-expander
(function).
get-test-case
(function).
(setf get-test-case)
(function).
get-test-suite
(function).
(setf get-test-suite)
(function).
handle-assertion
(function).
handle-error
(function).
print-format
(generic function).
process-queued-tests
(function).
queue-test-case
(function).
report-assertion-progress
(function).
report-suite-progress
(function).
report-test-progress
(function).
signal-assertion
(function).
skip-test-case
(function).
test-case-execution-action
(function).
with-assert-restart
(macro).
with-gensyms
(macro).
with-test-restart
(macro).
Definitions are sorted by export status, category, package, and then by lexicographic order.
The equality test used to compare values by the ASSERT-EQUALITY macro.
Controls the output format of the unit test results. Possible values are :default, :tap or NIL.
Evaluates EXPRESSION as an assertion, an assertion passes if EXPRESSION signals CONDITION. FORMS and their values are printed if the test fails.
Evaluates EXPRESSION as an assertion, an assertion passes if (EQ VALUE EXPRESSION) returns true. FORMS and their values are printed if the test fails.
Evaluates EXPRESSION as an assertion, an assertion passes if (EQL VALUE EXPRESSION) returns true. FORMS and their values are printed if the test fails.
Evaluates EXPRESSION as an assertion, an assertion passes if (EQUAL VALUE EXPRESSION) returns true. FORMS and their values are printed if the test fails.
Evaluates EXPRESSION as an assertion, an assertion passes if (FUNCALL TEST VALUE EXPRESSION) returns true. FORMS and their values are printed if the test fails.
Evaluates EXPRESSION as an assertion, an assertion passes if (FUNCALL *clunit-equality-test* VALUE EXPRESSION) returns true. FORMS and their values are printed if the test fails.
Evaluates EXPRESSION as an assertion, an assertion passes if (EQUALP VALUE EXPRESSION) returns true. FORMS and their values are printed if the test fails.
Evaluates EXPRESSION as an assertion, an assertion passes if (EQUALP EXPANSION (MACROEXPAND-1 EXPRESSION)) returns true. FORMS and their values are printed if the test fails.
Evaluates EXPRESSION as an assertion, an assertion passes if it returns false. FORMS and their values are printed if the test fails.
Evaluates EXPRESSION as an assertion, an assertion passes if it returns any non-NIL value. FORMS and their values are printed if the test fails. Remember in Common Lisp any non-NIL value is true, if you want a strict binary assertion test use (assert-eq t expression) instead.
A fixture defines a code template that is wrapped around the code of each test case and test suite that are executed by test suite SUITE at runtime.. The test case body is plugged into the template at the position identified by PLUG. Fixtures are expanded at runtime, so the fixture that will wrap around a test depends on the test suite call stack.
Defines a test suite called NAME. If PARENTS is non-NIL the test suite is defined as a sub-suite of each of the test suites in PARENTS.
Defines a test case called NAME. DECLARATIONS declares which test suites this test case is associated with as well as any other test cases that it depends on. The test case body is revaluated on each run, so any redefinition of macros and inline functions will be automatically visible without having to redefine the test.
Remove a fixture definition.
Returns T if a test suite called SUITE-NAME is defined, otherwise returns NIL.
Returns T if a test case called TEST-NAME is defined, otherwise returns NIL.
Returns a list of all test suite names that are children of the suite called SUITE-NAME.
Returns a list of all test case names that are children of the suite called SUITE-NAME.
Returns a list of all defined test suite names.
Returns a list of all defined test case names.
Reruns all failed tests recorded in LAST-REPORT which defaults to the report of the previous test run. If REPORT-PROGRESS is non-NIL, the test progress is reported. If USE-DEBUGGER is non-NIL, the debugger is invoked whenever an assertion fails. If STOP-ON-FAIL is non-NIL, the rest of the unit test is cancelled when any assertion fails or an error occurs.
Executes a test case called SUITE. If REPORT-PROGRESS is non-NIL, the test progress is reported. If USE-DEBUGGER is non-NIL, the debugger is invoked whenever an assertion fails. If STOP-ON-FAIL is non-NIL, the rest of the unit test is cancelled when any assertion fails or an error occurs.
Executes a test case called TEST. If REPORT-PROGRESS is non-NIL, the test progress is reported. If USE-DEBUGGER is non-NIL, the debugger is invoked whenever an assertion fails. If STOP-ON-FAIL is non-NIL, the rest of the unit test is cancelled when any assertion fails or an error occurs.
clunit-test-report
)) ¶automatically generated reader method
clunit-test-report
)) ¶automatically generated reader method
clunit-report
)) ¶automatically generated reader method
clunit-report
) stream) ¶clunit-test-report
) stream) ¶assertion-condition
) stream) ¶:test-name
This slot is read-only.
t
:passed-p
This slot is read-only.
:skipped-p
(list)
:suite-list
(list)
Holds a CLUNIT-REPORT object during a test run, used to store aggregated test reports.
Holds a CLUNIT-TEST-REPORT object for each executing test case.
Holds the last returned CLUNIT-REPORT object. Default optional argument to the function RERUN-FAILED-TESTS.
A list of queued CLUNIT-TEST-REPORT objects whose test case execution has been deferred until their dependencies requirements are met.
This variable switches on progress reporting if set to true.
If any assertion fails or an error condition occurs, stop the unit test.
Holds a list of suite symbol names in their current calling order. First called suite at the front, currently executing suite at the back.
Number of tab columns to use for indentation (in the reporting functions).
Counter used in these printing functions
Holds CLUNIT-TEST-CASE instances. The key of each test case object is the symbol name.
Holds the name of the test currently executing.
Holds CLUNIT-TEST-SUITE instances. The key of each test suite object is the symbol name.
If set to true, the debugger is invoked whenever an assertion fails.
WITH-ASSERT-RESTART places a restart called SKIP-ASSERTION around an assertion form.
WITH-GENSYMS takes a list of symbols SYM and a list of body forms. It returns a LET clause with each symbol in SYM bound to a gensymbol and the body forms as the body of the let clause.
Expands an assertion macro call.
Deletes the TEST-CASE instance associated with the key NAME in the hash table *TEST-CASES*
Deletes the TEST-SUITE instance associated with the key NAME in the hash table *TEST-SUITES*
Retrieves the TEST-CASE instance associated with the key NAME in the hash table *TEST-CASES*
Adds NEW-TEST-CASE in the hash table *TEST-CASES* under the key NAME.
Retrieves the TEST-SUITE instance associated with the key NAME in the hash table *TEST-SUITES*
Adds NEW-TEST-SUITE in the hash table *TEST-SUITES* under the key NAME.
Records the result of assertion tests and records any errors that occur.
Determines the execution action for TEST-CASE. If test case has no dependencies or pending dependencies, then :RUN is returned.
If test case has another test case it depends on that failed or was skipped, then :SKIP is returned.
If test case depends on test cases that have not yet run or are also queued, then :QUEUE is returned.
Expands out a fixture body for the given test suite.
Outputs the OBJECT report to STREAM in the given FORMAT. FORMAT can be :default, :tap or NIL.
assertion-fail-forced
) (format (eql :tap)
) stream) ¶assertion-failed
) (format (eql :tap)
) stream) ¶assertion-error
) (format (eql :tap)
) stream) ¶clunit-test-report
) (format (eql :tap)
) stream) ¶clunit-report
) (format (eql :tap)
) stream) ¶assertion-fail-forced
) (format (eql :default)
) stream) ¶assertion-failed
) (format (eql :default)
) stream) ¶assertion-error
) (format (eql :default)
) stream) ¶clunit-test-report
) (format (eql :default)
) stream) ¶clunit-report
) (format (eql :default)
) stream) ¶condition
.
This is a special case, if an unexpected condition is signalled outside an assertion test, store the condition description here.
(quote "")
:message
The expression that was tested.
(quote nil)
:expression
Holds a list of FORM-VALUE pairs, see function EXPAND-FORMS for more detail.
(quote nil)
:forms
The value the expression was expected to return.
(quote nil)
:expected
The result that was returned from evaluating the expression.
(quote nil)
:returned
Jump to: | (
A D E F G H M P Q R S T U W |
---|
Jump to: | (
A D E F G H M P Q R S T U W |
---|
Jump to: | *
A C D E F M N P R S T |
---|
Jump to: | *
A C D E F M N P R S T |
---|
Jump to: | A C D F G M P R S T U |
---|
Jump to: | A C D F G M P R S T U |
---|