Next: (veritas reporter), Previous: (veritas model), Up: API
Evaluate thunks one after another, keeping their order.
The result list lines up with the input list.
Run thunks concurrently in fibers and collect what they return.
Blocks until every thunk has reported back through a shared channel. A thunk that raises sends a formatted error string instead of a value, so one failure cannot hang the run. Results come back in completion order, which is not the order of thunks.
(evaluate-thunks-concurrently
(list (lambda () (sleep 1) 'delayed)
(lambda () 'instant)))
⇒ (instant delayed)
Default value:
#f
Run thunk with an optional deadline of seconds seconds.
When seconds is a positive real number the work runs in its own
fiber and, if it has not finished by then, the fiber is aborted and the
result of calling on-timeout is returned instead. When
seconds is #f (the default, meaning no deadline)
thunk is simply called and its result is returned.
thunk must return a single value. The caller never waits for more than seconds, and the runaway fiber is terminated rather than left running.
(call-with-timeout 5
(lambda () (expensive-computation))
#:on-timeout (lambda () 'gave-up))
Call thunk and return a result-and-output record.
The record holds what thunk returned together with everything it printed, so a test’s output can be reported next to its result.
Return the outcome of every assertion in xs as a flat list.
Booleans only: #t for a pass, #f for a failure.
Return the assertion outcomes found inside xs.
Knows assertion, pre-test, test and suite results, and recurses into
lists. Unspecified values, benchmarks and #t contribute nothing;
an unrecognized type raises.
Record item in the active collector, and return item.
Does nothing else when no collector is bound, which is what building a
case outside a body - at load time, or inside an assertion that runs
later - looks like. #f is never recorded: a case a filter
dropped is not a case.
Return what collector recorded, in the order the items were built.
Return #t when value is a collector made by
make-collector.
Return values without the entries that are the same object as an earlier one.
Identity, not equality, decides: the same case built twice is two cases, while the same case both recorded and returned by one form is one.
Print and log every test outcome inside all-results using reporter client vc.
Iterates over the compilation of all-results. Evaluates types dynamically:
suite-result: Displays suite output, followed by inner test
results.
pre-test-result: Logs the test identity via vc and displays
inner assertions.
benchmark-result: Dispatches to log-benchmark.
Throws an explicit error if an unrecognized result type is processed.
Print the captured output of each record in assertion-results.
A record that is not an assertion gets printed as an error instead of bringing down the reporter.
Return the cases value stands for, in order, leaving out what is not one.
case? recognises a case, expand evaluates a thunk-shaped body form, lists (of any depth) are walked, and anything else - an unspecified value, a number, a nested task in a place that wants assertions - contributes nothing. depth bounds the recursion, so a thunk that keeps returning thunks is a value that is ignored rather than a run that never ends.
Flatten xs into a single list, however deeply it nests.
An atom that is not a list comes back wrapped in a one-element list.
Return environment variable var, or default when it is unset.
var is a symbol. Anything that goes wrong while reading it yields default as well.
Return a fresh collector: a mutable list head of recorded items.
Build the failed assertion-result reported for a timeout.
name is the timed task, timeout the seconds it was given and vc the client used to report it. A timeout fails the run exactly like any other failed assertion.
Return #t when proc can be called with no arguments at all.
A body form is wrapped in such a thunk by the DSL, and a thunk of this shape is therefore a body still to be evaluated rather than a case to run.
Return how many arguments proc needs, or #f when that is
unknown.
Guile reports a procedure’s arity as the list (required optional
rest?), or as several values on older versions; both are read here.
Next: (veritas reporter), Previous: (veritas model), Up: API