3 module Tests
.GLTests
where
7 foo
:: Int -> (Int, Int)
10 exampleTestUtilOne
:: Int -> IO (Int, Int)
11 exampleTestUtilOne v
= return (v
+2, v
+3)
13 exampleTestUtilTwo
:: Int -> IO Bool
14 exampleTestUtilTwo v
= return (v
> 5)
16 -----------------------------
18 -----------------------------
21 test1
= TestCase
(assertEqual
"Test Case - call foo 3):"
24 test2
= TestCase
(do (x
,y
) <- exampleTestUtilOne
3
25 assertEqual
"Test Case - for the first result of [TestOne]: " 5 x
26 b
<- exampleTestUtilTwo y
27 assertBool
("Test Case - [TestTwo]: " ++ show y
++ " failed") b
)
29 tests
= TestList
[ TestLabel
"Test 1" test1
,
30 TestLabel
"Test 2" test2
]