8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents db8520e + 12437a0 commit 147e5ddCopy full SHA for 147e5dd
test/scalacheck/duration.scala
@@ -32,7 +32,10 @@ object DurationTest extends Properties("Division of Duration by Long") {
32
val genClose = for {
33
a <- weightedLong
34
if a != 0
35
- b <- choose(Long.MaxValue / a - 10, Long.MaxValue / a + 10)
+ val center = Long.MaxValue / a
36
+ b <-
37
+ if (center - 10 < center + 10) choose(center - 10, center + 10)
38
+ else choose(center + 10, center - 10) // deal with overflow if abs(a) == 1
39
} yield (a, b)
40
41
val genBorderline =
0 commit comments