Skip to content
This repository has been archived by the owner on Jan 2, 2021. It is now read-only.

Commit

Permalink
Improve a test fail message
Browse files Browse the repository at this point in the history
  • Loading branch information
pepeiborra committed Jan 7, 2020
1 parent 171d32a commit ba008e3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/exe/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -809,7 +809,9 @@ insertNewDefinitionTests = testGroup "insert new definition actions"
[ testSession "insert new function definition" $ do
let txtB =
["data Person = Person { age :: Int}"
,"main = putStrLn $ head $ showByAge [Person{age = Just 10}]"
,"foo True = putStrLn $ head $ showByAge [Person{age = Just 10}]"
, ""
,"foo False = show 0"
]
txtB' =
[""
Expand Down Expand Up @@ -1521,10 +1523,12 @@ findCodeActions doc range expectedTitles = do
| CACodeAction action@CodeAction { _title = actionTitle } <- actions
, actionTitle == expectedTitle ]
| expectedTitle <- expectedTitles]
let msg = show $
let msg = show
[ actionTitle
| CACodeAction CodeAction { _title = actionTitle } <- actions
]
++ "is not a superset of "
++ show expectedTitles
liftIO $ assertBool msg (isJust matches)
return (fromJust matches)

Expand Down

0 comments on commit ba008e3

Please sign in to comment.