@@ -155,6 +155,19 @@ satisfy =
156 predicate = (>= mid_value)
156 predicate = (>= mid_value)
160+ forAll (chooseInt (1, max_value)) $ \int ->
161+ property (case S.parse P.next (S.fromList [int]) of
162+ Right (Just i) -> i == int
167+ property (case S.parse P.next (S.fromList []) of
168+ Right Nothing -> True
158-- Sequence Parsers Tests
171-- Sequence Parsers Tests
159takeBetweenPass :: Property
172takeBetweenPass :: Property
160takeBetweenPass =
173takeBetweenPass =
@@ -745,6 +758,8 @@ main =
745 prop "eof pass on []" eofPass
758 prop "eof pass on []" eofPass
746 prop "eof fail on non-empty list" eofFail
759 prop "eof fail on non-empty list" eofFail
747 prop "first element exists and >= mid_value" satisfyPass
760 prop "first element exists and >= mid_value" satisfyPass
761+ prop "next pass on [Int]" nextPass
762+ prop "next fail on []" next
748 prop "check first element exists and satisfies predicate" satisfy
763 prop "check first element exists and satisfies predicate" satisfy
750 describe "test for sequence parser" $ do
765 describe "test for sequence parser" $ do