Commit db214605 authored by ross's avatar ross

[project @ 2004-11-17 10:55:45 by ross]

catch other exceptions (e.g. overflow and pattern match failure), and
add take's to the tests for () -- GHC produces the wrong results for
enumFromThen () () and enumFromThenTo () () ().
parent 35123954
......@@ -247,16 +247,16 @@ testEnumUnit = do
printTest ((fromEnum ()))
-- enumFrom:
printTest (([()..]))
printTest ((take 7 [()..]))
-- enumFromThen:
printTest (([(),()..]))
printTest ((take 7 [(),()..]))
-- enumFromTo
printTest (([()..()]))
printTest ((take 7 [()..()]))
-- enumFromThenTo
printTest (([(),()..()]))
printTest ((take 7 [(),()..()]))
testEnumOrdering :: IO ()
testEnumOrdering = do
......@@ -511,6 +511,9 @@ testEnumRatioInt = do
mayBomb x = catchJust errorCalls x (\e -> putStrLn ("error " ++ show e))
`Control.Exception.catch` (\e -> case e of
PatternMatchFail _ -> putStrLn "Fail: pattern match failure"
_ -> putStrLn ("Fail: " ++ show e))
test :: Show a => String -> String -> a -> IO ()
test test_nm expected val = do
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment