on 00a2f7b help sign in
665 lines 24 kB history raw
1module Main (main) where
3import Control.Exception (SomeException(..), displayException)
4import Data.Word (Word8, Word32, Word64)
5import Streamly.Test.Common (listEquals, checkListEqual, chooseInt)
6import Test.Hspec (Spec, hspec, describe)
7import Test.Hspec.QuickCheck
8import Test.QuickCheck
9 (arbitrary, forAll, elements, Property, property, listOf,
10 vectorOf, Gen, suchThat)
11import Test.QuickCheck.Monadic (monadicIO, assert, run)
13import Prelude hiding (sequence)
15import qualified Data.List as List
16import qualified Prelude
17import qualified Streamly.Internal.Data.Array.Storable.Foreign as A
18import qualified Streamly.Internal.Data.Fold as FL
19import qualified Streamly.Internal.Data.Parser as P
20import qualified Streamly.Internal.Data.Stream.IsStream as S
21import qualified Test.Hspec as H
23#if MIN_VERSION_QuickCheck(2,14,0)
25import Test.QuickCheck (chooseAny)
27#else
29import System.Random (Random(random))
30import Test.QuickCheck.Gen (Gen(MkGen))
32-- | Generates a random element over the natural range of `a`.
33chooseAny :: Random a => Gen a
34chooseAny = MkGen (\r _ -> let (x,_) = random r in x)
36#endif
39maxTestCount :: Int
40maxTestCount = 100
42min_value :: Int
43min_value = 0
45mid_value :: Int
46mid_value = 5000
48max_value :: Int
49max_value = 10000
51max_length :: Int
52max_length = 1000
54-- Accumulator Tests
56fromFold :: Property
57fromFold =
58 forAll (listOf $ chooseInt (min_value, max_value)) $ \ls ->
59 case (==) <$> (S.parse (P.fromFold FL.sum) (S.fromList ls)) <*> (S.fold FL.sum (S.fromList ls)) of
60 Right is_equal -> is_equal
61 Left _ -> False
63yield :: Property
64yield =
65 forAll (chooseInt (min_value, max_value)) $ \x ->
66 case S.parse (P.yield x) (S.fromList [1 :: Int]) of
67 Right r -> r == x
68 Left _ -> False
70yieldM :: Property
71yieldM =
72 forAll (chooseInt (min_value, max_value)) $ \x ->
73 case S.parse (P.yieldM $ return x) (S.fromList [1 :: Int]) of
74 Right r -> r == x
75 Left _ -> False
77die :: Property
78die =
79 property $
80 case S.parse (P.die "die test") (S.fromList [0 :: Int]) of
81 Right _ -> False
82 Left _ -> True
84dieM :: Property
85dieM =
86 property $
87 case S.parse (P.dieM (Right "die test")) (S.fromList [0 :: Int]) of
88 Right _ -> False
89 Left _ -> True
91parserFail :: Property
92parserFail =
93 property $
94 case S.parse (fail err) (S.fromList [0 :: Int]) of
95 Right _ -> False
96 Left (SomeException e) -> err == displayException e
97 where
98 err = "Testing MonadFail.fail."
100-- Element Parser Tests
102peekPass :: Property
103peekPass =
104 forAll (chooseInt (1, max_length)) $ \list_length ->
105 forAll (vectorOf list_length (chooseInt (min_value, max_value))) $ \ls ->
106 case S.parse P.peek (S.fromList ls) of
107 Right head_value -> case ls of
108 head_ls : _ -> head_value == head_ls
109 _ -> False
110 Left _ -> False
112peekFail :: Property
113peekFail =
114 property (case S.parse P.peek (S.fromList []) of
115 Right _ -> False
116 Left _ -> True)
118eofPass :: Property
119eofPass =
120 property (case S.parse P.eof (S.fromList []) of
121 Right _ -> True
122 Left _ -> False)
124eofFail :: Property
125eofFail =
126 forAll (chooseInt (1, max_length)) $ \list_length ->
127 forAll (vectorOf list_length (chooseInt (min_value, max_value))) $ \ls ->
128 case S.parse P.eof (S.fromList ls) of
129 Right _ -> False
130 Left _ -> True
132satisfyPass :: Property
133satisfyPass =
134 forAll (chooseInt (mid_value, max_value)) $ \first_element ->
135 forAll (listOf (chooseInt (min_value, max_value))) $ \ls_tail ->
136 let
137 ls = first_element : ls_tail
138 predicate = (>= mid_value)
139 in
140 case S.parse (P.satisfy predicate) (S.fromList ls) of
141 Right r -> r == first_element
142 Left _ -> False
144satisfy :: Property
145satisfy =
146 forAll (listOf (chooseInt (min_value, max_value))) $ \ls ->
147 case S.parse (P.satisfy predicate) (S.fromList ls) of
148 Right r -> case ls of
149 [] -> False
150 (x : _) -> predicate x && (r == x)
151 Left _ -> case ls of
152 [] -> True
153 (x : _) -> not $ predicate x
154 where
155 predicate = (>= mid_value)
157-- Sequence Parsers Tests
159takeEQPass :: Property
160takeEQPass =
161 forAll (chooseInt (min_value, max_value)) $ \n ->
162 forAll (chooseInt (n, max_value)) $ \list_length ->
163 forAll (vectorOf list_length (chooseInt (min_value, max_value))) $ \ls ->
164 case S.parse (P.takeEQ n FL.toList) (S.fromList ls) of
165 Right parsed_list -> checkListEqual parsed_list (Prelude.take n ls)
166 Left _ -> property False
168takeEQ :: Property
169takeEQ =
170 forAll (chooseInt (min_value, max_value)) $ \n ->
171 forAll (listOf (chooseInt (min_value, max_value))) $ \ls ->
172 let
173 list_length = Prelude.length ls
174 in
175 case S.parse (P.takeEQ n FL.toList) (S.fromList ls) of
176 Right parsed_list ->
177 if (n <= list_length) then
178 checkListEqual parsed_list (Prelude.take n ls)
179 else
180 property False
181 Left _ -> property (n > list_length)
183takeGEPass :: Property
184takeGEPass =
185 forAll (chooseInt (min_value, max_value)) $ \n ->
186 forAll (chooseInt (n, max_value)) $ \list_length ->
187 forAll (vectorOf list_length (chooseInt (min_value, max_value))) $ \ls ->
188 case S.parse (P.takeGE n FL.toList) (S.fromList ls) of
189 Right parsed_list -> checkListEqual parsed_list ls
190 Left _ -> property False
192takeGE :: Property
193takeGE =
194 forAll (chooseInt (min_value, max_value)) $ \n ->
195 forAll (listOf (chooseInt (min_value, max_value))) $ \ls ->
196 let
197 list_length = Prelude.length ls
198 in
199 case S.parse (P.takeGE n FL.toList) (S.fromList ls) of
200 Right parsed_list ->
201 if (n <= list_length) then
202 checkListEqual parsed_list ls
203 else
204 property False
205 Left _ -> property (n > list_length)
207nLessThanEqual0 ::
208 ( Int
209 -> FL.Fold (Either SomeException) Int [Int]
210 -> P.Parser (Either SomeException) Int [Int]
211 )
212 -> (Int -> [Int] -> [Int])
213 -> Property
214nLessThanEqual0 tk ltk =
215 forAll (elements [0, (-1)]) $ \n ->
216 forAll (listOf arbitrary) $ \ls ->
217 case S.parse (tk n FL.toList) (S.fromList ls) of
218 Right parsed_list -> checkListEqual parsed_list (ltk n ls)
219 Left _ -> property False
221takeProperties :: Spec
222takeProperties =
223 describe "take combinators when n <= 0/" $ do
224 prop "takeEQ n FL.toList = []" $
225 nLessThanEqual0 P.takeEQ (\_ -> const [])
226 prop "takeGE n FL.toList xs = xs" $
227 nLessThanEqual0 P.takeGE (\_ -> id)
229-- lookAheadPass :: Property
230-- lookAheadPass =
231-- forAll (chooseInt (min_value + 1, max_value)) $ \n ->
232-- let
233-- takeWithoutConsume = P.lookAhead $ P.take n FL.toList
234-- parseTwice = do
235-- parsed_list_1 <- takeWithoutConsume
236-- parsed_list_2 <- takeWithoutConsume
237-- return (parsed_list_1, parsed_list_2)
238-- in
239-- forAll (chooseInt (n, max_value)) $ \list_length ->
240-- forAll (vectorOf list_length (chooseInt (min_value, max_value))) $ \ls ->
241-- case S.parse parseTwice (S.fromList ls) of
242-- Right (ls_1, ls_2) -> checkListEqual ls_1 ls_2 .&&. checkListEqual ls_1 (Prelude.take n ls)
243-- Left _ -> property $ False
245-- lookAheadFail :: Property
246-- lookAheadFail =
247-- forAll (chooseInt (min_value + 1, max_value)) $ \n ->
248-- let
249-- takeWithoutConsume = P.lookAhead $ P.take n FL.toList
250-- parseTwice = do
251-- parsed_list_1 <- takeWithoutConsume
252-- parsed_list_2 <- takeWithoutConsume
253-- return (parsed_list_1, parsed_list_2)
254-- in
255-- forAll (chooseInt (min_value, n - 1)) $ \list_length ->
256-- forAll (vectorOf list_length (chooseInt (min_value, max_value))) $ \ls ->
257-- case S.parse parseTwice (S.fromList ls) of
258-- Right _ -> False
259-- Left _ -> True
261-- lookAhead :: Property
262-- lookAhead =
263-- forAll (chooseInt (min_value, max_value)) $ \n ->
264-- let
265-- takeWithoutConsume = P.lookAhead $ P.take n FL.toList
266-- parseTwice = do
267-- parsed_list_1 <- takeWithoutConsume
268-- parsed_list_2 <- takeWithoutConsume
269-- return (parsed_list_1, parsed_list_2)
270-- in
271-- forAll (listOf (chooseInt (min_value, max_value))) $ \ls ->
272-- case S.parse parseTwice (S.fromList ls) of
273-- Right (ls_1, ls_2) -> checkListEqual ls_1 ls_2 .&&. checkListEqual ls_1 (Prelude.take n ls)
274-- Left _ -> property ((list_length < n) || (list_length == n && n == 0))
275-- where
276-- list_length = Prelude.length ls
278takeWhile :: Property
279takeWhile =
280 forAll (listOf (chooseInt (0, 1))) $ \ ls ->
281 case S.parse (P.takeWhile predicate FL.toList) (S.fromList ls) of
282 Right parsed_list -> checkListEqual parsed_list (Prelude.takeWhile predicate ls)
283 Left _ -> property False
284 where
285 predicate = (== 0)
287takeWhile1 :: Property
288takeWhile1 =
289 forAll (listOf (chooseInt (0, 1))) $ \ ls ->
290 case S.parse (P.takeWhile1 predicate FL.toList) (S.fromList ls) of
291 Right parsed_list -> case ls of
292 [] -> property False
293 (x : _) ->
294 if predicate x then
295 checkListEqual parsed_list (Prelude.takeWhile predicate ls)
296 else
297 property False
298 Left _ -> case ls of
299 [] -> property True
300 (x : _) -> property (not $ predicate x)
301 where
302 predicate = (== 0)
304groupBy :: Property
305groupBy =
306 forAll (listOf (chooseInt (0, 1)))
307 $ \ls ->
308 case S.parse parser (S.fromList ls) of
309 Right parsed -> checkListEqual parsed (groupByLF ls)
310 Left _ -> property False
312 where
314 cmp = (==)
315 parser = P.groupBy cmp FL.toList
316 groupByLF lst
317 | null lst = []
318 | otherwise = head $ List.groupBy cmp lst
321wordBy :: Property
322wordBy =
323 forAll (listOf (elements [' ', 's']))
324 $ \ls ->
325 case S.parse parser (S.fromList ls) of
326 Right parsed -> checkListEqual parsed (words' ls)
327 Left _ -> property False
329 where
331 predicate = (== ' ')
332 parser = P.many FL.toList (P.wordBy predicate FL.toList)
333 words' lst =
334 let wrds = words lst
335 in if wrds == [] then [""] else wrds
337-- splitWithPass :: Property
338-- splitWithPass =
339-- forAll (listOf (chooseInt (0, 1))) $ \ls ->
340-- case S.parse (P.splitWith (,) (P.satisfy (== 0)) (P.satisfy (== 1))) (S.fromList ls) of
341-- Right (result_first, result_second) -> case ls of
342-- 0 : 1 : _ -> (result_first == 0) && (result_second == 1)
343-- _ -> False
344-- Left _ -> case ls of
345-- 0 : 1 : _ -> False
346-- _ -> True
348-- splitWithFailLeft :: Property
349-- splitWithFailLeft =
350-- property (case S.parse (P.splitWith (,) (P.die "die") (P.yield (1 :: Int))) (S.fromList [1 :: Int]) of
351-- Right _ -> False
352-- Left _ -> True)
354-- splitWithFailRight :: Property
355-- splitWithFailRight =
356-- property (case S.parse (P.splitWith (,) (P.yield (1 :: Int)) (P.die "die")) (S.fromList [1 :: Int]) of
357-- Right _ -> False
358-- Left _ -> True)
360-- splitWithFailBoth :: Property
361-- splitWithFailBoth =
362-- property (case S.parse (P.splitWith (,) (P.die "die") (P.die "die")) (S.fromList [1 :: Int]) of
363-- Right _ -> False
364-- Left _ -> True)
366-- teeWithPass :: Property
367-- teeWithPass =
368-- forAll (chooseInt (0, 10000)) $ \n ->
369-- forAll (listOf (chooseInt (0, 1))) $ \ls ->
370-- let
371-- prsr = P.take n FL.toList
372-- in
373-- case S.parse (P.teeWith (,) prsr prsr) (S.fromList ls) of
374-- Right (ls_1, ls_2) -> checkListEqual (Prelude.take n ls) ls_1 .&&. checkListEqual ls_1 ls_2
375-- Left _ -> property False
377-- teeWithFailLeft :: Property
378-- teeWithFailLeft =
379-- property (case S.parse (P.teeWith (,) (P.die "die") (P.yield (1 :: Int))) (S.fromList [1 :: Int]) of
380-- Right _ -> False
381-- Left _ -> True)
383-- teeWithFailRight :: Property
384-- teeWithFailRight =
385-- property (case S.parse (P.teeWith (,) (P.yield (1 :: Int)) (P.die "die")) (S.fromList [1 :: Int]) of
386-- Right _ -> False
387-- Left _ -> True)
389-- teeWithFailBoth :: Property
390-- teeWithFailBoth =
391-- property (case S.parse (P.teeWith (,) (P.die "die") (P.die "die")) (S.fromList [1 :: Int]) of
392-- Right _ -> False
393-- Left _ -> True)
395-- deintercalate :: Property
396-- deintercalate =
397-- forAll (listOf (chooseInt (0, 1))) $ \ls ->
398-- case S.parse (P.deintercalate concatFold prsr_1 concatFold prsr_2) (S.fromList ls) of
399-- Right parsed_list_tuple -> parsed_list_tuple == (partition (== 0) ls)
400-- Left _ -> False
402-- where
403-- prsr_1 = (P.takeWhile (== 0) FL.toList)
404-- prsr_2 = (P.takeWhile (== 1) FL.toList)
405-- concatFold = FL.Fold (\concatList curr_list -> return $ concatList ++ curr_list) (return []) return
407-- shortestPass :: Property
408-- shortestPass =
409-- forAll (listOf (chooseInt(min_value, max_value))) $ \ls ->
410-- let
411-- prsr_1 = P.takeWhile (<= (mid_value `Prelude.div` 2)) FL.toList
412-- prsr_2 = P.takeWhile (<= mid_value) FL.toList
413-- prsr_shortest = P.shortest prsr_1 prsr_2
414-- in
415-- case S.parse prsr_shortest (S.fromList ls) of
416-- Right short_list -> checkListEqual short_list (Prelude.takeWhile (<= 2500) ls)
417-- Left _ -> property False
419-- shortestFailLeft :: Property
420-- shortestFailLeft =
421-- property (case S.parse (P.shortest (P.die "die") (P.yield (1 :: Int))) (S.fromList [1 :: Int]) of
422-- Right r -> r == 1
423-- Left _ -> False)
425-- shortestFailRight :: Property
426-- shortestFailRight =
427-- property (case S.parse (P.shortest (P.yield (1 :: Int)) (P.die "die")) (S.fromList [1 :: Int]) of
428-- Right r -> r == 1
429-- Left _ -> False)
431-- shortestFailBoth :: Property
432-- shortestFailBoth =
433-- property (case S.parse (P.shortest (P.die "die") (P.die "die")) (S.fromList [1 :: Int]) of
434-- Right _ -> False
435-- Left _ -> True)
437many :: Property
438many =
439 forAll (listOf (chooseInt (0, 1))) $ \ls ->
440 let fldstp conL currL = return $ FL.Partial $ conL ++ currL
441 concatFold = FL.Fold fldstp (return []) return
442 prsr = P.many concatFold
443 $ P.fromFold $ FL.sliceSepBy (== 1) FL.toList
444 in
445 case S.parse prsr (S.fromList ls) of
446 Right res_list -> checkListEqual res_list (Prelude.filter (== 0) ls)
447 Left _ -> property False
449-- many_empty :: Property
450-- many_empty =
451-- property (case S.parse (P.many FL.toList (P.die "die")) (S.fromList [1 :: Int]) of
452-- Right res_list -> checkListEqual res_list ([] :: [Int])
453-- Left _ -> property False)
455some :: Property
456some =
457 forAll (listOf (chooseInt (0, 1))) $ \genLs ->
458 let
459 ls = 0 : genLs
460 concatFold = FL.Fold (\concatList curr_list -> return $ FL.Partial $ concatList ++ curr_list) (return []) return
461 prsr = P.some concatFold
462 $ P.fromFold $ FL.sliceSepBy (== 1) FL.toList
463 in
464 case S.parse prsr (S.fromList ls) of
465 Right res_list -> res_list == Prelude.filter (== 0) ls
466 Left _ -> False
468-- someFail :: Property
469-- someFail =
470-- property (case S.parse (P.some FL.toList (P.die "die")) (S.fromList [1 :: Int]) of
471-- Right _ -> False
472-- Left _ -> True)
474-------------------------------------------------------------------------------
475-- Instances
476-------------------------------------------------------------------------------
478-- XXX Remove "`suchThat` (\x -> length x > 0)) $ \ list1 ->" once FL.ltake is
479-- fixed.
480applicative :: Property
481applicative =
482 forAll (listOf (chooseAny :: Gen Int) `suchThat` (\x -> length x > 0)) $ \ list1 ->
483 forAll (listOf (chooseAny :: Gen Int)) $ \ list2 ->
484 let parser =
485 (,)
486 <$> P.fromFold (FL.ltake (length list1) FL.toList)
487 <*> P.fromFold (FL.ltake (length list2) FL.toList)
488 in monadicIO $ do
489 (olist1, olist2) <-
490 run $ S.parse parser (S.fromList $ list1 ++ list2)
491 listEquals (==) olist1 list1
492 listEquals (==) olist2 list2
494-- XXX Remove "`suchThat` (\x -> length x > 0)) $ \ list1 ->" once FL.ltake is
495-- fixed.
496sequence :: Property
497sequence =
498 forAll (vectorOf 11 (listOf (chooseAny :: Gen Int) `suchThat` (\x -> length x > 0))) $ \ ins ->
499 let p xs = P.fromFold (FL.ltake (length xs) FL.toList)
500 in monadicIO $ do
501 outs <- run $
502 S.parse
503 (Prelude.sequence $ fmap p ins)
504 (S.fromList $ concat ins)
505 listEquals (==) outs ins
507-- XXX Remove "`suchThat` (\x -> length x > 0)) $ \ list1 ->" once FL.ltake is
508-- fixed.
509monad :: Property
510monad =
511 forAll (listOf (chooseAny :: Gen Int) `suchThat` (\x -> length x > 0)) $ \ list1 ->
512 forAll (listOf (chooseAny :: Gen Int)) $ \ list2 ->
513 let parser = do
514 olist1 <- P.fromFold (FL.ltake (length list1) FL.toList)
515 olist2 <- P.fromFold (FL.ltake (length list2) FL.toList)
516 return (olist1, olist2)
517 in monadicIO $ do
518 (olist1, olist2) <-
519 run $ S.parse parser (S.fromList $ list1 ++ list2)
520 listEquals (==) olist1 list1
521 listEquals (==) olist2 list2
523-------------------------------------------------------------------------------
524-- Stream parsing
525-------------------------------------------------------------------------------
527parseMany :: Property
528parseMany =
529 forAll (chooseInt (1,100)) $ \len ->
530 forAll (listOf (vectorOf len (chooseAny :: Gen Int))) $ \ ins ->
531 monadicIO $ do
532 outs <- do
533 let p = P.fromFold $ FL.ltake len FL.toList
534 run
535 $ S.toList
536 $ S.parseMany p (S.fromList $ concat ins)
537 listEquals (==) outs ins
539-------------------------------------------------------------------------------
540-- Test for a particular case hit during fs events testing
541-------------------------------------------------------------------------------
543evId :: [Word8]
544evId = [96,238,17,9,0,0,0,0]
546evFlags :: [Word8]
547evFlags = [0,4,1,0,0,0,0,0]
549evPathLen :: [Word8]
550evPathLen = [71,0,0,0,0,0,0,0]
552evPath :: [Word8]
553evPath =
554 [47,85,115,101,114,115,47,118,111,108,47,118,101,109,98,97,47,99,111,109
555 ,112,111,115,101,119,101 ,108,108,45,116,101,99,104,47,69,110,103,47,112
556 ,114,111,106,101,99,116,115,47,115,116,114,101,97,109,108,121,47,115,116
557 ,114,101,97,109,108,121,47,116,109,112,47,122,122
558 ]
560event :: [Word8]
561event = evId ++ evFlags ++ evPathLen ++ evPath
563data Event = Event
564 { eventId :: Word64
565 , eventFlags :: Word32
566 , eventAbsPath :: A.Array Word8
567 } deriving (Show, Ord, Eq)
569readOneEvent :: P.Parser IO Word8 Event
570readOneEvent = do
571 arr <- P.takeEQ 24 (A.writeN 24)
572 let arr1 = A.unsafeCast arr :: A.Array Word64
573 eid = A.unsafeIndex arr1 0
574 eflags = A.unsafeIndex arr1 1
575 pathLen = fromIntegral $ A.unsafeIndex arr1 2
576 -- XXX handle if pathLen is 0
577 path <- P.takeEQ pathLen (A.writeN pathLen)
578 return $ Event
579 { eventId = eid
580 , eventFlags = fromIntegral eflags
581 , eventAbsPath = path
582 }
584parseMany2Events :: Property
585parseMany2Events =
586 monadicIO $ do
587 xs <-
588 ( run
589 $ S.toList
590 $ S.parseMany readOneEvent
591 $ S.fromList (concat (replicate 2 event))
592 )
593 assert (length xs == 2)
594 -- XXX assuming little endian machine
595 let ev = Event
596 { eventId = 152170080
597 , eventFlags = 66560
598 , eventAbsPath = A.fromList evPath
599 }
600 in listEquals (==) xs (replicate 2 ev)
602-------------------------------------------------------------------------------
603-- Main
604-------------------------------------------------------------------------------
606main :: IO ()
607main =
608 hspec $
609 H.parallel $
610 modifyMaxSuccess (const maxTestCount) $ do
611 describe "Instances" $ do
612 prop "applicative" applicative
613 prop "monad" monad
614 prop "sequence" sequence
616 describe "Stream parsing" $ do
617 prop "parseMany" parseMany
618 prop "parseMany2Events" parseMany2Events
620 describe "test for accumulator" $ do
621 prop "P.fromFold FL.sum = FL.sum" fromFold
622 prop "yield value provided" yield
623 prop "yield monadic value provided" yieldM
624 prop "fail err = Left (SomeException (ParseError err))" parserFail
625 prop "always fail" die
626 prop "always fail but monadic" dieM
628 describe "test for element parser" $ do
629 prop "peek = head with list length > 0" peekPass
630 prop "peek fail on []" peekFail
631 prop "eof pass on []" eofPass
632 prop "eof fail on non-empty list" eofFail
633 prop "first element exists and >= mid_value" satisfyPass
634 prop "check first element exists and satisfies predicate" satisfy
636 describe "test for sequence parser" $ do
637 prop "P.takeEQ = Prelude.take when len >= n" takeEQPass
638 prop "P.takeEQ = Prelude.take when len >= n and fail otherwise" Main.takeEQ
639 prop "P.takeGE n ls = ls when len >= n" takeGEPass
640 prop "P.takeGE n ls = ls when len >= n and fail otherwise" Main.takeGE
641 -- prop "lookAhead . take n >> lookAhead . take n = lookAhead . take n" lookAheadPass
642 -- prop "Fail when stream length exceeded" lookAheadFail
643 -- prop "lookAhead . take n >> lookAhead . take n = lookAhead . take n, else fail" lookAhead
644 prop "P.takeWhile = Prelude.takeWhile" Main.takeWhile
645 prop "P.takeWhile1 = Prelude.takeWhile if taken something, else check why failed" takeWhile1
646 prop "P.groupBy = Prelude.head . Prelude.groupBy" groupBy
647 prop "many (P.wordBy ' ') = words'" wordBy
648 -- prop "" splitWithPass
649 -- prop "" splitWithFailLeft
650 -- prop "" splitWithFailRight
651 -- prop "" splitWithFailBoth
652 -- prop "" teeWithPass
653 -- prop "" teeWithFailLeft
654 -- prop "" teeWithFailRight
655 -- prop "" teeWithFailBoth
656 -- prop "" deintercalate
657 -- prop "" shortestPass
658 -- prop "" shortestFailLeft
659 -- prop "" shortestFailRight
660 -- prop "" shortestFailBoth
661 prop "P.many concatFold $ P.sliceSepBy (== 1) FL.toList = Prelude.filter (== 0)" many
662 -- prop "[] due to parser being die" many_empty
663 prop "P.some concatFold $ P.sliceSepBy (== 1) FL.toList = Prelude.filter (== 0)" some
664 -- prop "fail due to parser being die" someFail
665 takeProperties