on master help sign in
update description of tests
commit103e5863c885d3738d5c8b05d81db63589a51945 authorAhmed Zaheer Dadarkar <ahmed.dadarkar@gmail.com> dateMon 8 Jun 2020, 20:42 (6 years ago) parent14f4dcd
1 file changed+17−17
test/Streamly/Test/Internal/Data/Parser.hs+17−17
test/Streamly/Test/Internal/Data/Parser.hs+17−17
@@ -411,34 +411,34 @@ sliceSepBy =
411411main :: IO ()
412412main = hspec $ do
413413 describe "test for accumulator" $ do
414− prop "sum after parsing = sum after folding" fromFold
415− prop "compare parser any with prelude any on predicate: list > mid_value" Main.any
416− prop "compare parser all with prelude all on predicate: list > mid_value" Main.all
414+ prop "P.fromFold FL.sum = FL.sum" fromFold
415+ prop "P.any = Prelude.any" Main.any
416+ prop "P.all = Prelude.all" Main.all
417417 prop "yield value provided" yield
418418 prop "yield monadic value provided" yieldM
419419 prop "always fail" die
420420 prop "always fail but monadic" dieM
421421
422422 describe "test for element parser" $ do
423− prop "parsed value = head list when length list >= 1" peekPass
424− prop "peek fail on empty list" peekFail
425− prop "eof pass on empty list" eofPass
423+ prop "peek = head with list length > 0" peekPass
424+ prop "peek fail on []" peekFail
425+ prop "eof pass on []" eofPass
426426 prop "eof fail on non-empty list" eofFail
427427 prop "first element exists and >= mid_value" satisfyPass
428428 prop "check first element exists and satisfies predicate" satisfy
429429
430430 describe "test for sequence parser" $ do
431− prop "compare parser take with prelude take with value n and list" Main.take
432− prop "takeEQ on list of length >= n" takeEQPass
433− prop "takeEQ on arbitrary sized list and n" Main.takeEQ
434− prop "takeGE on list of length >= n" takeGEPass
435− prop "takeGE on arbitrary sized list and n" Main.takeGE
436− prop "parse stream twice without exceeding length of list, then check eq of lists" lookAheadPass
437− prop "parse stream and exceed the length of stream while parsing" lookAheadFail
438− prop "parse stream twice, then check eq of lists if not failed, else check why failed" lookAhead
439− prop "compare takeWhile of parser and prelude on list and predicate" Main.takeWhile
440− prop "compare with prelude.takeWhile if taken something, else check why failed" takeWhile1
441− prop "collect zeros until we see one, do not include one" sliceSepBy
431+ prop "P.take = Prelude.take" Main.take
432+ prop "P.takeEQ = Prelude.take when len >= n" takeEQPass
433+ prop "P.takeEQ = Prelude.take when len >= n and fail otherwise" Main.takeEQ
434+ prop "P.takeGE n ls = ls when len >= n" takeGEPass
435+ prop "P.takeGE n ls = ls when len >= n and fail otherwise" Main.takeGE
436+ prop "lookAhead . take n >> lookAhead . take n = lookAhead . take n" lookAheadPass
437+ prop "exceed the length of stream" lookAheadFail
438+ prop "lookAhead . take n >> lookAhead . take n = lookAhead . take n, else fail" lookAhead
439+ prop "P.takeWhile = Prelude.takeWhile" Main.takeWhile
440+ prop "P.takeWhile = Prelude.takeWhile if taken something, else check why failed" takeWhile1
441+ prop "P.sliceSepBy = Prelude.takeWhile (not . predicate)" sliceSepBy
442442 -- prop "test for sliceSepByMax function" sliceSepByMax
443443 -- prop "pass test for splitWith function" splitWithPass
444444 -- prop "left fail test for splitWith function" splitWithFailLeft