This adds FixedHashArbitrary to generate/shrink a Hash.
Also this allows to pass keyword arbitrary to Pbt.property and its predicate method.
Pbt.assert do
Pbt.property(x: Pbt.integer, y: Pbt.integer) do |hash|
# use hash
end
end
Note: I wanted to pass keyword arguments with destructuring but Ractor doesn't allow the usage. Ractor interprets the keyword arguments as its own and raises ArgumentError.
Pbt.property(x: Pbt.integer, y: Pbt.integer) do |x:, y:|
# use x, y
end
Change
This adds FixedHashArbitrary to generate/shrink a Hash.
Also this allows to pass keyword arbitrary to
Pbt.property
and its predicate method.Note: I wanted to pass keyword arguments with destructuring but Ractor doesn't allow the usage. Ractor interprets the keyword arguments as its own and raises ArgumentError.