on master help sign in
21 lines 503 B history raw
1module Test
3import NumOps
5%access export -- to make the test functions visible
7assertEq : Eq a => (given : a) -> (expected : a) -> IO ()
8assertEq g e = if g == e
9 then putStrLn "Test Passed"
10 else putStrLn "Test Failed"
12assertNotEq : Eq a => (given : a) -> (expected : a) -> IO ()
13assertNotEq g e = if not (g == e)
14 then putStrLn "Test Passed"
15 else putStrLn "Test Failed"
17testDouble : IO ()
18testDouble = assertEq (double 2) 4
20testTriple : IO ()
21testTriple = assertNotEq (triple 2) 5