summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPéter Diviánszky <divipp@gmail.com>2016-05-04 10:22:48 +0200
committerPéter Diviánszky <divipp@gmail.com>2016-05-04 10:22:48 +0200
commit0dc09e81832aa1495ef9f213bf091f4a1620ab05 (patch)
tree059176dd57bbf586184794a67b32384790ada293 /test
parentc4dc2ffc92a19e93ec4b3876364c12074681ecbf (diff)
print reduced result in .out file
Diffstat (limited to 'test')
-rw-r--r--test/runTests.hs10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/runTests.hs b/test/runTests.hs
index f8d354b2..f9bb5424 100644
--- a/test/runTests.hs
+++ b/test/runTests.hs
@@ -218,11 +218,13 @@ doTest Config{..} (i, fn) = do
218 listAllInfos i) 218 listAllInfos i)
219 Right (fname, Right (ET e te)) 219 Right (fname, Right (ET e te))
220 | te == outputType -> Right ("compiled pipeline", prettyShowUnlines $ compilePipeline OpenGL33 (ET e te)) 220 | te == outputType -> Right ("compiled pipeline", prettyShowUnlines $ compilePipeline OpenGL33 (ET e te))
221 | e == trueExp -> Right ("reducted main", simpleShow $ hnf e) 221 | e == trueExp -> Right ("reducted main", de)
222 | te == boolType -> Left (tab "!Failed" $ "main should be True but it is \n" ++ ppShow e, Failed) 222 | te == boolType -> Left (tab "!Failed" $ "main should be True but it is \n" ++ de, Failed)
223 | otherwise -> Right ("reduced main " ++ ppShow te, simpleShow e) 223 | otherwise -> Right ("reduced main " ++ ppShow te, de)
224 where
225 de = simpleShow (mkDoc True e)
224 | otherwise = case e of 226 | otherwise = case e of
225 Left (pShow -> e) -> Right ("error message", simpleShow $ vcat $ e: listAllInfos i) 227 Left (pShow -> e) -> Right ("error message", simpleShow $ vcat $ e: listAllInfos i)
226 Right _ -> Left (tab "!Failed" "failed to catch error", Failed) 228 Right _ -> Left (tab "!Failed" "failed to catch error", Failed)
227 229
228 tab msg 230 tab msg