{- CSE 341, Haskell Trivial example of a unit test -} module Main where import HUnit test1 = TestCase (assertEqual "arithmetic test" (3+4) 7) test2 = TestCase (assertEqual "string test" ("squid" ++ "clam") "octopus") tests = TestList [TestLabel "test1" test1, TestLabel "aqua test" test2] runtests = runTestTT tests {- if we wanted to make this a standalone program we would want to have a function called main, as follows: main = do runTestTT tests (The 'do' part says that this is doing IO -- more on that later.) -}