Skip to content

Commit 6222987

Browse files
authored
traverseWithKey tests: Tweak QuickCheck test size (#519)
Otherwise these tests could OOM when run with an increased --quickcheck-max-size.
1 parent a404490 commit 6222987

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/Properties/HashMapLazy.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,12 +349,12 @@ tests =
349349
\(Fn f :: Fun A B) (m :: HMK A) -> isValid (HM.map f m)
350350
]
351351
, testGroup "traverseWithKey"
352-
[ testProperty "model" $ QC.mapSize (\s -> s `div` 8) $
352+
[ testProperty "model" $ QC.mapSize (\s -> min 18 $ div s 8) $
353353
\(x :: HMKI) ->
354354
let f k v = [keyToInt k + v + 1, keyToInt k + v + 2]
355355
ys = HM.traverseWithKey f x
356356
in List.sort (fmap toOrdMap ys) === List.sort (M.traverseWithKey f (toOrdMap x))
357-
, testProperty "valid" $ QC.mapSize (\s -> s `div` 8) $
357+
, testProperty "valid" $ QC.mapSize (\s -> min 18 $ div s 8) $
358358
\(x :: HMKI) ->
359359
let f k v = [keyToInt k + v + 1, keyToInt k + v + 2]
360360
ys = HM.traverseWithKey f x

0 commit comments

Comments
 (0)