Skip to content

Commit 170edd3

Browse files
committed
traverseWithKey tests: Tweak QuickCheck test size
Otherwise these tests could OOM when run with an increased --quickcheck-max-size.
1 parent db40495 commit 170edd3

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
@@ -360,12 +360,12 @@ tests =
360360
\(Fn f :: Fun A B) (m :: HMK A) -> isValid (HM.map f m)
361361
]
362362
, testGroup "traverseWithKey"
363-
[ testProperty "model" $ QC.mapSize (\s -> s `div` 8) $
363+
[ testProperty "model" $ QC.mapSize (\s -> min 18 $ div s 8) $
364364
\(x :: HMKI) ->
365365
let f k v = [keyToInt k + v + 1, keyToInt k + v + 2]
366366
ys = HM.traverseWithKey f x
367367
in List.sort (fmap toOrdMap ys) === List.sort (M.traverseWithKey f (toOrdMap x))
368-
, testProperty "valid" $ QC.mapSize (\s -> s `div` 8) $
368+
, testProperty "valid" $ QC.mapSize (\s -> min 18 $ div s 8) $
369369
\(x :: HMKI) ->
370370
let f k v = [keyToInt k + v + 1, keyToInt k + v + 2]
371371
ys = HM.traverseWithKey f x

0 commit comments

Comments
 (0)