From 84ced1506a929928ebd78579bd6a81ab4b6e611e Mon Sep 17 00:00:00 2001 From: William Rusnack Date: Tue, 27 Feb 2024 23:40:25 -0500 Subject: [PATCH] Added all types to inits and tails tests, removed extream benchmark --- mono-traversable/bench/InitTails.hs | 1 - mono-traversable/test/Main.hs | 12 ++++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/mono-traversable/bench/InitTails.hs b/mono-traversable/bench/InitTails.hs index 4c98c8dc..1a6a7213 100644 --- a/mono-traversable/bench/InitTails.hs +++ b/mono-traversable/bench/InitTails.hs @@ -64,7 +64,6 @@ bmg = bgroup (testLabel @seq) $ bm <$> labelledLengths , ("small", [100,150,200,300]) , ("medium", [1000,1500,2000,2500]) , ("large", [10000,20000,50000]) - , ("extream", [1000000]) ] class Typeable a => TestLabel a where diff --git a/mono-traversable/test/Main.hs b/mono-traversable/test/Main.hs index 4b39b20b..e862269f 100644 --- a/mono-traversable/test/Main.hs +++ b/mono-traversable/test/Main.hs @@ -216,22 +216,30 @@ main = hspec $ do it "empty" $ inits emptyTyp @?= [""] it "one element" $ inits ("a" <> emptyTyp) @?= ["", "a"] it "two elements" $ inits ("ab" <> emptyTyp) @?= ["", "a", "ab"] + test "String" (mempty :: String) test "StrictBytestring" S.empty test "LazyBytestring" L.empty test "StrictText" T.empty test "LazyText" TL.empty - test "String" (mempty :: String) + test "Seq" Seq.empty + test "Vector" (mempty :: V.Vector Char) + test "Unboxed Vector" (mempty :: U.Vector Char) + test "Storable Vector" (mempty :: VS.Vector Char) describe "tails" $ do let test typ emptyTyp = describe typ $ do it "empty" $ tails emptyTyp @?= [""] it "one element" $ tails ("a" <> emptyTyp) @?= ["a", ""] it "two elements" $ tails ("ab" <> emptyTyp) @?= ["ab", "b", ""] + test "String" (mempty :: String) test "StrictBytestring" S.empty test "LazyBytestring" L.empty test "StrictText" T.empty test "LazyText" TL.empty - test "String" (mempty :: String) + test "Seq" Seq.empty + test "Vector" (mempty :: V.Vector Char) + test "Unboxed Vector" (mempty :: U.Vector Char) + test "Storable Vector" (mempty :: VS.Vector Char) describe "initTails" $ do let test typ emptyTyp = describe typ $ do