Created
December 31, 2016 16:35
-
-
Save deque-blog/64d1a418f8b03ed55073fa53caab4732 to your computer and use it in GitHub Desktop.
This file contains hidden or 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