Shinmera / parachute

An extensible and cross-compatible testing framework.

Home Page:https://shinmera.github.io/parachute

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

comparator in IS macro not evaluated

dkochmanski opened this issue · comments

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?

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.