Skip to main content

sorted-set

function

clojure.test.check.generators/sorted-set

(sorted-set [gen] [gen opts])
Generates a sorted set of elements from the given generator. If the generator cannot or is unlikely to produce enough distinct elements, this generator will fail in the same way as `such-that`. Available options: :num-elements the fixed size of generated set :min-elements the min size of generated set :max-elements the max size of generated set :max-tries the number of times the generator will be tried before failing when it does not produce distinct elements (default 10) :ex-fn a function of one arg that will be called if test.check cannot generate enough distinct values; it will be passed a map with `:gen`, `:num-elements`, and `:max-tries` and should return an exception

No examples yet. Be the first to add one!