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 tuple arbitrary #6

Merged
merged 2 commits into from
Mar 30, 2024
Merged

Add tuple arbitrary #6

merged 2 commits into from
Mar 30, 2024

Conversation

ohbarye
Copy link
Owner

@ohbarye ohbarye commented Mar 30, 2024

Change

This pull request adds TupleArbitrary to handle a tuple of several arbitraries as one object.

Besides, this allows to pass multiple arbitraries to Pbt.property and its predicate method.

Pbt.assert do
  Pbt.property(Pbt.integer, Pbt.integer) do |x, y|
    raise if PbtTestTarget.biggest([x, y]) != [x, y].max
  end
end

@ohbarye ohbarye force-pushed the allow-tuple-arbitrary branch from a43b7c6 to e49b06a Compare March 30, 2024 09:45
@ohbarye ohbarye merged commit bbf373f into main Mar 30, 2024
3 checks passed
@ohbarye ohbarye deleted the allow-tuple-arbitrary branch March 30, 2024 09:51
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