-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Catchy combinators for HUnit -- -- Catchy combinators for HUnit: -- https://github.com/sol/test-shouldbe#readme @package test-shouldbe @version 0.2.1 -- | Introductory documentation: -- https://github.com/sol/test-shouldbe#readme module Test.HUnit.ShouldBe type Expectation = Assertion -- | actual `shouldBe` expected sets the expectation that -- actual is equal to expected (this is just an alias -- for @?=). shouldBe :: (Show a, Eq a) => a -> a -> Expectation -- | v `shouldSatisfy` p sets the expectation that p v is -- True. shouldSatisfy :: Show a => a -> (a -> Bool) -> Expectation -- | action `shouldReturn` expected sets the expectation that -- action returns expected. shouldReturn :: (Show a, Eq a) => IO a -> a -> Expectation -- | action `shouldThrow` selector sets the expectation that -- action throws an exception. The precise nature of the -- expected exception is described with a Selector. shouldThrow :: Exception e => IO a -> Selector e -> Expectation -- | A Selector is a predicate; it can simultaneously constrain -- the type and value of an exception. type Selector a = a -> Bool anyException :: Selector SomeException anyErrorCall :: Selector ErrorCall anyIOException :: Selector IOException anyArithException :: Selector ArithException errorCall :: String -> Selector ErrorCall -- | Experimental combinators, that may become part of the main -- distribution, if they turn out to be useful for a wider audience. module Test.HUnit.ShouldBe.Contrib isLeft :: Either a b -> Bool isRight :: Either a b -> Bool