diff options
author | Péter Diviánszky <divipp@gmail.com> | 2016-05-12 01:52:20 +0200 |
---|---|---|
committer | Péter Diviánszky <divipp@gmail.com> | 2016-05-12 01:52:20 +0200 |
commit | 1628049fc138d159fbbf6410b8a89920e2427951 (patch) | |
tree | 50a2c7015be2014c7ff109094168f19dfd9b56f3 /test/runTests.hs | |
parent | 66564f335975837f748f2eb86345b28eae9a8cc8 (diff) |
tweak error message
Diffstat (limited to 'test/runTests.hs')
-rw-r--r-- | test/runTests.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/runTests.hs b/test/runTests.hs index 10f5bcb0..159a2bfa 100644 --- a/test/runTests.hs +++ b/test/runTests.hs | |||
@@ -234,10 +234,11 @@ doTest Config{..} (i, fn) = do | |||
234 | Right (fname, ge, Right (ET e te)) | 234 | Right (fname, ge, Right (ET e te)) |
235 | | te == outputType -> Right ("compiled pipeline", prettyShowUnlines $ compilePipeline OpenGL33 (ET e te)) | 235 | | te == outputType -> Right ("compiled pipeline", prettyShowUnlines $ compilePipeline OpenGL33 (ET e te)) |
236 | | e == trueExp -> Right ("reducted main", de) | 236 | | e == trueExp -> Right ("reducted main", de) |
237 | | te == boolType -> Left (tab "!Failed" $ "main should be True but it is \n" ++ de, Failed) | 237 | | te == boolType -> Left (tab "!Failed" $ "main should be True but it is \n" ++ simpleShow res, Failed) |
238 | | otherwise -> Right ("reduced main :: " ++ ppShow te, de) | 238 | | otherwise -> Right ("reduced main :: " ++ ppShow te, de) |
239 | where | 239 | where |
240 | de = simpleShow $ vcat $ (DAnn "main" $ pShow te) : (DLet "=" "main" $ mkDoc (True, False) e): showGE fname ge | 240 | de = simpleShow $ vcat $ (DAnn "main" $ pShow te) : (DLet "=" "main" res): showGE fname ge |
241 | res = mkDoc (True, False) e | ||
241 | | otherwise = case e of | 242 | | otherwise = case e of |
242 | Left (pShow -> e) -> Right ("error message", simpleShow $ vcat $ e: listAllInfos i) | 243 | Left (pShow -> e) -> Right ("error message", simpleShow $ vcat $ e: listAllInfos i) |
243 | Right _ -> Left (tab "!Failed" "failed to catch error", Failed) | 244 | Right _ -> Left (tab "!Failed" "failed to catch error", Failed) |