1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
-- | Test-suite framework and utility functions.
module TestUtils (
simpleMatch
) where
import Control.Monad
import System.Exit
simpleMatch :: String -> String -> String -> IO ()
simpleMatch test expected actual =
when (actual /= expected) $ do
putStrLn $ "Test `" ++ test ++ "' failed!"
putStrLn "-----------------------------"
putStrLn $ "Expected: " ++ expected
putStrLn "-----------------------------"
putStrLn $ "Actual: " ++ actual
putStrLn "-----------------------------"
exitFailure
|