Created
March 23, 2015 18:25
-
-
Save cammckinnon/1c1a6d59e03846eb2512 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
expect :: (Eq a, Show a, Monad m) => a -> a -> m () | |
expect a b = do | |
if a == b then | |
return () | |
else | |
fail ("Expected " ++ (show a) ++ " but got " ++ (show b) ++ " instead.") | |
run_tests = do | |
expect 1 1 | |
expect 1 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment