diff options
author | Csaba Hruska <csaba.hruska@gmail.com> | 2016-11-30 11:26:59 +0100 |
---|---|---|
committer | Csaba Hruska <csaba.hruska@gmail.com> | 2016-11-30 11:26:59 +0100 |
commit | 5275180490e83ccbf435b3d736266651b5008f4e (patch) | |
tree | d385500ae317bf735b4f6ebdefdf791a52958226 | |
parent | f1605a5c15776189d5d2c3888760904018e8ba9a (diff) |
erase Pipeline's info field before comparison
-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 153f8580..45e49805 100644 --- a/test/runTests.hs +++ b/test/runTests.hs | |||
@@ -36,6 +36,7 @@ import qualified Data.Text as T | |||
36 | import qualified Data.Text.IO as TIO | 36 | import qualified Data.Text.IO as TIO |
37 | import Text.Printf | 37 | import Text.Printf |
38 | 38 | ||
39 | import qualified LambdaCube.IR as IR | ||
39 | import LambdaCube.Compiler | 40 | import LambdaCube.Compiler |
40 | import LambdaCube.Compiler.Pretty hiding ((</>)) | 41 | import LambdaCube.Compiler.Pretty hiding ((</>)) |
41 | 42 | ||
@@ -237,13 +238,13 @@ doTest Config{..} (i, fn) = do | |||
237 | return res | 238 | return res |
238 | 239 | ||
239 | --getDef :: MonadMask m => FilePath -> SName -> Maybe Exp -> MMT m (Infos, [Stmt]) ((Infos, [Stmt]), Either Doc (FilePath, Either Doc ExpType)) | 240 | --getDef :: MonadMask m => FilePath -> SName -> Maybe Exp -> MMT m (Infos, [Stmt]) ((Infos, [Stmt]), Either Doc (FilePath, Either Doc ExpType)) |
240 | 241 | clearPipelineInfo p = p {IR.info = ""} | |
241 | f ((i, desug), e) | not $ isReject fn = case e of | 242 | f ((i, desug), e) | not $ isReject fn = case e of |
242 | Left (_, show -> e) -> Left (unlines $ tab "!Failed" e: map show (listTraceInfos i), Failed) | 243 | Left (_, show -> e) -> Left (unlines $ tab "!Failed" e: map show (listTraceInfos i), Failed) |
243 | Right (fname, ge, Left (pShow -> e)) | 244 | Right (fname, ge, Left (pShow -> e)) |
244 | -> Right ("typechecked module", simpleShow $ vcat $ e: showGE fname ge) | 245 | -> Right ("typechecked module", simpleShow $ vcat $ e: showGE fname ge) |
245 | Right (fname, ge, Right (ET e te)) | 246 | Right (fname, ge, Right (ET e te)) |
246 | | te == outputType -> Right ("compiled pipeline", prettyShowUnlines $ compilePipeline OpenGL33 (ET e te)) | 247 | | te == outputType -> Right ("compiled pipeline", prettyShowUnlines $ clearPipelineInfo $ compilePipeline OpenGL33 (ET e te)) |
247 | | e == trueExp -> Right ("reducted main", de) | 248 | | e == trueExp -> Right ("reducted main", de) |
248 | | te == boolType -> Left (tab "!Failed" $ "main should be True but it is \n" ++ simpleShow res, Failed) | 249 | | te == boolType -> Left (tab "!Failed" $ "main should be True but it is \n" ++ simpleShow res, Failed) |
249 | | otherwise -> Right ("reduced main :: " ++ simpleShow (mkDoc (True, False) te), de) | 250 | | otherwise -> Right ("reduced main :: " ++ simpleShow (mkDoc (True, False) te), de) |