Copyright | (c) Pawel Nosal 2021 |
---|---|
License | MIT |
Maintainer | p.nosal1986@gmail.com |
Stability | experimental |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Synopsis
- assertThat :: HasCallStack => a -> Assertion' a b -> IO ()
- assertThat' :: HasCallStack => AssertionConfig -> a -> Assertion' a b -> IO ()
- assertThatIO :: HasCallStack => IO a -> Assertion' a b -> IO ()
- assertThatIO' :: HasCallStack => AssertionConfig -> IO a -> Assertion' a b -> IO ()
- assertThrown :: (HasCallStack, Exception e) => IO a -> ExceptionSelector e -> Assertion' e b -> IO ()
- assertThrown' :: (HasCallStack, Exception e) => AssertionConfig -> IO a -> ExceptionSelector e -> Assertion' e b -> IO ()
- assertThrows :: (HasCallStack, Exception e) => IO a -> ExceptionSelector e -> IO ()
- assertThrows' :: (HasCallStack, Exception e) => AssertionConfig -> IO a -> ExceptionSelector e -> IO ()
Assertion util functions for HSpec
assertThat :: HasCallStack => a -> Assertion' a b -> IO () Source #
Execute assertions against given subject under test.
assertThat' :: HasCallStack => AssertionConfig -> a -> Assertion' a b -> IO () Source #
A variant of assertThat
which allow to pass additional configuration.
assertThatIO :: HasCallStack => IO a -> Assertion' a b -> IO () Source #
Execute assertions against given subject under test extracted from IO action.
assertThatIO' :: HasCallStack => AssertionConfig -> IO a -> Assertion' a b -> IO () Source #
A variant of assertThatIO
which allow to pass additional configuration.
assertThrown :: (HasCallStack, Exception e) => IO a -> ExceptionSelector e -> Assertion' e b -> IO () Source #
Execute assertions against selected exception
assertThrown' :: (HasCallStack, Exception e) => AssertionConfig -> IO a -> ExceptionSelector e -> Assertion' e b -> IO () Source #
assertThrows :: (HasCallStack, Exception e) => IO a -> ExceptionSelector e -> IO () Source #
Verify if given IO
action throws expected exception.
assertThrows' :: (HasCallStack, Exception e) => AssertionConfig -> IO a -> ExceptionSelector e -> IO () Source #