File tree Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -139,3 +139,13 @@ Returns a collection of syms naming the vars unstrumented."
139
139
`(fn []
140
140
(unstrument-1 '~sym)))))
141
141
(remove nil?))]))))
142
+
143
+ ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; testing ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
144
+
145
+ (defmacro sym->check-map
146
+ [[quote s]]
147
+ (if-let [{:keys [name] :as v} (ana-api/resolve &env s)]
148
+ `{:s '~s
149
+ :v (var ~name)
150
+ :spec (s/get-spec (var ~name))}
151
+ `{:s '~s}))
Original file line number Diff line number Diff line change @@ -242,13 +242,6 @@ with explain-data + ::s/failure."
242
242
(finally
243
243
(when re-inst? (instrument s))))))
244
244
245
- (defn- sym->check-map
246
- [s]
247
- (let [v (resolve s)]
248
- {:s s
249
- :v v
250
- :spec (when v (s/get-spec v))}))
251
-
252
245
(defn- validate-check-opts
253
246
[opts]
254
247
(assert (every? ident? (keys (:gen opts))) " check :gen expects ident keys" ))
@@ -422,6 +415,8 @@ key with a count for each different :type of result."
422
415
(ranged-rand 8 5 )))
423
416
(foo 1 2 )
424
417
(m/unstrument-1 ranged-rand)
418
+
419
+ (m/sym->check-map 'ranged-rand)
425
420
)
426
421
427
422
You can’t perform that action at this time.
0 commit comments