Skip to content

Instantly share code, notes, and snippets.

@sleepynate
Created July 15, 2011 16:02
Show Gist options
  • Save sleepynate/1084970 to your computer and use it in GitHub Desktop.
Save sleepynate/1084970 to your computer and use it in GitHub Desktop.
Make sure HUnit exists and is linked
{--
- Save this file as Main.hs and run with % runghc Main.hs
-}
module Main where
import Test.HUnit
derp = test [ "a silly test" ~: 'a' ~=? 'a' ]
tests = TestList [ derp ]
main::IO()
main = (runTestTT tests) >>= (\x -> putStrLn $ show x)
-- or ---------------------------------------------------------
{--
- paste this into ghci
-}
import Test.HUnit
let derp = test [ "a silly test" ~: 'a' ~=? 'a' ]
let tests = TestList [ derp ]
runTestTT tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment