This is the org.melusina.confidence Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 04:47:14 2024 GMT+0.
org.melusina.confidence/org.melusina.confidence.asd
org.melusina.confidence/src/package.lisp
org.melusina.confidence/src/utilities.lisp
org.melusina.confidence/src/assertion.lisp
org.melusina.confidence/src/result.lisp
org.melusina.confidence/src/testcase.lisp
org.melusina.confidence/src/entrypoint.lisp
The main system appears first, followed by any subsystem dependency.
org.melusina.confidence
A Simple Interactive Test Framework for Common Lisp
Michaël Le Barbier
MIT
alexandria
(system).
src
(module).
Modules are listed depth-first from the system components tree.
org.melusina.confidence/src
org.melusina.confidence
(system).
package.lisp
(file).
utilities.lisp
(file).
assertion.lisp
(file).
result.lisp
(file).
testcase.lisp
(file).
entrypoint.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
org.melusina.confidence/org.melusina.confidence.asd
org.melusina.confidence/src/package.lisp
org.melusina.confidence/src/utilities.lisp
org.melusina.confidence/src/assertion.lisp
org.melusina.confidence/src/result.lisp
org.melusina.confidence/src/testcase.lisp
org.melusina.confidence/src/entrypoint.lisp
org.melusina.confidence/org.melusina.confidence.asd
org.melusina.confidence
(system).
org.melusina.confidence/src/utilities.lisp
src
(module).
*alphabet-base36*
(special variable).
*alphabet-base64*
(special variable).
*alphabet-hexadecimal*
(special variable).
random-string
(function).
string-match
(function).
stringcat
(function).
org.melusina.confidence/src/assertion.lisp
src
(module).
*double-float-precision*
(special variable).
*single-float-precision*
(special variable).
assert-char-equal
(function).
assert-char<
(function).
assert-char<=
(function).
assert-char=
(function).
assert-char>
(function).
assert-char>=
(function).
assert-condition
(macro).
assert-eq
(function).
assert-eql
(function).
assert-equal
(function).
assert-equalp
(function).
assert-float-is-approximately-equal
(function).
assert-float-is-definitely-greater-than
(function).
assert-float-is-definitely-less-than
(function).
assert-float-is-essentially-equal
(function).
assert-list-equal
(function).
assert-nil
(function).
assert-set-equal
(function).
assert-string-equal
(function).
assert-string-match
(function).
assert-string<
(function).
assert-string<=
(function).
assert-string=
(function).
assert-string>
(function).
assert-string>=
(function).
assert-subsetp
(function).
assert-t
(function).
assert-t*
(function).
assert-type
(function).
assert-vector-equal
(function).
assert<
(function).
assert<=
(function).
assert=
(function).
assert>
(function).
assert>=
(function).
define-assertion
(macro).
list-assertions
(function).
failwith-assertion-report
(function).
float-comparison-threshold
(macro).
make-report-string-comparison
(function).
parse-assertion-forms
(function).
report-string-comparison/details
(function).
report-string-comparison/unexpected-type
(function).
set-assertion-properties
(function).
org.melusina.confidence/src/result.lisp
src
(module).
describe-object
(method).
print-object
(method).
testcase-argument-values
(reader method).
testcase-condition
(reader method).
testcase-failure
(reader method).
testcase-name
(reader method).
testcase-outcome
(class).
testcase-path
(reader method).
testcase-success
(reader method).
testcase-total
(reader method).
*current-testcase-outcome*
(special variable).
*last-testsuite-outcome*
(special variable).
make-testcase-outcome
(function).
org.melusina.confidence/src/testcase.lisp
src
(module).
*testcase-break-into-the-debugger-on-errors*
(special variable).
*testcase-describe-failed-assertions*
(special variable).
*testcase-interactive-p*
(special variable).
*testsuite-id*
(special variable).
*testsuite-name*
(special variable).
assertion-argument-names
(reader method).
assertion-argument-values
(reader method).
assertion-condition
(reader method).
assertion-condition
(condition).
assertion-description
(reader method).
assertion-form
(reader method).
assertion-name
(reader method).
assertion-path
(reader method).
assertion-type
(reader method).
define-testcase
(macro).
list-testcases
(function).
print-export-list-for-testcases
(function).
quit
(function).
testcase-break-into-the-debugger-on-errors
(function).
testcase-outcome
(reader method).
*last-testsuite-result*
(special variable).
*testcase-path*
(special variable).
assertion-failure
(condition).
assertion-outcome
(condition).
assertion-skipped
(condition).
assertion-success
(condition).
define-testcase/wrap-assertion-forms
(function).
describe-assertion-condition
(function).
describe-assertion-failure
(function).
describe-assertion-outcome
(function).
describe-assertion-success
(function).
describe-object-arguments
(function).
describe-testcase-end
(function).
export-testcase-outcome
(function).
guess-cicdtool
(function).
instrument-assertion
(macro).
instrument-assertion-1
(function).
make-testsuite-id
(function).
run-testcase
(function).
set-testcase-properties
(function).
testcase-end
(condition).
testcase-outcome-pathname
(function).
Packages are listed by definition order.
confidence
org.melusina.confidence
common-lisp
.
*double-float-precision*
(special variable).
*single-float-precision*
(special variable).
*testcase-break-into-the-debugger-on-errors*
(special variable).
*testcase-describe-failed-assertions*
(special variable).
*testcase-interactive-p*
(special variable).
*testsuite-id*
(special variable).
*testsuite-name*
(special variable).
assert-char-equal
(function).
assert-char<
(function).
assert-char<=
(function).
assert-char=
(function).
assert-char>
(function).
assert-char>=
(function).
assert-condition
(macro).
assert-eq
(function).
assert-eql
(function).
assert-equal
(function).
assert-equalp
(function).
assert-float-is-approximately-equal
(function).
assert-float-is-definitely-greater-than
(function).
assert-float-is-definitely-less-than
(function).
assert-float-is-essentially-equal
(function).
assert-list-equal
(function).
assert-nil
(function).
assert-set-equal
(function).
assert-string-equal
(function).
assert-string-match
(function).
assert-string<
(function).
assert-string<=
(function).
assert-string=
(function).
assert-string>
(function).
assert-string>=
(function).
assert-subsetp
(function).
assert-t
(function).
assert-t*
(function).
assert-type
(function).
assert-vector-equal
(function).
assert<
(function).
assert<=
(function).
assert=
(function).
assert>
(function).
assert>=
(function).
assertion-argument-names
(generic reader).
assertion-argument-values
(generic reader).
assertion-condition
(generic reader).
assertion-condition
(condition).
assertion-description
(generic reader).
assertion-form
(generic reader).
assertion-name
(generic reader).
assertion-path
(generic reader).
assertion-type
(generic reader).
define-assertion
(macro).
define-testcase
(macro).
list-assertions
(function).
list-testcases
(function).
print-export-list-for-testcases
(function).
quit
(function).
testcase-argument-values
(generic reader).
testcase-break-into-the-debugger-on-errors
(function).
testcase-condition
(generic reader).
testcase-failure
(generic reader).
testcase-name
(generic reader).
testcase-outcome
(generic reader).
testcase-outcome
(class).
testcase-path
(generic reader).
testcase-success
(generic reader).
testcase-total
(generic reader).
*alphabet-base36*
(special variable).
*alphabet-base64*
(special variable).
*alphabet-hexadecimal*
(special variable).
*current-testcase-outcome*
(special variable).
*last-testsuite-outcome*
(special variable).
*last-testsuite-result*
(special variable).
*testcase-path*
(special variable).
assertion-failure
(condition).
assertion-outcome
(condition).
assertion-skipped
(condition).
assertion-success
(condition).
define-testcase/wrap-assertion-forms
(function).
describe-assertion-condition
(function).
describe-assertion-failure
(function).
describe-assertion-outcome
(function).
describe-assertion-success
(function).
describe-object-arguments
(function).
describe-testcase-end
(function).
export-testcase-outcome
(function).
failwith-assertion-report
(function).
float-comparison-threshold
(macro).
guess-cicdtool
(function).
instrument-assertion
(macro).
instrument-assertion-1
(function).
make-report-string-comparison
(function).
make-testcase-outcome
(function).
make-testsuite-id
(function).
parse-assertion-forms
(function).
random-string
(function).
report-string-comparison/details
(function).
report-string-comparison/unexpected-type
(function).
run-testcase
(function).
set-assertion-properties
(function).
set-testcase-properties
(function).
string-match
(function).
stringcat
(function).
testcase-end
(condition).
testcase-outcome-pathname
(function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
The precision used to compare of double precision floats.
This number can be understood as the number of matching digits in the binary representation
of the fractional part of float numbers, yet distinct tests interpret this value differently.
The precision used to compare of single precision floats.
This number can be understood as the number of matching digits in the binary representation
of the fractional part of float numbers, yet distinct tests interpret this value differently.
Flag controlling whether an unexpected error should open the debugger.
Flag controlling whether a testcase should describe failed assertions or not.
Flag governing the interactive mode of testcases.
When the flag is a generalised boolean, a failed assertion can be retried.
The default value of the parameter is based on the :SWANK and :SLYNK features.
A unique identfier for the current testsuite run batch.
The basename for the testsuite.
Usually TESTSUITE but commonly used values are ACCEPTANCE, INTEGRATION, PREFLIGHT, etc.
Assert that the evaluation of FORM signals a CONDITION.
It is possible to perform arbitrary checks on the condition by providing SLOTS,
which are bound to the generated condition slots as in WITH-SLOTS and the given
BODY yielding a boolean validating details of the assertion. When this boolean
is NIL, a string must be returned as second value to explain why the validation
failed.
Define an assertion function NAME, accepting LAMBDA-LIST and evaluating BODY.
The BODY is interpreted as computing a generalised boolean value, which
determines if the assertion is a success or failure. When it is a success,
a single value T is returned. When it is a failure, two values NIL and
a descriptive string are returned.
The NAME must start with ASSERT-, ASSERT<, ASSERT> or ASSERT=.
When the first BODY form is a string, this string is used as a docstring for
the function NAME. If no report function has been provided, a report function
constantly printing the docstring is supplied.
When the next BODY form starts with the keyword :REPORT, then the rest of that form must be function of a STREAM. This function is then used to generate an informational message when reporting the corresponding error condition. This allows to add dynamic context to this informational messsage, like the value of some variables. (That syntax is reminesccent of RESTART-CASE.)
Define a test case function TESTCASE-NAME, accepting TESTCASE-ARGS with BODY. The BODY is examined and assertions spotted in it are wrapped with extra code installing restarts and aggregating outcomes for assertions and nested testcases..
The return value of a testcase is a TESTCASE-OUTCOME, holding a precise description of tests that ran and their outcomes.
Assert that CHARACTER1 and CHARACTER2 satisfy the CHAR-EQUAL predicate.
Assert that CHARACTER1 and CHARACTER2 satisfy the CHAR< predicate.
Assert that CHARACTER1 and CHARACTER2 satisfy the CHAR<= predicate.
Assert that CHARACTER1 and CHARACTER2 satisfy the CHAR= predicate.
Assert that CHARACTER1 and CHARACTER2 satisfy the CHAR> predicate.
Assert that CHARACTER1 and CHARACTER2 satisfy the CHAR>= predicate.
Assert that A and B satisfy the EQ predicate.
Assert that A and B satisfy the EQL predicate.
Assert that A and B satisfy the EQUAL predicate.
Assert that A and B satisfy the EQUALP predicate.
Assert that FLOAT1 is approximately equal to FLOAT2.
This means that FLOAT1 and FLOAT2 are in a neighbourhood whose size is based
on the magnitude orders of FLOAT1 and FLOAT2 and the floating point precision.
A specific FLOAT-TYPE of ’SINGLE-FLOAT or ’DOUBLE-FLOAT can be explicitly supplied.
Assert that FLOAT1 is defintely greater than FLOAT2.
This means that FLOAT1 is greater than FLOAT2 and not in a neighbourhood of FLOAT2
whose diameter is controlled by the INACCURACY, the magnitude orders of FLOAT1 and
FLOAT2 and the floating point precision.
A specific FLOAT-TYPE of ’SINGLE-FLOAT or ’DOUBLE-FLOAT can be explicitly supplied.
Assert that FLOAT1 is definetely less than FLOAT2
This means that FLOAT2 is greater than FLOAT1 and not in a neighbourhood of FLOAT1
whose diameter is controlled by the INACCURACY, the magnitude orders of FLOAT1 and
FLOAT2 and the floating point precision.
A specific FLOAT-TYPE of ’SINGLE-FLOAT or ’DOUBLE-FLOAT can be explicitly supplied.
Asssert that FLOAT1 is essentially equal to FLOAT2.
This means that FLOAT1 and FLOAT2 are in a neighbourhood whose size is based
on the magnitude orders of FLOAT1 and FLOAT2 and the floating point precision.
A specific FLOAT-TYPE of ’SINGLE-FLOAT or ’DOUBLE-FLOAT can be explicitly supplied.
Assert that LIST1 and LIST2 are equal.
Lists are equal if they have the same length and have equal elements at each
index. The equality predicate used to compare elements is either EQL or the predicate
provided by the :TEST keyword argument.
Assert that EXPR is NIL.
Assert that LIST1 denotes the same set as LIST2.
Assert that STRING1 and STRING2 satisfy the STRING-EQUAL predicate. This assertion supports the same keyword parameters as STRING-EQUAL.
Assert that TEXT matches globbing PATTERN.
Assert that STRING1 and STRING2 satisfy the STRING< predicate. This assertion supports the same keyword parameters as STRING<.
Assert that STRING1 and STRING2 satisfy the STRING<= predicate. This assertion supports the same keyword parameters as STRING<=.
Assert that STRING1 and STRING2 satisfy the STRING= predicate. This assertion supports the same keyword parameters as STRING=.
Assert that STRING1 and STRING2 satisfy the STRING> predicate. This assertion supports the same keyword parameters as STRING>.
Assert that STRING1 and STRING2 satisfy the STRING>= predicate. This assertion supports the same keyword parameters as STRING>=.
Assert that the set represented by LIST1 is a subset of LIST2.
Assert that EXPR is T.
This does not compare EXPR to T as a generalised boolean, cf. ASSERT-T*.
Assert that EXPR is true as a generalised boolean.
Assert that EXPR evaluates to a value of type TYPE.
Assert that VECTOR1 and VECTOR2 are equal.
Vectors are equal if they have the same length and have equal elements at each
index. The equality predicate used to compare elements is either EQL or the predicate
provided by the :TEST keyword argument.
Assert that A and B satisfy the < predicate.
Assert that A and B satisfy the <= predicate.
Assert that A and B satisfy the = predicate.
Assert that A and B satisfy the > predicate.
Assert that A and B satisfy the >= predicate.
List assertions exported by PACKAGE-DESIGNATOR.
List testcases exported by PACKAGE-DESIGNATOR.
Print a form suitable for exporting TESTCASES defiend by PACKAGE-DESIGNATOR.
Quit the SBCL lisp image and set exit status accordingly.
Set the flag controlling wether an unexpected error should open the debugger.
assertion-outcome
)) ¶assertion-outcome
)) ¶assertion-condition
)) ¶assertion-failure
)) ¶assertion-outcome
)) ¶form
.
assertion-outcome
)) ¶name
.
assertion-outcome
)) ¶path
.
assertion-outcome
)) ¶type
.
testcase-outcome
)) ¶The list of evaluated arguments for the testcase.
testcase-outcome
)) ¶The total number of assertions that yielded a condition in the testcase and its descendants.
testcase-outcome
)) ¶The total number of assertions that yielded a failure in the testcase and its descendants.
testcase-outcome
)) ¶automatically generated reader method
name
.
testcase-end
)) ¶testcase-outcome
)) ¶The path of the result in the test hierarchy.
This is the stack of preceding testcases in the test hierarchy.
path
.
testcase-outcome
)) ¶The total number of assertions that yielded a success in the testcase and its descendants.
testcase-outcome
)) ¶The total number of assertions in the testcase and its descendants.
testcase-outcome
) stream) ¶testcase-outcome
) stream) ¶The condition signaled by assertions that trigger an unexpected condition instead of returning normally.
The condition signalled by the assertion.
common-lisp
.
(quote (error "an assertion-condition requires a :condition."))
:condition
This slot is read-only.
A class capturing a testcase outcome.
The path of the result in the test hierarchy.
This is the stack of preceding testcases in the test hierarchy.
:path
This slot is read-only.
(error "a testcase-outcome requires a :name.")
:name
This slot is read-only.
The list of evaluated arguments for the testcase.
:argument-values
This slot is read-only.
The total number of assertions in the testcase and its descendants.
0
:total
This slot is read-only.
The total number of assertions that yielded a success in the testcase and its descendants.
0
:success
This slot is read-only.
The total number of assertions that yielded a failure in the testcase and its descendants.
0
:failure
This slot is read-only.
The total number of assertions that yielded a condition in the testcase and its descendants.
common-lisp
.
0
:condition
This slot is read-only.
The set of characters used for base 36 encoding.
The set of characters used for base 64 encoding.
The set of hexadecimal characters.
The outcome of the current testcase.
The outcome of the last testsuite.
The results of the last testsuite that ran.
The current path in the testcase hierarchy.
This is a list of symbols designating the argument-less testcases in the call stack.
Instrument the execution of the assertion FORM and return ASSERTION evaluation details. This makes sure that the returned type for FORM is an instance of RESULT and guarantees that conditions triggered by the evaluation of arguments are recorded.
Walks through BODY-FORMS and wrap assertion forms in a RESTART-CASE.
Export OUTCOME description.
Guess which CI/CD tool this process is running under.
The returned value is one of:
NIL, :GOCD, :JENKINS, :GITHUB-ACTIONS, :CIRCLECI
References:
* GoCD: https://docs.gocd.org/current/faq/dev_use_current_revision_in_build.html
* Jenkins: https://www.jenkins.io/doc/book/pipeline/jenkinsfile/#using-environment-variables
* GitHub Actions: https://docs.github.com/en/actions/learn-github-actions/environment-variables
* CircleCI: https://circleci.com/docs/2.0/env-vars/
Supervise the execution of ARGUMENTS-LAMBDA and ASSERTION-LAMBDA.
Make a good value for *TESTSUITE-ID* based on *TESTSUITE-NAME* and CI/CD tool used.
Parse assertion FORMS for assertion NAME.
It returns the DOCSTRING, the REPORT function, the list of DECLARATIONS
and remaining FORMS as multiple values.
Prepare a random alphabetic string of given LENGTH.
The returned string contains LENGTH characters chosen from
the vector ALPHABET. When ALPHABET is one of the keywords
:HEXADECIMAL :BASE36 and :BASE64
the corresponding alphabet is used.
This uses a very weak method that does not try to avoid collisions.x
Run TESTCASE-BODY
Set assertion properties on symbol NAME.
Predicate recognising TEXT matching a globbing PATTERN.
Concatenate STRINGS.
This is a shortand which is useful in combination to reader macros.
The pathname used to write OUTCOME description.
The condition signaled by failed assertions.
A detailed description on why the assertion failed.
(quote (error "an assertion-failure requires a :description."))
:description
This slot is read-only.
The condition signalling an assertion result.
condition
.
The path of the result in the test hierarchy.
This is the stack of preceding testcases in the test hierarchy.
(quote nil)
:path
This slot is read-only.
One of the keywords :FUNCTION or :MACRO according to the nature of the assertion.
common-lisp
.
(quote :function)
:type
This slot is read-only.
The symbol designating the assertion that yielded this result. This is the first element of the FORM.
(quote (error "an assertion-outcome requires a :name."))
:name
This slot is read-only.
The list of evaluated arguments for the assertion.
(quote (error "an assertion-outcome requires an :argument-values list."))
:argument-values
This slot is read-only.
The list of argument names for the assertion.
(quote (error "an assertion-outcome requires an :argument-names list."))
:argument-names
This slot is read-only.
The form for the assertion invocation.
(quote (error "an assertion-outcome requires a :form."))
:form
This slot is read-only.
The condition signaled by assertions that are skipped.
condition
.
The condition signaled by succesful assertions.
The condition signalled at the end of a testcase.
condition
.
The outcome of the finished testcase.
(quote (error "a testcase-end requires an outcome."))
:outcome
This slot is read-only.
Jump to: | A D E F G I L M P Q R S T |
---|
Jump to: | A D E F G I L M P Q R S T |
---|
Jump to: | *
A C D F N O P S T |
---|
Jump to: | *
A C D F N O P S T |
---|
Jump to: | A C E F M O P R S T U |
---|
Jump to: | A C E F M O P R S T U |
---|