talltale icon indicating copy to clipboard operation
talltale copied to clipboard

Generators Returning Same Value

Open markbastian opened this issue 4 years ago • 0 comments

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.

markbastian avatar Jul 07 '20 16:07 markbastian