Skip to content

Instantly share code, notes, and snippets.

@cammckinnon
Created March 23, 2015 18:25
Show Gist options
  • Save cammckinnon/1c1a6d59e03846eb2512 to your computer and use it in GitHub Desktop.
Save cammckinnon/1c1a6d59e03846eb2512 to your computer and use it in GitHub Desktop.
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