Skip to content

Commit e36a103

Browse files
committed
Re #6170 Update tests to provide move info on failure
1 parent 26833f8 commit e36a103

File tree

3 files changed

+18
-4
lines changed
  • test/integration/tests

3 files changed

+18
-4
lines changed

test/integration/tests/3926-ghci-with-sublibraries/Main.hs

+6-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,12 @@ replThread :: IO ()
1717
replThread = repl [] $ do
1818
replCommand ":main"
1919
line <- replGetLine
20-
when (line /= "hello world") $ error "Main module didn't load correctly."
20+
let expected = "hello world"
21+
when (line /= expected) $
22+
error $
23+
"Main module didn't load correctly.\n"
24+
<> "Expected: " <> expected <> "\n"
25+
<> "Actual : " <> line <> "\n"
2126
liftIO $ threadDelay 1000000 -- wait for an edit of the internal library
2227
reloadAndTest "testInt" "42" "Internal library didn't reload."
2328
liftIO $ threadDelay 1000000 -- wait for an edit of the internal library

test/integration/tests/4270-files-order/Main.hs

+6-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,9 @@ main = do
77
repl [] $ do
88
replCommand "putStrLn greeting"
99
line <- replGetLine
10-
when (line /= "Hello, world!") $ error "Didn't load correctly."
10+
let expected = "Hello, world!"
11+
when (line /= expected) $
12+
error $
13+
"Didn't load correctly.\n"
14+
<> "Expected: " <> expected <> "\n"
15+
<> "Actual : " <> line <> "\n"

test/integration/tests/module-added-multiple-times/Main.hs

+6-2
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,9 @@ main :: IO ()
66
main = repl [] $ do
77
replCommand ":main"
88
line <- replGetLine
9-
when (line /= "Hello World!")
10-
$ error "Main module didn't load correctly."
9+
let expected = "Hello World!"
10+
when (line /= expected) $
11+
error $
12+
"Main module didn't load correctly.\n"
13+
<> "Expected: " <> expected <> "\n"
14+
<> "Actual : " <> line <> "\n"

0 commit comments

Comments
 (0)