Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell98 |
Experimental combinators, that may become part of the main distribution, if they turn out to be useful for a wider audience.
- shouldNotBe :: (Show a, Eq a) => a -> a -> Expectation
- shouldNotSatisfy :: Show a => a -> (a -> Bool) -> Expectation
- shouldNotReturn :: (Show a, Eq a) => IO a -> a -> Expectation
- shouldNotContain :: (Show a, Eq a) => [a] -> [a] -> Expectation
- isLeft :: Either a b -> Bool
- isRight :: Either a b -> Bool
Additional combinators for setting expectations
shouldNotBe :: (Show a, Eq a) => a -> a -> Expectation infix 1 Source
actual `shouldNotBe` notExpected
sets the expectation that actual
is not
equal to notExpected
shouldNotSatisfy :: Show a => a -> (a -> Bool) -> Expectation infix 1 Source
v `shouldNotSatisfy` p
sets the expectation that p v
is False
.
shouldNotReturn :: (Show a, Eq a) => IO a -> a -> Expectation infix 1 Source
action `shouldNotReturn` notExpected
sets the expectation that action
does not return notExpected
.
shouldNotContain :: (Show a, Eq a) => [a] -> [a] -> Expectation infix 1 Source
list `shouldNotContain` sublist
sets the expectation that sublist
is not
contained anywhere in the second.
Predicates
(useful in combination with shouldSatisfy
)