Skip to content

Commit

Permalink
Merge pull request #19 from plumatic/wildcard-keys-with-specific-keys-2
Browse files Browse the repository at this point in the history
Wildcard keys with specific keys 2
  • Loading branch information
gfredericks authored Jun 13, 2019
2 parents fd6f398 + f2df5b3 commit 1e779f7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
:url "http://www.eclipse.org/legal/epl-v10.html"}

:dependencies [[org.clojure/test.check "0.9.0"]
[prismatic/schema "1.1.7"]]
[prismatic/schema "1.1.11"]]

:profiles {:dev {:dependencies [[org.clojure/clojure "1.8.0"]
[org.clojure/clojurescript "1.10.520"]]
Expand Down
11 changes: 11 additions & 0 deletions test/schema_generators/generators_test.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,14 @@
(defspec readable-symbols-spec 1000
(properties/for-all [x (generators/generator s/Symbol)]
(-> x str read-string (= x))))

(def Issue16RegressionSchema
"A map where the wildcard keys are likely to collide with the
specific keys."
{:x s/Int
(s/enum :x :y :z) s/Bool})

;; regression test for issue #16
(defspec can-mix-wildcard-keys-with-specific-keys 50
(properties/for-all [m (generators/generator Issue16RegressionSchema)]
(is (number? (:x m)))))

0 comments on commit 1e779f7

Please sign in to comment.