File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -120,7 +120,9 @@ final class BuildSystemTests: XCTestCase {
120120 await buildSystem. setBuildSettings ( for: doc, to: newSettings)
121121
122122 try await repeatUntilExpectedResult {
123- let refreshedDiags = try await testClient. nextDiagnosticsNotification ( timeout: . seconds( 1 ) )
123+ guard let refreshedDiags = try ? await testClient. nextDiagnosticsNotification ( timeout: . seconds( 1 ) ) else {
124+ return false
125+ }
124126 return try text == documentManager. latestSnapshot ( doc) . text && refreshedDiags. diagnostics. count == 0
125127 }
126128 }
Original file line number Diff line number Diff line change @@ -195,14 +195,14 @@ final class MainFilesProviderTests: XCTestCase {
195195 DidChangeWatchedFilesNotification ( changes: [ FileEvent ( uri: fancyLibraryUri, type: . changed) ] )
196196 )
197197
198- // 'MyFancyLibrary.c' now also includes 'shared.h'. Since it lexicographically preceeds MyLibrary, we should use its
198+ // 'MyFancyLibrary.c' now also includes 'shared.h'. Since it lexicographically precedes MyLibrary, we should use its
199199 // build settings.
200200 // `clangd` may return diagnostics from the old build settings sometimes (I believe when it's still building the
201201 // preamble for shared.h when the new build settings come in). Check that it eventually returns the correct
202202 // diagnostics.
203203 try await repeatUntilExpectedResult {
204- let refreshedDiags = try await project. testClient. nextDiagnosticsNotification ( timeout: . seconds( 1 ) )
205- guard let diagnostic = refreshedDiags. diagnostics. only else {
204+ let refreshedDiags = try ? await project. testClient. nextDiagnosticsNotification ( timeout: . seconds( 1 ) )
205+ guard let diagnostic = refreshedDiags? . diagnostics. only else {
206206 return false
207207 }
208208 return diagnostic. message == " Unused variable 'fromMyFancyLibrary' "
You can’t perform that action at this time.
0 commit comments