Hello all, about generative testing, what is the best way to generate bunch of string with id like "prefix-" and random string with fixed size, like "prefix-12345"?
(gen/sample (gen/fmap #(apply str "prefix-" %) (gen/vector gen/char-alpha 10)) 10)
("prefix-ZdcwIbtOmG" "prefix-ZWFWPnzpIc" "prefix-WxCRVcrErI" "prefix-toADesqefK" "prefix-dxbcfmdopi" "prefix-sKjscpYcGO" "prefix-MAUqsOYoIu" "prefix-AKJsCWkXca" "prefix-twnWfFkkLv" "prefix-LDqwqRYQbu")
hope that helps! 🙂
@dharrigan What is the lib did you use?
[org.clojure/test.check "0.9.0"]
thanks a lot
(:require [clojure.test.check.generators :as gen])
you're very welcome
.