-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix false positive for
clojure.spec.alpha/every
Fixes #435
- Loading branch information
Showing
4 changed files
with
42 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
(ns testcases.constant-test.spec-every.green | ||
(:require | ||
[clojure.spec.gen.alpha :as gen] | ||
[clojure.test :refer [are deftest is join-fixtures testing use-fixtures]] | ||
[clojure.spec.alpha :as spec])) | ||
|
||
;; https://github.com/jonase/eastwood/issues/435 | ||
(spec/def ::some-spec (spec/map-of | ||
(spec/spec string? | ||
:gen (fn [] (gen/fmap | ||
#(apply str %) | ||
(gen/vector | ||
gen/char-alpha | ||
5 20)))) | ||
(spec/coll-of | ||
(spec/tuple ::source ::sub-type) | ||
:into #{} | ||
:min-count 2 | ||
:gen-max 7) | ||
:min-count 2 | ||
:gen-max 8)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters