uniform-io-1.2.0.0: test/Base.hs
{-# LANGUAGE OverloadedStrings #-}
module Base (simpleTest) where
import Distribution.TestSuite
import System.IO.Error
simpleTest :: String -> IO Progress -> Test
simpleTest n t =
let test = TestInstance
{run = t',
name = n,
tags = [],
options = [],
setOption = \_ _ -> Right test
}
in Test test
where
t' :: IO Progress
t' = catchIOError t (
\e -> return . Finished . Fail $ "Raised exception: " ++ show e
)