File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -150,14 +150,12 @@ final class LocalClangTests: XCTestCase {
150
150
let expectation = XCTestExpectation ( description: " diagnostics " )
151
151
152
152
ws. sk. handleNextNotification { ( note: Notification < PublishDiagnostics > ) in
153
- XCTAssertEqual ( note. params. diagnostics, [
154
- Diagnostic (
155
- range: Position ( loc) ..< Position ( ws. testLoc ( " unused_b:end " ) ) ,
156
- severity: . warning,
157
- source: nil ,
158
- message: " Unused variable 'b' " )
159
- ] )
160
-
153
+ // Don't use exact equality because of differences in recent clang.
154
+ XCTAssertEqual ( note. params. diagnostics. count, 1 )
155
+ XCTAssertEqual ( note. params. diagnostics. first? . range,
156
+ PositionRange ( Position ( loc) ..< Position ( ws. testLoc ( " unused_b:end " ) ) ) )
157
+ XCTAssertEqual ( note. params. diagnostics. first? . severity, . warning)
158
+ XCTAssertEqual ( note. params. diagnostics. first? . message, " Unused variable 'b' " )
161
159
expectation. fulfill ( )
162
160
}
163
161
You can’t perform that action at this time.
0 commit comments