quicktheories / QuickTheories

Property based testing for Java 8
Apache License 2.0
505 stars 51 forks source link

Exclusive ranges #70

Open galderz opened 4 years ago

galderz commented 4 years ago

Is it possible to create a Doubles generator that does not include +Infinite and -Infinite? All the between/range methods take inclusive parameters. Would it be possible to have methods are exclusive? Obviously, you can't something like between(Double.NEGATIVE_INFINITY + 1, Double.POSITIVE_INFINITY - 1)

hyperpape commented 4 years ago

For Doubles, I believe you can use new DoublesDSL().between(-Double.MAX_VALUE, Double.MAX_VALUE).