Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Utilities for defining your own validity Spec
s
You will need TypeApplications
to use these.
Synopsis
- nameOf :: forall a. Typeable a => String
- genDescr :: forall a. Typeable a => String -> String
- binRelStr :: forall a. Typeable a => String -> String
- shouldFail :: Property -> Property
- failsBecause :: String -> SpecWith () -> SpecWith ()
- newtype Anon a = Anon a
- shouldBeValid :: (Show a, Validity a) => a -> Expectation
- shouldBeInvalid :: (Show a, Validity a) => a -> Expectation
Documentation
shouldFail :: Property -> Property Source #
failsBecause :: String -> SpecWith () -> SpecWith () Source #
Asserts that a given Spec
tree fails _somewhere_.
It also shows the given string when reporting that the tree unexpectedly succeeded.
Anon a |
shouldBeValid :: (Show a, Validity a) => a -> Expectation #
shouldBeInvalid :: (Show a, Validity a) => a -> Expectation #