mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-11 23:07:36 +02:00
Build-out docs
This commit is contained in:
parent
70adce40b6
commit
d140fcb7bf
1 changed files with 44 additions and 36 deletions
|
@ -2,31 +2,22 @@
|
||||||
|
|
||||||
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
|
## Testing
|
||||||
- [`warning`](#warning)
|
|
||||||
|
|
||||||
## 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-propagate-info`](#test-propagate-info)
|
||||||
|
- [`test-run`](#test-run)
|
||||||
|
|
||||||
|
## Test Groups
|
||||||
|
- [`test-group`](#test-group)
|
||||||
- [`test-begin`](#test-begin)
|
- [`test-begin`](#test-begin)
|
||||||
- [`test-end`](#test-end)
|
- [`test-end`](#test-end)
|
||||||
- [`test-propagate-info`](#test-propagate-info)
|
|
||||||
- [`test-vars`](#test-vars)
|
|
||||||
- [`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
|
## Parameters
|
||||||
- [`current-test-group`](#current-test-group)
|
- [`current-test-group`](#current-test-group)
|
||||||
- [`current-test-verbosity`](#current-test-verbosity)
|
- [`current-test-verbosity`](#current-test-verbosity)
|
||||||
|
@ -38,10 +29,6 @@ The `(cyclone test)` library contains a testing framework ported from `(chibi te
|
||||||
- [`current-test-comparator`](#current-test-comparator)
|
- [`current-test-comparator`](#current-test-comparator)
|
||||||
- [`test-failure-count`](#test-failure-count)
|
- [`test-failure-count`](#test-failure-count)
|
||||||
|
|
||||||
# warning
|
|
||||||
|
|
||||||
(warning msg . args)
|
|
||||||
|
|
||||||
# test
|
# test
|
||||||
|
|
||||||
*Syntax*
|
*Syntax*
|
||||||
|
@ -54,49 +41,70 @@ Evaluate `expr` and check that it is `equal?` to `expect`.
|
||||||
|
|
||||||
# test-equal
|
# test-equal
|
||||||
|
|
||||||
;;> \macro{(test-equal equal [name] expect expr)}
|
*Syntax*
|
||||||
|
|
||||||
;;> Equivalent to test, using \var{equal} for comparison instead of
|
(test-equal equal [name] expect expr)
|
||||||
;;> \scheme{equal?}.
|
|
||||||
|
Equivalent to test, using `equal` for comparison instead of `equal?`.
|
||||||
|
|
||||||
# test-error
|
# test-error
|
||||||
|
|
||||||
;;> \macro{(test-error [name] expr)}
|
*Syntax*
|
||||||
|
|
||||||
;;> Like \scheme{test} but evaluates \var{expr} and checks that it
|
(test-error [name] expr)
|
||||||
;;> raises an error.
|
|
||||||
|
Like `test` but evaluates `expr` and checks that it raises an error.
|
||||||
|
|
||||||
# test-assert
|
# test-assert
|
||||||
|
|
||||||
;;> \macro{(test-assert [name] expr)}
|
*Syntax*
|
||||||
|
|
||||||
;;> Like \scheme{test} but evaluates \var{expr} and checks that it's true.
|
(test-assert [name] expr)
|
||||||
|
|
||||||
|
Like `test` but evaluates `expr` and checks that it's true.
|
||||||
|
|
||||||
# test-not
|
# test-not
|
||||||
|
|
||||||
;;> \macro{(test-not [name] expr)}
|
*Syntax*
|
||||||
|
|
||||||
;;> Like \scheme{test} but evaluates \var{expr} and checks that it's false.
|
(test-not [name] expr)
|
||||||
|
|
||||||
|
Like `test` but evaluates `expr` and checks that it's false.
|
||||||
|
|
||||||
# test-values
|
# test-values
|
||||||
|
|
||||||
;;> \macro{(test-values [name] expect expr)}
|
*Syntax*
|
||||||
|
|
||||||
;;> Like \scheme{test} but \var{expect} and \var{expr} can both
|
(test-values [name] expect expr)
|
||||||
;;> return multiple values.
|
|
||||||
|
Like `test` but `expect` and `expr` can both return multiple values.
|
||||||
|
|
||||||
# test-begin
|
# test-begin
|
||||||
|
|
||||||
|
(test-begin)
|
||||||
|
(test-begin name)
|
||||||
|
|
||||||
|
Begin testing a new group until the closing `(test-end)`.
|
||||||
|
|
||||||
# test-end
|
# test-end
|
||||||
|
|
||||||
# test-syntax-error
|
(test-end)
|
||||||
|
(test-end name)
|
||||||
|
|
||||||
|
Ends testing group introduced with `(test-begin)`, and summarizes the results.
|
||||||
|
|
||||||
# test-propagate-info
|
# test-propagate-info
|
||||||
|
|
||||||
# test-vars
|
(test-propagate-info name expect expr info)
|
||||||
|
|
||||||
|
Low-level macro to pass alist info to the underlying `test-run`.
|
||||||
|
|
||||||
# test-run
|
# test-run
|
||||||
|
|
||||||
|
(test-run expect expr info)
|
||||||
|
|
||||||
|
The procedural interface to testing. `expect` and `expr` should be thunks, and `info` is an alist of properties used in test reporting.
|
||||||
|
|
||||||
# test-exit
|
# test-exit
|
||||||
|
|
||||||
(test-exit)
|
(test-exit)
|
||||||
|
@ -111,6 +119,8 @@ Wraps `body` as a single test group, which can be filtered and summarized separa
|
||||||
|
|
||||||
# current-test-group
|
# current-test-group
|
||||||
|
|
||||||
|
The current test group as started by `test-group` or `test-begin`.
|
||||||
|
|
||||||
# current-test-verbosity
|
# current-test-verbosity
|
||||||
|
|
||||||
# current-test-applier
|
# current-test-applier
|
||||||
|
@ -127,5 +137,3 @@ Wraps `body` as a single test group, which can be filtered and summarized separa
|
||||||
|
|
||||||
# current-test-comparator
|
# current-test-comparator
|
||||||
|
|
||||||
# test-group-inc!
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue