Skip to content

Commit 1a790ea

Browse files
committed
Gen.choose is never Double.NaN
Add an additional property check for original requester who asked that Gen.choose support for Double.{NegativeInfinity, PositiveInfinity}.
1 parent 4559da1 commit 1a790ea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jvm/src/test/scala/org/scalacheck/GenSpecification.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ object GenSpecification extends Properties("Gen") {
118118

119119
import Double.{MinValue, MaxValue}
120120
property("choose-large-double") = forAll(choose(MinValue, MaxValue)) { x =>
121-
MinValue <= x && x <= MaxValue
121+
MinValue <= x && x <= MaxValue && !x.isNaN
122122
}
123123

124124
import Double.{NegativeInfinity, PositiveInfinity}

0 commit comments

Comments
 (0)