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

:seqable generates nil when :min is greater than 0 #1121

Closed
frenchy64 opened this issue Nov 16, 2024 · 0 comments
Closed

:seqable generates nil when :min is greater than 0 #1121

frenchy64 opened this issue Nov 16, 2024 · 0 comments
Labels
generator Related to generators for property-based testing

Comments

@frenchy64
Copy link
Collaborator

frenchy64 commented Nov 16, 2024

(mg/generate [:seqable {:min 4 :max 4} :int] {:seed 0})
;=> nil

;; test
(dotimes [_ 100]
  (is (not-any? nil? (mg/sample [:seqable {:min 1} :any]))))
@frenchy64 frenchy64 changed the title :seqable generates nil when :min is greater than 0 :seqable generates nil and empty arrays when :min is greater than 0 Nov 16, 2024
@frenchy64 frenchy64 changed the title :seqable generates nil and empty arrays when :min is greater than 0 :seqable generates nil and arrays that violate count limits Nov 16, 2024
@frenchy64 frenchy64 changed the title :seqable generates nil and arrays that violate count limits :seqable generates nil when :min is greater than 0 Nov 16, 2024
@frenchy64 frenchy64 added the generator Related to generators for property-based testing label Nov 24, 2024
ikitommi added a commit that referenced this issue Dec 8, 2024
Close #1121: don't generate nil if :seqable is non-empty
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
generator Related to generators for property-based testing
Projects
Status: Done
Development

No branches or pull requests

1 participant