Could anybody explain please why I can't get a sample of falses or
quoted nils / falses here?
foo.core> (clojure-version)
"1.10.0"
foo.core> (require '[clojure.spec.gen.alpha :as gen]
'[clojure.spec.alpha :as s])
nil
foo.core> (gen/sample (s/gen #{'nil}))
Error printing return value (ExceptionInfo) at
clojure.test.check.generators/such-that-helper (generators.cljc:320).
Couldn't satisfy such-that predicate after 100 tries.
Other interesting and/or relevant cases are:
foo.core> (gen/sample (s/gen #{'n}))
(n n n n n n n n n n)
foo.core> (gen/sample (s/gen #{true}))
(true true true true true true true true true true)
foo.core> (gen/sample (s/gen #{'true}))
(true true true true true true true true true true)
foo.core> (gen/sample (s/gen #{false}))
Error printing return value (ExceptionInfo) at
clojure.test.check.generators/such-that-helper (generators.cljc:320).
Couldn't satisfy such-that predicate after 100 tries.
foo.core> (gen/sample (s/gen #{'false}))
Error printing return value (ExceptionInfo) at
clojure.test.check.generators/such-that-helper (generators.cljc:320).
Couldn't satisfy such-that predicate after 100 tries.
foo.core> (gen/sample (s/gen #{nil}))
Error printing return value (ExceptionInfo) at
clojure.test.check.generators/such-that-helper (generators.cljc:320).
Couldn't satisfy such-that predicate after 100 tries.
Thanx
--
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.