test/suite
src/test/suite.tur
defn
it
(it [desc :cstr result :bool] :bool)
run a single test case and record the result in TAP output.
Parameters
| desc | test description string | |
| result | boolean result of the test body |
Returns
The result (true=pass, false=fail).
Example
(it "adds correctly" (assert-eq (+ 1 2) 3))
Since: P1
defmacro
describe
(describe [name & body])
group related test cases under a named section.
Parameters
| name | section description | |
| body | one or more test expressions (typically (it ...) calls) |
Example
(describe "math" (it "adds" (assert-eq (+ 1 2) 3)))
Since: P1
defmacro
before-each
(before-each [& body])
register a setup hook (P1 stub: runs body once).
Since: P1
defmacro
after-each
(after-each [& body])
register a teardown hook (P1 stub: runs body once).
Since: P1
Internal definitions
__ts-- shared test state (opcode dispatch over static vars).__it-print-- print a TAP test result line.__desc-print-- print a TAP comment for a describe block.