Skip to content

G.choose shrinking results in values out of range #29

Description

@aburgel

Hi, I noticed when I use G.choose(range), during the shrinking process, I see values outside of the range. Is that expected?

Here's an example:

PropCheck.forall(G.choose(20..50)) do |x|
  raise if x.even?
end

And here's the output:

Failed on: 
`42
`

Exception message:
---
---


Shrunken input (after 13 shrink steps):
`0
`

I would expect the values to stay in range, in other words between 20 and 50, not 0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions