code.test.base.process
attach-meta
added in 4.1
(attach-meta result meta-map form)attaches metadata to the result.
Preserves explicit :function, otherwise falls back to :refer, and finally infers a function symbol from the form.
collect
added in 3.0
(collect meta results)makes sure that all returned verified results are true (->> (compile/split ’(+ 1 1) => 2 (+ 1 2) => 3) (mapv process) (collect {})) => true
evaluate
added in 3.0
(evaluate {:keys [form value meta]})converts a form to a result
(->> (evaluate {:form ’(+ 1 2 3)}) (into {})) => (contains {:status :success, :data 6, :form ’(+ 1 2 3), :from :evaluate})
evaluate-on-error
added in 4.1
(evaluate-on-error meta)evaluates a debug form attached to metadata.
Returns the raw evaluation result, preserving the same namespace and timeout context as the original form.
infer-function
added in 4.1
(infer-function form)(infer-function form depth)infers the target function from a form.
Uses a bounded recursive walk so deeply nested forms do not blow the stack.
process
multimethod
added in 3.0
processes a form or a check (defn view-signal op (let output (atom nil) (h/signal:with-temp [:test (fn [{:keys result}] (reset! output (into {} result)))] (process op) @output)))
(view-signal {:type :form :form ’(+ 1 2 3) :meta {:line 10 :col 3}}) => (contains {:status :success, :data 6, :form ’(+ 1 2 3), :from :evaluate, :meta {:line 10, :col 3}})
((contains {:status :success, :data true, :checker base/checker? :actual 6, :from :verify, :meta nil}) (view-signal {:type :test-equal :input {:form ’(+ 1 2 3)} :output {:form ’even?}})) => true
run-check
added in 3.0
(run-check {:keys [unit refer], :as meta} body)runs a single check form