talltale
talltale copied to clipboard
Generators Returning Same Value
Some generators always produce the same value when sampled.
(require '[clojure.spec.gen.alpha :as gen])
(require '[talltale.core :as tc])
;Returns a bunch of names
(gen/sample (tc/first-name-gen))
;Returns the same value. Each evaluation produces a new value, but that value is repeated for all samples.
(gen/sample (tc/date-of-birth-gen (tc/age)))
;Same behavior here
(gen/sample (tc/email-gen :en (tc/first-name) (tc/last-name)))
I would expect all samples to be different.