(rewrite-async-assert env ast)cljs: drive the test body as a cloroutine (rcf#56). Each % becomes a (park-tap)
suspension; cloroutine.core/cr sequences control flow across it — if/cond/loop/recur
and try (including catch, which the in-house CPS refused); drive-tap feeds the async
queue's values back in; (RCF__done!) completes once at the tail. clj is untouched —
blocking % makes ordering irrelevant.
The root is the :let injected by maybe-add-queue-support / maybe-add-stars-support
(a :do only when neither wrapped the body — i.e. no %).
cljs: drive the test body as a cloroutine (rcf#56). Each `%` becomes a `(park-tap)` suspension; `cloroutine.core/cr` sequences control flow across it — if/cond/loop/recur and try (including catch, which the in-house CPS refused); `drive-tap` feeds the async queue's values back in; `(RCF__done!)` completes once at the tail. clj is untouched — blocking `%` makes ordering irrelevant. The root is the `:let` injected by `maybe-add-queue-support` / `maybe-add-stars-support` (a `:do` only when neither wrapped the body — i.e. no `%`).
(rewrite-doc env ast)Wrap doc-string sections in clojure.test/testing. A string statement followed by at
least one statement is a doc string; it labels the statements up to the NEXT doc
string (or block end) — sections are siblings, not nested, so a failing assertion
reports only its own section. A string in final position is a value, not a doc (it
has nothing to label). Consecutive doc strings yield an empty section, silently.
Wrap doc-string sections in `clojure.test/testing`. A string statement followed by at least one statement is a doc string; it labels the statements up to the NEXT doc string (or block end) — sections are siblings, not nested, so a failing assertion reports only its own section. A string in final position is a value, not a doc (it has nothing to label). Consecutive doc strings yield an empty section, silently.
(test-var v)Like clojure.test/test-var but return actual result.
Like `clojure.test/test-var` but return actual result.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |