Fix inversion of result and expected fixed source code in whitespace failure message

This commit is contained in:
Jeroen Engels 2020-06-19 12:35:57 +02:00
parent cfd7a9157e
commit 5e2b633c54
2 changed files with 4 additions and 4 deletions

View File

@ -388,7 +388,7 @@ but I was expecting:
fixedCodeWhitespaceMismatch : SourceCode -> SourceCode -> ReviewError -> String
fixedCodeWhitespaceMismatch resultingSourceCode expectedSourceCode error =
let
( resulting, expected ) =
( expected, resulting ) =
highlightDifferencesInSourceCodes resultingSourceCode expectedSourceCode
in
failureMessage "FIXED CODE MISMATCH (WHITESPACE ISSUE)"

View File

@ -821,8 +821,8 @@ fixedCodeMismatchTest =
test "fixedCodeMismatch" <|
\() ->
let
sourceCode : String
sourceCode =
fixedSourceCode : String
fixedSourceCode =
"""module A exposing (b)
abcd =
1"""
@ -842,7 +842,7 @@ abcd =
{ start = { row = 3, column = 1 }, end = { row = 3, column = 5 } }
in
FailureMessage.fixedCodeMismatch
sourceCode
fixedSourceCode
expectedSourceCode
error
|> expectMessageEqual """