This article spurred me to explore HUnit a little more. So far I haven't figured out how to induce failures (as opposed to errors). I encoded my expectations in the test case names used in the fragment below.
import Test.HUnit
tests = TestList
[TestCase $ assertEqual "success" 1 $ head [1,2,3]
,TestCase $ assertEqual "failure" 1 $ head [2,3,4]
,TestCase $ assertEqual "error" 1 $ head []
]
