From 95c991b1bcf4a01b87497f87a578e5204e3ac55d Mon Sep 17 00:00:00 2001 From: jcmartin Date: Wed, 27 Nov 2024 18:24:46 -0800 Subject: [PATCH] groupBy test will also test with randomly generated function argument --- mono-traversable/test/Main.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mono-traversable/test/Main.hs b/mono-traversable/test/Main.hs index 5ea9791..8716659 100644 --- a/mono-traversable/test/Main.hs +++ b/mono-traversable/test/Main.hs @@ -150,13 +150,14 @@ main = hspec $ do ocompareLength (replicate i () :: [()]) j @?= compare i j describe "groupBy" $ do - let test name dummy = prop name $ \xs -> do + let test name dummy = prop name $ \xs (Fn2 g) -> do let seq' = fromListAs xs dummy let listDef f = Prelude.fmap fromList . List.groupBy f . otoList groupBy (==) seq' @?= listDef (==) seq' groupBy (/=) seq' @?= listDef (/=) seq' groupBy (<) seq' @?= listDef (<) seq' groupBy (>) seq' @?= listDef (>) seq' + groupBy g seq' @?= listDef g seq' test "works on lists" ([] :: [Char]) test "works on texts" ("" :: Text) test "works on strict bytestrings" S.empty