File tree Expand file tree Collapse file tree 1 file changed +17
-14
lines changed Expand file tree Collapse file tree 1 file changed +17
-14
lines changed Original file line number Diff line number Diff line change @@ -101,8 +101,9 @@ Returns a collection of syms naming the vars instrumented."
101
101
`(instrument '[~@(s/speced-vars )]))
102
102
([xs]
103
103
`(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" )]
106
107
`(let [~opts-sym ~opts]
107
108
(reduce
108
109
(fn [ret# [_# f#]]
@@ -124,18 +125,20 @@ as in instrument. With no args, unstruments all instrumented vars.
124
125
Returns a collection of syms naming the vars unstrumented."
125
126
([]
126
127
`(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?))]))))
139
142
140
143
; (defmacro run-tests
141
144
; "Like run-all-tests, but scoped to specific namespaces, or to
You can’t perform that action at this time.
0 commit comments