WIP - Added partial docs

This commit is contained in:
Justin Ethier 2021-03-31 19:04:01 -04:00
parent 7b69c022b0
commit 70adce40b6

View file

@ -2,54 +2,88 @@
The `(cyclone test)` library contains a testing framework ported from `(chibi test)` which in turn was ported from CHICKEN. The `(cyclone test)` library contains a testing framework ported from `(chibi test)` which in turn was ported from CHICKEN.
## Exception Utilities
- [`warning`](#warning) - [`warning`](#warning)
- [`test-group-inc!`](#test-group-inc)
- [`print-exception`](#print-exception) ## Test Interface
- [`test`](#test) - [`test`](#test)
- [`test-equal`](#test-equal) - [`test-equal`](#test-equal)
- [`test-error`](#test-error) - [`test-error`](#test-error)
- [`test-assert`](#test-assert) - [`test-assert`](#test-assert)
- [`test-not`](#test-not) - [`test-not`](#test-not)
- [`test-values`](#test-values) - [`test-values`](#test-values)
- [`test-group`](#test-group)
- [`current-test-group`](#current-test-group)
- [`test-begin`](#test-begin) - [`test-begin`](#test-begin)
- [`test-end`](#test-end) - [`test-end`](#test-end)
- [`test-syntax-error`](#test-syntax-error)
- [`test-propagate-info`](#test-propagate-info) - [`test-propagate-info`](#test-propagate-info)
- [`test-vars`](#test-vars) - [`test-vars`](#test-vars)
- [`test-run`](#test-run) - [`test-run`](#test-run)
- [`test-exit`](#test-exit) - [`test-exit`](#test-exit)
## Group Interface
- [`test-group`](#test-group)
- [`test-group-inc!`](#test-group-inc)
## Utilities
- [`test-syntax-error`](#test-syntax-error)
## Parameters
- [`current-test-group`](#current-test-group)
- [`current-test-verbosity`](#current-test-verbosity) - [`current-test-verbosity`](#current-test-verbosity)
- [`current-test-applier`](#current-test-applier) - [`current-test-applier`](#current-test-applier)
- [`current-test-handler`](#current-test-handler) - [`current-test-handler`](#current-test-handler)
- [`current-test-skipper`](#current-test-skipper) - [`current-test-skipper`](#current-test-skipper)
- [`current-test-group-reporter`](#current-test-group-reporter) - [`current-test-group-reporter`](#current-test-group-reporter)
- [`test-failure-count`](#test-failure-count)
- [`current-test-epsilon`](#current-test-epsilon) - [`current-test-epsilon`](#current-test-epsilon)
- [`current-test-comparator`](#current-test-comparator) - [`current-test-comparator`](#current-test-comparator)
- [`test-failure-count`](#test-failure-count)
# warning # warning
# test-group-inc! (warning msg . args)
# print-exception
# test # test
*Syntax*
(test [name] expect expr)
Evaluate `expr` and check that it is `equal?` to `expect`.
`name` is used in reporting, and defaults to a printed summary of `expr`.
# test-equal # test-equal
;;> \macro{(test-equal equal [name] expect expr)}
;;> Equivalent to test, using \var{equal} for comparison instead of
;;> \scheme{equal?}.
# test-error # test-error
;;> \macro{(test-error [name] expr)}
;;> Like \scheme{test} but evaluates \var{expr} and checks that it
;;> raises an error.
# test-assert # test-assert
;;> \macro{(test-assert [name] expr)}
;;> Like \scheme{test} but evaluates \var{expr} and checks that it's true.
# test-not # test-not
;;> \macro{(test-not [name] expr)}
;;> Like \scheme{test} but evaluates \var{expr} and checks that it's false.
# test-values # test-values
# test-group ;;> \macro{(test-values [name] expect expr)}
# current-test-group ;;> Like \scheme{test} but \var{expect} and \var{expr} can both
;;> return multiple values.
# test-begin # test-begin
@ -65,6 +99,18 @@ The `(cyclone test)` library contains a testing framework ported from `(chibi te
# test-exit # test-exit
(test-exit)
Exits with a failure status if any tests have failed, and a successful status otherwise.
# test-group
(test-group body ...)
Wraps `body` as a single test group, which can be filtered and summarized separately.
# current-test-group
# current-test-verbosity # current-test-verbosity
# current-test-applier # current-test-applier
@ -81,3 +127,5 @@ The `(cyclone test)` library contains a testing framework ported from `(chibi te
# current-test-comparator # current-test-comparator
# test-group-inc!