@@ -31,6 +31,7 @@ module Streamly.Test.Prelude.Common
3131 , constructWithConsM
3232 , constructWithFromPure
3333 , constructWithFromEffect
34+ , constructfromWAsync
3435 , simpleOps
3536 -- * Applicative operations
3637 , applicativeOps
@@ -290,6 +291,18 @@ constructWithFromIndicesM op len =
290291 streamEffect <- run $ readIORef mvl
291292 listEquals (==) streamEffect list
292293
294+constructfromWAsync ::
295+ S.WAsyncT IO Int -> S.WAsyncT IO Int-> [Int] -> Property
296+constructfromWAsync s1 s2 res =
297+ withMaxSuccess maxTestCount $
298+ monadicIO $ do
299+ x <- run
300+ $ S.toList
301+ $ S.fromWAsync
302+ $ S.maxThreads 1
303+ $ s1 `S.wAsync` s2
304+ equals (==) x res
305+
293306constructWithCons ::
294307 IsStream t
295308 => (Int -> t IO Int -> t IO Int)