Include error code when shouldFailWith is missing
commite6b74bc2bf349ebeebc21e071d3eafeca11e5d3f
authorHarry Garrood <harry@garrood.me>
dateMon 3 Aug 2015, 00:31 (11 years ago)
parent4ad522f
tests/Main.hs+3−1
@@ -174,7 +174,9 @@ assertDoesNotCompile inputFiles foreigns = do
174174 Left errs -> do
175175 putStrLn (P.prettyPrintMultipleErrors False errs)
176176 return $ if null shouldFailWith
177− then Just $ "shouldFailWith declaration is missing"
177+ then Just $ "shouldFailWith declaration is missing (errors were: "
178+ ++ show (map P.errorCode (P.runMultipleErrors errs))
179+ ++ ")"
178180 else checkShouldFailWith shouldFailWith errs
179181 Right _ ->
180182 return $ Just "Should not have compiled"