hyperfiddle / rcf

RCF – a REPL-first, async test macro for Clojure/Script
MIT License
278 stars 12 forks source link

RCF rewriting varadic fns (fn [& xs]) wrong #65

Open dustingetz opened 2 years ago

dustingetz commented 2 years ago
(def vector' (fn [& xs] (apply vector xs)))
(tests
  (vector 1 2 3) := [1 2 3]
  (vector' 1 2 3) := [1 2 3])
✅✅
(tests
  (vector 1 2 3) := [1 2 3]
  (def vector' (fn [& xs] (apply vector xs)))
  (vector' 1 2 3) := [1 2 3])
✅
ERROR in () (:)
expected: (hyperfiddle.rcf/= (vector' 1 2 3) [1 2 3])
  actual: clojure.lang.ArityException: Wrong number of args (3) passed to: dustin.y2022.missionary-faq/eval8620/vector'--8625
dustingetz commented 2 years ago

Fixed in https://github.com/hyperfiddle/rcf/commit/83b90b423775220c2448513b11036b2a65ad17c7

dustingetz commented 2 years ago

reopening for unit tests