|
1 | 1 | {-# LANGUAGE CPP #-} |
2 | 2 | {-# LANGUAGE NoMonomorphismRestriction #-} |
| 3 | +{-# LANGUAGE NumericUnderscores #-} |
3 | 4 | {-# LANGUAGE PatternSynonyms #-} |
4 | 5 | {-# LANGUAGE ScopedTypeVariables #-} |
5 | 6 |
|
@@ -253,43 +254,45 @@ tests = |
253 | 254 | ] |
254 | 255 | , testGroup "isSubmapOf" |
255 | 256 | [ 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) |
257 | 260 | , 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 |
259 | 262 | , 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) |
261 | 264 | , testProperty "m1 ⊈ m2 ⇒ m1 ∪ m2 ⊈ m1" $ |
262 | 265 | \(m1 :: HMKI) m2 -> |
263 | | - QC.within 1000000 $ |
| 266 | + QC.within 1_000_000 $ |
264 | 267 | not (HM.isSubmapOf m1 m2) ==> HM.isSubmapOf m1 (HM.union m1 m2) |
265 | 268 | , testProperty "m1\\m2 ⊆ m1" $ |
266 | 269 | \(m1 :: HMKI) (m2 :: HMKI) -> |
267 | | - QC.within 1000000 $ |
| 270 | + QC.within 1_000_000 $ |
268 | 271 | HM.isSubmapOf (HM.difference m1 m2) m1 |
269 | 272 | , testProperty "m1 ∩ m2 ≠ ∅ ⇒ m1 ⊈ m1\\m2 " $ |
270 | 273 | \(m1 :: HMKI) (m2 :: HMKI) -> |
271 | | - QC.within 1000000 $ |
| 274 | + QC.within 1_000_000 $ |
272 | 275 | not (HM.null (HM.intersection m1 m2)) ==> |
273 | 276 | not (HM.isSubmapOf m1 (HM.difference m1 m2)) |
274 | 277 | , testProperty "delete k m ⊆ m" $ |
275 | 278 | \(m :: HMKI) -> |
276 | 279 | not (HM.null m) ==> |
277 | 280 | QC.forAll (QC.elements (HM.keys m)) $ \k -> |
278 | | - QC.within 1000000 $ |
| 281 | + QC.within 1_000_000 $ |
279 | 282 | HM.isSubmapOf (HM.delete k m) m |
280 | 283 | , testProperty "m ⊈ delete k m " $ |
281 | 284 | \(m :: HMKI) -> |
282 | 285 | not (HM.null m) ==> |
283 | 286 | QC.forAll (QC.elements (HM.keys m)) $ \k -> |
284 | | - QC.within 1000000 $ |
| 287 | + QC.within 1_000_000 $ |
285 | 288 | not (HM.isSubmapOf m (HM.delete k m)) |
286 | 289 | , testProperty "k ∉ m ⇒ m ⊆ insert k v m" $ |
287 | 290 | \k v (m :: HMKI) -> |
288 | | - QC.within 1000000 $ |
| 291 | + QC.within 1_000_000 $ |
289 | 292 | not (HM.member k m) ==> HM.isSubmapOf m (HM.insert k v m) |
290 | 293 | , testProperty "k ∉ m ⇒ insert k v m ⊈ m" $ |
291 | 294 | \k v (m :: HMKI) -> |
292 | | - QC.within 1000000 $ |
| 295 | + QC.within 1_000_000 $ |
293 | 296 | not (HM.member k m) ==> not (HM.isSubmapOf (HM.insert k v m) m) |
294 | 297 | ] |
295 | 298 | -- Combine |
|
0 commit comments