hspec-attoparsec 0.1.0.0 → 0.1.0.1
raw patch · 2 files changed
+9/−2 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
hspec-attoparsec.cabal view
@@ -1,5 +1,5 @@ name: hspec-attoparsec-version: 0.1.0.0+version: 0.1.0.1 synopsis: Utility functions for testing your attoparsec parsers with hspec description: This package provides some helper functions for testing attoparsec parsers with hspec. .
src/Test/Hspec/Attoparsec.hs view
@@ -30,7 +30,6 @@ ) where import Control.Monad (when)-import Data.Either (isLeft, isRight) import Test.Hspec.Attoparsec.Source import Test.Hspec.Expectations @@ -95,6 +94,14 @@ -> Expectation parser `shouldSucceedOn` string = (string ~> parser) `shouldSatisfy` isRight++isLeft :: Either a b -> Bool+isLeft (Left _) = True+isLeft _ = False++isRight :: Either a b -> Bool+isRight (Right _) = True+isRight _ = False -- | Checking that the given parser succeeds -- and yields the given part of the input unconsumed.