If you look at this example:
(defn wtv [in] (if (= 0 in) 0 10))
(s/fdef wtv
:args (s/cat :in int?)
:ret (s/and int? #(not= 0 %)))
(s/exercise-fn `wtv)
(s/conform `wtv (wtv 0))
You'll see that exercise gives you most of the time the following sample:
[(0) 0]
But this fails to conform:
=> (s/conform `wtv (wtv 0))
=> :clojure.spec/invalid
Also, why does exercise give repeated samples? Shouldn't they be unique?
([(0) 0]
[(-1) 10]
[(0) 0]
[(-1) 10]
[(-2) 10]
[(2) 10]
[(0) 0]
[(-1) 10]
[(-2) 10]
[(0) 0])
Thanks
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.