Shinmera / parachute

An extensible and cross-compatible testing framework.
https://shinmera.github.io/parachute
zlib License
94 stars 9 forks source link

comparator in IS macro not evaluated #37

Closed dkochmanski closed 1 year ago

dkochmanski commented 2 years ago

It is a subject of autoquoting, i.e

(is = 3 (+ 1 2))
(is (lambda (a b) (= a b)) 3 (+ 1 2))

but that does not work well with expressions that evaluate to a function, i.e

(is (rcurry #'member :test 'equalp) '(1 2 3) (iota 1 3))

autoquoting is a matter of fact, so requiring now to write

(is '= 3 (+ 1 2))

will break existing tests, so perhaps the comparator should be evaluated only when it is not an atom?

Shinmera commented 2 years ago

I don't remember all the ways the autoquoting is used, but that sounds like the most sensible solution, yeah. I'll try to look into it.