Skip to content

Commit 2bcd2a8

Browse files
committed
Use NumericUnderscores for readability
1 parent 6a50dd6 commit 2bcd2a8

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

tests/Properties/HashMapLazy.hs

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{-# LANGUAGE CPP #-}
22
{-# LANGUAGE NoMonomorphismRestriction #-}
3+
{-# LANGUAGE NumericUnderscores #-}
34
{-# LANGUAGE PatternSynonyms #-}
45
{-# LANGUAGE ScopedTypeVariables #-}
56

@@ -253,43 +254,45 @@ tests =
253254
]
254255
, testGroup "isSubmapOf"
255256
[ testProperty "model" $
256-
\(x :: HMKI) y -> HM.isSubmapOf x y === M.isSubmapOf (toOrdMap x) (toOrdMap y)
257+
\(x :: HMKI) y ->
258+
QC.within 1_000_000 $
259+
HM.isSubmapOf x y === M.isSubmapOf (toOrdMap x) (toOrdMap y)
257260
, testProperty "m ⊆ m" $
258-
\(x :: HMKI) -> QC.within 1000000 $ HM.isSubmapOf x x
261+
\(x :: HMKI) -> QC.within 1_000_000 $ HM.isSubmapOf x x
259262
, testProperty "m1 ⊆ m1 ∪ m2" $
260-
\(x :: HMKI) y -> QC.within 1000000 $ HM.isSubmapOf x (HM.union x y)
263+
\(x :: HMKI) y -> QC.within 1_000_000 $ HM.isSubmapOf x (HM.union x y)
261264
, testProperty "m1 ⊈ m2 ⇒ m1 ∪ m2 ⊈ m1" $
262265
\(m1 :: HMKI) m2 ->
263-
QC.within 1000000 $
266+
QC.within 1_000_000 $
264267
not (HM.isSubmapOf m1 m2) ==> HM.isSubmapOf m1 (HM.union m1 m2)
265268
, testProperty "m1\\m2 ⊆ m1" $
266269
\(m1 :: HMKI) (m2 :: HMKI) ->
267-
QC.within 1000000 $
270+
QC.within 1_000_000 $
268271
HM.isSubmapOf (HM.difference m1 m2) m1
269272
, testProperty "m1 ∩ m2 ≠ ∅ ⇒ m1 ⊈ m1\\m2 " $
270273
\(m1 :: HMKI) (m2 :: HMKI) ->
271-
QC.within 1000000 $
274+
QC.within 1_000_000 $
272275
not (HM.null (HM.intersection m1 m2)) ==>
273276
not (HM.isSubmapOf m1 (HM.difference m1 m2))
274277
, testProperty "delete k m ⊆ m" $
275278
\(m :: HMKI) ->
276279
not (HM.null m) ==>
277280
QC.forAll (QC.elements (HM.keys m)) $ \k ->
278-
QC.within 1000000 $
281+
QC.within 1_000_000 $
279282
HM.isSubmapOf (HM.delete k m) m
280283
, testProperty "m ⊈ delete k m " $
281284
\(m :: HMKI) ->
282285
not (HM.null m) ==>
283286
QC.forAll (QC.elements (HM.keys m)) $ \k ->
284-
QC.within 1000000 $
287+
QC.within 1_000_000 $
285288
not (HM.isSubmapOf m (HM.delete k m))
286289
, testProperty "k ∉ m ⇒ m ⊆ insert k v m" $
287290
\k v (m :: HMKI) ->
288-
QC.within 1000000 $
291+
QC.within 1_000_000 $
289292
not (HM.member k m) ==> HM.isSubmapOf m (HM.insert k v m)
290293
, testProperty "k ∉ m ⇒ insert k v m ⊈ m" $
291294
\k v (m :: HMKI) ->
292-
QC.within 1000000 $
295+
QC.within 1_000_000 $
293296
not (HM.member k m) ==> not (HM.isSubmapOf (HM.insert k v m) m)
294297
]
295298
-- Combine

0 commit comments

Comments
 (0)