metosin/malli

Double generator fails if `{:max (- Double/MAX_VALUE)}`

Open

#1,128 opened on Nov 24, 2024

View on GitHub
 (0 comments) (0 reactions) (0 assignees)Clojure (1,724 stars) (237 forks)batch import
buggeneratorhelp wanted

Description

;; underlying generators don't seem to handle these well
(m/validate [:<= (- Double/MAX_VALUE)] (- Double/MAX_VALUE))
;=> true
(mg/generate [:<= (- Double/MAX_VALUE)])
;Couldn't satisfy such-that predicate after 10 tries.

;; similar issue
(m/validate [:double {:max (- Double/MAX_VALUE)}] (- Double/MAX_VALUE))
;=> true
(mg/generate [:double {:max (- Double/MAX_VALUE)}])

Contributor guide