-- 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.0 -- | Introductory documentation: -- https://github.com/sol/test-shouldbe#readme module Test.HUnit.ShouldBe -- | actual `shouldBe` expected asserts that actual is -- equal to expected (this is just an alias for @?=). shouldBe :: (Show a, Eq a) => a -> a -> Assertion -- | v `shouldSatisfy` p asserts that p v is -- True. shouldSatisfy :: Show a => a -> (a -> Bool) -> Assertion -- | action `shouldReturn` expected asserts that action -- returns expected. shouldReturn :: (Show a, Eq a) => IO a -> a -> Assertion -- | action `shouldThrow` selector asserts that action -- throws an exception. The precise nature of that exception is described -- with a Selector. shouldThrow :: Exception e => IO a -> Selector e -> Assertion -- | 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