@@ -691,66 +691,67 @@ main = hspec
693 let makeOps t =
693 let makeOps t =
694− [ t
694+ [ ("default", t)
695#ifndef COVERAGE_BUILD
695#ifndef COVERAGE_BUILD
696− , t . maxRate 0
696+ , ("maxRate 10000", t . maxRate 10000)
697− , t . maxRate (-1)
697+ , ("maxRate -1", t . maxRate (-1))
698− , t . maxBuffer 0
698+ , ("maxBuffer 0", t . maxBuffer 0)
699− , t . maxBuffer 1
699+ , ("maxBuffer 1", t . maxBuffer 1)
700− , t . maxThreads 0
700+ , ("maxThreads 0", t . maxThreads 0)
701− , t . maxThreads 1
701+ , ("maxThreads 1", t . maxThreads 1)
702− , t . maxThreads (-1)
702+ , ("maxThreads -1", t . maxThreads (-1))
706+ let mapOps spec = mapM_ (\(desc, f) -> describe desc $ spec f)
706 let serialOps :: IsStream t => ((SerialT IO a -> t IO a) -> Spec) -> Spec
707 let serialOps :: IsStream t => ((SerialT IO a -> t IO a) -> Spec) -> Spec
707− serialOps = forM_ $ (makeOps serially)
708+ serialOps spec = mapOps spec $ (makeOps serially)
708#ifndef COVERAGE_BUILD
709#ifndef COVERAGE_BUILD
709− ++ [serially . maxRate 0.00000001]
710+ ++ [("maxRate 0.00000001", serially . maxRate 0.00000001)]
710− ++ [serially . maxBuffer (-1)]
711+ ++ [("maxBuffer -1", serially . maxBuffer (-1))]
712 let wSerialOps :: IsStream t => ((WSerialT IO a -> t IO a) -> Spec) -> Spec
713 let wSerialOps :: IsStream t => ((WSerialT IO a -> t IO a) -> Spec) -> Spec
713− wSerialOps = forM_ $ makeOps wSerially
714+ wSerialOps spec = mapOps spec $ makeOps wSerially
714#ifndef COVERAGE_BUILD
715#ifndef COVERAGE_BUILD
715− ++ [wSerially . maxRate 0.00000001]
716+ ++ [("maxRate 0.00000001", wSerially . maxRate 0.00000001)]
716− ++ [wSerially . maxBuffer (-1)]
717+ ++ [("maxBuffer (-1)", wSerially . maxBuffer (-1))]
718 let asyncOps :: IsStream t => ((AsyncT IO a -> t IO a) -> Spec) -> Spec
719 let asyncOps :: IsStream t => ((AsyncT IO a -> t IO a) -> Spec) -> Spec
719− asyncOps = forM_ $ makeOps asyncly
720+ asyncOps spec = mapOps spec $ makeOps asyncly
720#ifndef COVERAGE_BUILD
721#ifndef COVERAGE_BUILD
721− ++ [asyncly . maxRate 10000]
722+ ++ [("maxRate 10000", asyncly . maxRate 10000)]
722− ++ [asyncly . maxBuffer (-1)]
723+ ++ [("maxBuffer (-1)", asyncly . maxBuffer (-1))]
724 let wAsyncOps :: IsStream t => ((WAsyncT IO a -> t IO a) -> Spec) -> Spec
725 let wAsyncOps :: IsStream t => ((WAsyncT IO a -> t IO a) -> Spec) -> Spec
725− wAsyncOps = forM_ $ makeOps wAsyncly
726+ wAsyncOps spec = mapOps spec $ makeOps wAsyncly
726#ifndef COVERAGE_BUILD
727#ifndef COVERAGE_BUILD
727− ++ [wAsyncly . maxRate 10000]
728+ ++ [("maxRate 10000", wAsyncly . maxRate 10000)]
728− ++ [wAsyncly . maxBuffer (-1)]
729+ ++ [("maxBuffer (-1)", wAsyncly . maxBuffer (-1))]
730 let aheadOps :: IsStream t => ((AheadT IO a -> t IO a) -> Spec) -> Spec
731 let aheadOps :: IsStream t => ((AheadT IO a -> t IO a) -> Spec) -> Spec
731− aheadOps = forM_ $ makeOps aheadly
732+ aheadOps spec = mapOps spec $ makeOps aheadly
732#ifndef COVERAGE_BUILD
733#ifndef COVERAGE_BUILD
733− ++ [aheadly . maxRate 10000]
734+ -- ++ [("maxRate 10000", aheadly . maxRate 10000)]
734− ++ [aheadly . maxBuffer (-1)]
735+ -- ++ [("maxBuffer (-1)", aheadly . maxBuffer (-1))]
736 let parallelOps :: IsStream t => ((ParallelT IO a -> t IO a) -> Spec) -> Spec
737 let parallelOps :: IsStream t => ((ParallelT IO a -> t IO a) -> Spec) -> Spec
737− parallelOps = forM_ $ makeOps parallely
738+ parallelOps spec = mapOps spec $ makeOps parallely
738#ifndef COVERAGE_BUILD
739#ifndef COVERAGE_BUILD
739− ++ [parallely . maxRate 0.00000001]
740+ ++ [("maxRate 0.00000001", parallely . maxRate 0.00000001)]
740− ++ [parallely . maxBuffer (-1)]
741+ ++ [("maxBuffer (-1)", parallely . maxBuffer (-1))]
742 let zipSerialOps :: IsStream t => ((ZipSerialM IO a -> t IO a) -> Spec) -> Spec
743 let zipSerialOps :: IsStream t => ((ZipSerialM IO a -> t IO a) -> Spec) -> Spec
743− zipSerialOps = forM_ $ makeOps zipSerially
744+ zipSerialOps spec = mapOps spec $ makeOps zipSerially
744#ifndef COVERAGE_BUILD
745#ifndef COVERAGE_BUILD
745− ++ [zipSerially . maxRate 0.00000001]
746+ ++ [("maxRate 0.00000001", zipSerially . maxRate 0.00000001)]
746− ++ [zipSerially . maxBuffer (-1)]
747+ ++ [("maxBuffer (-1)", zipSerially . maxBuffer (-1))]
748 -- Note, the "pure" of applicative Zip streams generates and infinite
749 -- Note, the "pure" of applicative Zip streams generates and infinite
749 -- stream and therefore maxBuffer (-1) must not be used for that case.
750 -- stream and therefore maxBuffer (-1) must not be used for that case.
750 let zipAsyncOps :: IsStream t => ((ZipAsyncM IO a -> t IO a) -> Spec) -> Spec
751 let zipAsyncOps :: IsStream t => ((ZipAsyncM IO a -> t IO a) -> Spec) -> Spec
751− zipAsyncOps = forM_ $ makeOps zipAsyncly
752+ zipAsyncOps spec = mapOps spec $ makeOps zipAsyncly
752#ifndef COVERAGE_BUILD
753#ifndef COVERAGE_BUILD
753− ++ [zipAsyncly . maxRate 10000]
754+ ++ [("maxRate 10000", zipAsyncly . maxRate 10000)]
756 describe "Construction" $ do
757 describe "Construction" $ do
@@ -898,26 +899,27 @@ main = hspec
898 -- These tests won't work with maxBuffer or maxThreads set to 1, so we
899 -- These tests won't work with maxBuffer or maxThreads set to 1, so we
899 -- exclude those cases from these.
900 -- exclude those cases from these.
900 let mkOps t =
901 let mkOps t =
901− [ t
902+ [ ("default", t)
902#ifndef COVERAGE_BUILD
903#ifndef COVERAGE_BUILD
903− , t . maxRate 0
904+ , ("maxRate 0", t . maxRate 0)
904− , t . maxRate (-1)
905+ , ("maxRate -1", t . maxRate (-1))
905− , t . maxBuffer 0
906+ , ("maxBuffer 0", t . maxBuffer 0)
906− , t . maxThreads 0
907+ , ("maxThreads 0", t . maxThreads 0)
907− , t . maxThreads (-1)
908+ , ("maxThreads 0", t . maxThreads (-1))
912+ let forOps ops spec = forM_ ops (\(desc, f) -> describe desc $ spec f)
911 describe "Stream concurrent operations" $ do
913 describe "Stream concurrent operations" $ do
912− forM_ (mkOps aheadly) $ concurrentOps S.fromFoldable "aheadly" (==)
914+ forOps (mkOps aheadly) $ concurrentOps S.fromFoldable "aheadly" (==)
913− forM_ (mkOps asyncly) $ concurrentOps S.fromFoldable "asyncly" sortEq
915+ forOps (mkOps asyncly) $ concurrentOps S.fromFoldable "asyncly" sortEq
914− forM_ (mkOps wAsyncly) $ concurrentOps S.fromFoldable "wAsyncly" sortEq
916+ forOps (mkOps wAsyncly) $ concurrentOps S.fromFoldable "wAsyncly" sortEq
915− forM_ (mkOps parallely) $ concurrentOps S.fromFoldable "parallely" sortEq
917+ forOps (mkOps parallely) $ concurrentOps S.fromFoldable "parallely" sortEq
917− forM_ (mkOps aheadly) $ concurrentOps folded "aheadly folded" (==)
919+ forOps (mkOps aheadly) $ concurrentOps folded "aheadly folded" (==)
918− forM_ (mkOps asyncly) $ concurrentOps folded "asyncly folded" sortEq
920+ forOps (mkOps asyncly) $ concurrentOps folded "asyncly folded" sortEq
919− forM_ (mkOps wAsyncly) $ concurrentOps folded "wAsyncly folded" sortEq
921+ forOps (mkOps wAsyncly) $ concurrentOps folded "wAsyncly folded" sortEq
920− forM_ (mkOps parallely) $ concurrentOps folded "parallely folded" sortEq
922+ forOps (mkOps parallely) $ concurrentOps folded "parallely folded" sortEq
922 describe "Concurrent application" $ do
924 describe "Concurrent application" $ do
923 serialOps $ prop "serial" . concurrentApplication (==)
925 serialOps $ prop "serial" . concurrentApplication (==)
@@ -956,6 +958,11 @@ main = hspec
956 zipSerialOps $ transformCombineOpsOrdered S.fromFoldable "zipSerially" (==)
958 zipSerialOps $ transformCombineOpsOrdered S.fromFoldable "zipSerially" (==)
957 zipAsyncOps $ transformCombineOpsOrdered S.fromFoldable "zipAsyncly" (==)
959 zipAsyncOps $ transformCombineOpsOrdered S.fromFoldable "zipAsyncly" (==)
961+ serialOps $ transformCombineOpsOrdered folded "serially" (==)
962+ aheadOps $ transformCombineOpsOrdered folded "aheadly" (==)
963+ zipSerialOps $ transformCombineOpsOrdered folded "zipSerially" (==)
964+ zipAsyncOps $ transformCombineOpsOrdered folded "zipAsyncly" (==)
959 describe "Stream elimination operations" $ do
966 describe "Stream elimination operations" $ do
960 serialOps $ eliminationOps S.fromFoldable "serially"
967 serialOps $ eliminationOps S.fromFoldable "serially"
961 wSerialOps $ eliminationOps S.fromFoldable "wSerially"
968 wSerialOps $ eliminationOps S.fromFoldable "wSerially"