Skip to content

Commit 0797298

Browse files
committed
Extract the point generator.
1 parent 6798d62 commit 0797298

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/Data/IntervalSet/Test.hs

+3-2
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,15 @@ tests = testGroup "IntervalSet"
1818
[ testProperty "empty is null" . property $ I.null (empty @Int) === True
1919
, testGroup "insert"
2020
[ testProperty "idempotence" . property $ do
21-
let gp = Gen.int (Range.linear 0 100)
22-
gi = interval gp
21+
let gi = interval gp
2322
gs = intervalSet gi
2423
i <- forAll gi
2524
s <- insert i <$> forAll gs
2625
insert i s === s
2726
]
2827
]
28+
where
29+
gp = Gen.int (Range.linear 0 100)
2930

3031
interval :: (MonadGen m, Ord a) => m a -> m (Interval I a)
3132
interval p = mk <$> p <*> p

0 commit comments

Comments
 (0)