on master help sign in
Fix zip tests

Parallel generation of streams can have unpredictable order. So use serial instead.

commit5fe54c6ca9ac790485abc29bfe1ce26d1874f2cd authorHarendra Kumar <harendra.kumar@gmail.com> dateThu 26 Oct 2017, 13:14 (9 years ago) parent10b05b5
1 file changed+3−3
test/Main.hs+3−3
test/Main.hs+3−3
@@ -363,19 +363,19 @@ zipOps :: (Streaming t, Applicative (t IO))
363363 -> Spec
364364zipOps z zM app = do
365365 it "zipWith" $
366− let s1 = foldMapWith (<|>) return [1..10]
366+ let s1 = foldMapWith (<>) return [1..10]
367367 s2 = foldMapWith (<>) return [1..]
368368 in toListSerial (z (+) s1 s2)
369369 `shouldReturn` ([2,4..20] :: [Int])
370370
371371 it "zipWithM" $
372− let s1 = foldMapWith (<|>) return [1..10]
372+ let s1 = foldMapWith (<>) return [1..10]
373373 s2 = foldMapWith (<>) return [1..]
374374 in toListSerial (zM (\a b -> return (a + b)) s1 s2)
375375 `shouldReturn` ([2,4..20] :: [Int])
376376
377377 it "Applicative zip" $
378− let s1 = adapt $ serially $ foldMapWith (<|>) return [1..10]
378+ let s1 = adapt $ serially $ foldMapWith (<>) return [1..10]
379379 s2 = adapt $ serially $ foldMapWith (<>) return [1..]
380380 in (A.toList . app) ((+) <$> s1 <*> s2)
381381 `shouldReturn` ([2,4..20] :: [Int])