Copyright  (c) Pawel Nosal 2021 

License  MIT 
Maintainer  p.nosal1986@gmail.com 
Stability  experimental 
Safe Haskell  SafeInferred 
Language  Haskell2010 
Extensions 

This library aims to provide a set of combinators to assert List type.
Synopsis
 shouldHaveSameSizeAs :: HasCallStack => [a] > Assertion [a]
 shouldHaveSizeLowerOrEqual :: HasCallStack => Int > Assertion [a]
 shouldStartWith :: (Eq a, Show a, HasCallStack) => [a] > Assertion [a]
 shouldNotStartWith :: (Eq a, Show a, HasCallStack) => [a] > Assertion [a]
 shouldBeSameAs :: (Eq a, HasCallStack, Show a) => [a] > Assertion [a]
 shouldContain :: (Eq a, HasCallStack, Show a) => a > Assertion [a]
 shouldNotContain :: (Eq a, HasCallStack, Show a) => a > Assertion [a]
 shouldHaveSameElements :: (HasCallStack, Eq a, Show a) => [a] > Assertion [a]
Documentation
shouldHaveSameSizeAs :: HasCallStack => [a] > Assertion [a] Source #
assert if given list has same length as expected list
assertThat [1..10] $ shouldHaveSameSizeAs [0..10]
shouldHaveSizeLowerOrEqual :: HasCallStack => Int > Assertion [a] Source #
verify if the given list has a length lower or equal to expected value
assertThat [1..10] $ shouldHaveSizeLowerOrEqual 10
shouldStartWith :: (Eq a, Show a, HasCallStack) => [a] > Assertion [a] Source #
verify if the given list has expected prefix
assertThat [1..10] $ shouldStartWith [0..4]
shouldNotStartWith :: (Eq a, Show a, HasCallStack) => [a] > Assertion [a] Source #
verify if the given list does not start with prefix
assertThat [1..10] $ shouldNotStartWith [1..4]
shouldBeSameAs :: (Eq a, HasCallStack, Show a) => [a] > Assertion [a] Source #
shouldContain :: (Eq a, HasCallStack, Show a) => a > Assertion [a] Source #
shouldNotContain :: (Eq a, HasCallStack, Show a) => a > Assertion [a] Source #
shouldHaveSameElements :: (HasCallStack, Eq a, Show a) => [a] > Assertion [a] Source #
verify if the given list contains same elements as expected list in any order
assertThat [1..10] $ shouldNotStartWith [1..4]