on master help sign in
update description of tests
103e586Ahmed Zaheer Dadarkar
test/Streamly/Test/Internal/Data/Parser.hs+17−17
@@ -411,34 +411,34 @@ sliceSepBy =
411main :: IO ()
411main :: IO ()
412main = hspec $ do
412main = hspec $ do
413 describe "test for accumulator" $ do
413 describe "test for accumulator" $ do
414− prop "sum after parsing = sum after folding" fromFold
414+ prop "P.fromFold FL.sum = FL.sum" fromFold
415− prop "compare parser any with prelude any on predicate: list > mid_value" Main.any
415+ prop "P.any = Prelude.any" Main.any
416− prop "compare parser all with prelude all on predicate: list > mid_value" Main.all
416+ prop "P.all = Prelude.all" Main.all
417 prop "yield value provided" yield
417 prop "yield value provided" yield
418 prop "yield monadic value provided" yieldM
418 prop "yield monadic value provided" yieldM
419 prop "always fail" die
419 prop "always fail" die
420 prop "always fail but monadic" dieM
420 prop "always fail but monadic" dieM
421
421
422 describe "test for element parser" $ do
422 describe "test for element parser" $ do
423− prop "parsed value = head list when length list >= 1" peekPass
423+ prop "peek = head with list length > 0" peekPass
424− prop "peek fail on empty list" peekFail
424+ prop "peek fail on []" peekFail
425− prop "eof pass on empty list" eofPass
425+ prop "eof pass on []" eofPass
426 prop "eof fail on non-empty list" eofFail
426 prop "eof fail on non-empty list" eofFail
427 prop "first element exists and >= mid_value" satisfyPass
427 prop "first element exists and >= mid_value" satisfyPass
428 prop "check first element exists and satisfies predicate" satisfy
428 prop "check first element exists and satisfies predicate" satisfy
429
429
430 describe "test for sequence parser" $ do
430 describe "test for sequence parser" $ do
431− prop "compare parser take with prelude take with value n and list" Main.take
431+ prop "P.take = Prelude.take" Main.take
432− prop "takeEQ on list of length >= n" takeEQPass
432+ prop "P.takeEQ = Prelude.take when len >= n" takeEQPass
433− prop "takeEQ on arbitrary sized list and n" Main.takeEQ
433+ prop "P.takeEQ = Prelude.take when len >= n and fail otherwise" Main.takeEQ
434− prop "takeGE on list of length >= n" takeGEPass
434+ prop "P.takeGE n ls = ls when len >= n" takeGEPass
435− prop "takeGE on arbitrary sized list and n" Main.takeGE
435+ prop "P.takeGE n ls = ls when len >= n and fail otherwise" Main.takeGE
436− prop "parse stream twice without exceeding length of list, then check eq of lists" lookAheadPass
436+ prop "lookAhead . take n >> lookAhead . take n = lookAhead . take n" lookAheadPass
437− prop "parse stream and exceed the length of stream while parsing" lookAheadFail
437+ prop "exceed the length of stream" lookAheadFail
438− prop "parse stream twice, then check eq of lists if not failed, else check why failed" lookAhead
438+ prop "lookAhead . take n >> lookAhead . take n = lookAhead . take n, else fail" lookAhead
439− prop "compare takeWhile of parser and prelude on list and predicate" Main.takeWhile
439+ prop "P.takeWhile = Prelude.takeWhile" Main.takeWhile
440− prop "compare with prelude.takeWhile if taken something, else check why failed" takeWhile1
440+ prop "P.takeWhile = Prelude.takeWhile if taken something, else check why failed" takeWhile1
441− prop "collect zeros until we see one, do not include one" sliceSepBy
441+ prop "P.sliceSepBy = Prelude.takeWhile (not . predicate)" sliceSepBy
442 -- prop "test for sliceSepByMax function" sliceSepByMax
442 -- prop "test for sliceSepByMax function" sliceSepByMax
443 -- prop "pass test for splitWith function" splitWithPass
443 -- prop "pass test for splitWith function" splitWithPass
444 -- prop "left fail test for splitWith function" splitWithFailLeft
444 -- prop "left fail test for splitWith function" splitWithFailLeft