Skip to content

Commit

Permalink
Fix unfoldr test: do not overflow Unicode range
Browse files Browse the repository at this point in the history
  • Loading branch information
Bodigrim committed Nov 10, 2020
1 parent 24094bb commit 4d9b403
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/Properties.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1297,7 +1297,7 @@ prop_unfoldrBB c =
forAll arbitrarySizedIntegral $ \n ->
(fst $ C.unfoldrN n fn c) == (C.pack $ take n $ unfoldr fn c)
where
fn x = Just (x, chr (ord x + 1))
fn x = Just (x, if x == maxBound then x else succ x)

prop_prefixBB xs ys = isPrefixOf xs ys == (P.pack xs `P.isPrefixOf` P.pack ys)
prop_prefixLL xs ys = isPrefixOf xs ys == (L.pack xs `L.isPrefixOf` L.pack ys)
Expand Down

0 comments on commit 4d9b403

Please sign in to comment.