Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spec coll-of distinguish between set and vector data types #239

Merged
merged 2 commits into from
Jul 2, 2020

Conversation

wandersoncferreira
Copy link
Contributor

Fixes the bug reported at #237 . Seems like the function impl/coll-of-spec has a property called cpred which was default to coll? however, both sets and vectors returns true to coll?. I made a change to verify the type of argument passed to the function, so the cpred is chosen apropriately.

Thus the OP example now has the expected behavior:

(s/valid? (ds/spec ::x #{int?}) #{1 2 3})  ;; => true
(s/valid? (ds/spec ::x #{int?}) [1 2 3])  ;; => false

@codecov-commenter
Copy link

Codecov Report

Merging #239 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #239   +/-   ##
=======================================
  Coverage   86.23%   86.24%           
=======================================
  Files          14       14           
  Lines        1707     1708    +1     
  Branches      175      175           
=======================================
+ Hits         1472     1473    +1     
  Misses         60       60           
  Partials      175      175           
Impacted Files Coverage Δ
src/spec_tools/impl.cljc 87.77% <100.00%> (+0.06%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 877f4b8...503d534. Read the comment docs.

@ikitommi ikitommi merged commit a96abb4 into metosin:master Jul 2, 2020
@ikitommi
Copy link
Member

ikitommi commented Jul 2, 2020

Thanks!!

@brjann
Copy link

brjann commented Jul 7, 2020

Yes, thank you!!

@miikka
Copy link
Contributor

miikka commented Jul 24, 2020

Released in [metosin/spec-tools "0.10.4"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants