This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
should_equal :: (Show t, Show a, Eq a) => (t -> a) -> a -> t -> Test | |
should_equal underTest expected input = | |
let label = "Expects " ++ show expected ++ " for " ++ show input | |
in TestCase $ assertEqual label expected (underTest input) | |
should_do_like :: (Show t, Show a, Eq a) => (t -> a) -> (t -> a) -> t -> Test | |
should_do_like underTest refFct input | |
= should_equal underTest (refFct input) input | |
for_all :: (a -> Test) -> [a] -> Test | |
for_all fct inputs = TestList (map fct inputs) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment