Skip to content

Commit ef7bba7

Browse files
committed
If the location of a diagnostic didn't match, emit its content
1 parent 72f5ec9 commit ef7bba7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Tests/SwiftParserTest/Assertions.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ func AssertDiagnostic<T: SyntaxProtocol>(
131131
let expectedLine = expectedLocation.line,
132132
let expectedColumn = expectedLocation.column {
133133
if actualLine != expectedLine || actualColumn != expectedColumn {
134-
XCTFail("Expected diagnostic on \(expectedLine):\(expectedColumn) but got \(actualLine):\(actualColumn)",
134+
XCTFail("Expected diagnostic with message '\(spec.message ?? "<nil>")' on \(expectedLine):\(expectedColumn) but got \(actualLine):\(actualColumn)",
135135
file: file, line: line
136136
)
137137
}

0 commit comments

Comments
 (0)