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

Add array generator #1

Merged
merged 1 commit into from
Feb 25, 2024
Merged

Add array generator #1

merged 1 commit into from
Feb 25, 2024

Conversation

ohbarye
Copy link
Owner

@ohbarye ohbarye commented Feb 25, 2024

Changes

This adds an array generator that takes one generator of any element.

Pbt.forall(Pbt::Generator.array(Pbt::Generator.integer, min: 0, max: 10, empty: true)) do |numbers|
  raise if numbers.size > 2
end

@ohbarye ohbarye merged commit 9ce5ba2 into main Feb 25, 2024
@ohbarye ohbarye deleted the array-generator branch February 25, 2024 09:26
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.

1 participant