Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

limit number of keywords generated during test suite

  • Loading branch information...
commit 7b544ec73879f46975dd52f5d973690ba1f4a7a0 1 parent 6a49cca
Stuart Halloway authored
Showing with 10 additions and 1 deletion.
  1. +10 −1 test/clojure/test_clojure/generators.clj
View
11 test/clojure/test_clojure/generators.clj
@@ -61,6 +61,15 @@
[]
(gen/rand-nth (:records @shared-generation)))
+(def keyword-pool
+ (delay
+ (binding [gen/*rnd* (java.util.Random. 42)]
+ (into [] (repeatedly 1000 gen/keyword)))))
+
+(defn keyword-from-pool
+ []
+ (gen/rand-nth @keyword-pool))
+
(def ednable-scalars
[(constantly nil)
gen/byte
@@ -69,7 +78,7 @@
gen/printable-ascii-char
gen/string
gen/symbol
- gen/keyword
+ keyword-from-pool
gen/uuid
gen/date
gen/ratio
Please sign in to comment.
Something went wrong with that request. Please try again.