File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -101,8 +101,9 @@ Returns a collection of syms naming the vars instrumented."
101101 `(instrument '[~@(s/speced-vars )]))
102102 ([xs]
103103 `(instrument ~xs nil ))
104- ([[quote sym-or-syms] opts]
105- (let [opts-sym (gensym " opts" )]
104+ ([sym-or-syms opts]
105+ (let [sym-or-syms (eval sym-or-syms)
106+ opts-sym (gensym " opts" )]
106107 `(let [~opts-sym ~opts]
107108 (reduce
108109 (fn [ret# [_# f#]]
@@ -124,18 +125,20 @@ as in instrument. With no args, unstruments all instrumented vars.
124125Returns a collection of syms naming the vars unstrumented."
125126 ([]
126127 `(unstrument '[~@(deref instrumented-vars)]))
127- ([[quote sym-or-syms]]
128- `(reduce
129- (fn [ret# f#]
130- (let [sym# (f# )]
131- (cond-> ret# sym# (conj sym#))))
132- []
133- [~@(->> (collectionize sym-or-syms)
134- (map
135- (fn [sym]
136- (when (symbol? sym)
137- `(fn [] (unstrument-1 '~sym)))))
138- (remove nil?))])))
128+ ([sym-or-syms]
129+ (let [sym-or-syms (eval sym-or-syms)]
130+ `(reduce
131+ (fn [ret# f#]
132+ (let [sym# (f# )]
133+ (cond-> ret# sym# (conj sym#))))
134+ []
135+ [~@(->> (collectionize sym-or-syms)
136+ (map
137+ (fn [sym]
138+ (when (symbol? sym)
139+ `(fn []
140+ (unstrument-1 '~sym)))))
141+ (remove nil?))]))))
139142
140143; (defmacro run-tests
141144; "Like run-all-tests, but scoped to specific namespaces, or to
You can’t perform that action at this time.
0 commit comments