metosin/malli

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

Aperta

#1128 aperta il 24 nov 2024

 (0 commenti) (0 reazioni) (0 assegnatari)Clojure (237 fork)batch import
buggeneratorhelp wanted

Metriche repository

Star
 (1724 stelle)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

;; 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)}])

Guida contributor