Skip to content

Commit ee043b5

Browse files
Fix unit test
1 parent 5e1f667 commit ee043b5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Tests/SourceKitLSPTests/PullDiagnosticsTests.swift

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ import SKTestSupport
1616
import XCTest
1717

1818
final class PullDiagnosticsTests: XCTestCase {
19+
enum Error: Swift.Error {
20+
case unexpectedDiagnosticReport
21+
}
22+
1923
/// Connection and lifetime management for the service.
2024
var connection: TestSourceKitServer! = nil
2125

@@ -61,8 +65,7 @@ final class PullDiagnosticsTests: XCTestCase {
6165
}
6266

6367
guard case .full(let fullReport) = report else {
64-
XCTFail("Unexpected diagnostics report type: \(report)")
65-
return
68+
throw Error.unexpectedDiagnosticReport
6669
}
6770

6871
return fullReport.items

0 commit comments

Comments
 (0)