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

:double generates Long if :min is Long #1034

Open
frenchy64 opened this issue Apr 9, 2024 · 0 comments · May be fixed by #1052
Open

:double generates Long if :min is Long #1034

frenchy64 opened this issue Apr 9, 2024 · 0 comments · May be fixed by #1052

Comments

@frenchy64
Copy link
Contributor

I think this is a quirk of gen/double-gen*. Perhaps we could throw here or coerce the bounds to Double.

(defn shrink [?schema]
  (-> (quick-check 1 (for-all [s (mg/generator ?schema)] false) {:seed 0})
      :shrunk
      :smallest
      first))

((juxt class identity) (shrink [:double {:min 3}]))
;=> [java.lang.Long 3]
frenchy64 added a commit to frenchy64/malli that referenced this issue May 1, 2024
@frenchy64 frenchy64 linked a pull request May 1, 2024 that will close this issue
frenchy64 added a commit to frenchy64/malli that referenced this issue May 1, 2024
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 a pull request may close this issue.

1 participant