13
13
import BuildServerProtocol
14
14
import LSPTestSupport
15
15
import LanguageServerProtocol
16
- import SKCore
16
+ @ _spi ( Testing ) import SKCore
17
17
import TSCBasic
18
18
import XCTest
19
19
@@ -37,7 +37,8 @@ final class BuildSystemManagerTests: XCTestCase {
37
37
let bsm = await BuildSystemManager (
38
38
buildSystem: nil ,
39
39
fallbackBuildSystem: FallbackBuildSystem ( buildSetup: . default) ,
40
- mainFilesProvider: mainFiles
40
+ mainFilesProvider: mainFiles,
41
+ toolchainRegistry: ToolchainRegistry . forTesting
41
42
)
42
43
defer { withExtendedLifetime ( bsm) { } } // Keep BSM alive for callbacks.
43
44
@@ -88,13 +89,14 @@ final class BuildSystemManagerTests: XCTestCase {
88
89
}
89
90
90
91
func testSettingsMainFile( ) async throws {
91
- let a = try try DocumentURI ( string: " bsm:a.swift " )
92
+ let a = try DocumentURI ( string: " bsm:a.swift " )
92
93
let mainFiles = ManualMainFilesProvider ( [ a: [ a] ] )
93
94
let bs = ManualBuildSystem ( )
94
95
let bsm = await BuildSystemManager (
95
96
buildSystem: bs,
96
97
fallbackBuildSystem: nil ,
97
- mainFilesProvider: mainFiles
98
+ mainFilesProvider: mainFiles,
99
+ toolchainRegistry: ToolchainRegistry . forTesting
98
100
)
99
101
defer { withExtendedLifetime ( bsm) { } } // Keep BSM alive for callbacks.
100
102
let del = await BSMDelegate ( bsm)
@@ -117,7 +119,8 @@ final class BuildSystemManagerTests: XCTestCase {
117
119
let bsm = await BuildSystemManager (
118
120
buildSystem: bs,
119
121
fallbackBuildSystem: nil ,
120
- mainFilesProvider: mainFiles
122
+ mainFilesProvider: mainFiles,
123
+ toolchainRegistry: ToolchainRegistry . forTesting
121
124
)
122
125
defer { withExtendedLifetime ( bsm) { } } // Keep BSM alive for callbacks.
123
126
let del = await BSMDelegate ( bsm)
@@ -139,7 +142,8 @@ final class BuildSystemManagerTests: XCTestCase {
139
142
let bsm = await BuildSystemManager (
140
143
buildSystem: bs,
141
144
fallbackBuildSystem: fallback,
142
- mainFilesProvider: mainFiles
145
+ mainFilesProvider: mainFiles,
146
+ toolchainRegistry: ToolchainRegistry . forTesting
143
147
)
144
148
defer { withExtendedLifetime ( bsm) { } } // Keep BSM alive for callbacks.
145
149
let del = await BSMDelegate ( bsm)
@@ -168,7 +172,8 @@ final class BuildSystemManagerTests: XCTestCase {
168
172
let bsm = await BuildSystemManager (
169
173
buildSystem: bs,
170
174
fallbackBuildSystem: nil ,
171
- mainFilesProvider: mainFiles
175
+ mainFilesProvider: mainFiles,
176
+ toolchainRegistry: ToolchainRegistry . forTesting
172
177
)
173
178
defer { withExtendedLifetime ( bsm) { } } // Keep BSM alive for callbacks.
174
179
let del = await BSMDelegate ( bsm)
@@ -208,7 +213,8 @@ final class BuildSystemManagerTests: XCTestCase {
208
213
let bsm = await BuildSystemManager (
209
214
buildSystem: bs,
210
215
fallbackBuildSystem: nil ,
211
- mainFilesProvider: mainFiles
216
+ mainFilesProvider: mainFiles,
217
+ toolchainRegistry: ToolchainRegistry . forTesting
212
218
)
213
219
defer { withExtendedLifetime ( bsm) { } } // Keep BSM alive for callbacks.
214
220
let del = await BSMDelegate ( bsm)
@@ -246,7 +252,8 @@ final class BuildSystemManagerTests: XCTestCase {
246
252
let bsm = await BuildSystemManager (
247
253
buildSystem: bs,
248
254
fallbackBuildSystem: nil ,
249
- mainFilesProvider: mainFiles
255
+ mainFilesProvider: mainFiles,
256
+ toolchainRegistry: ToolchainRegistry . forTesting
250
257
)
251
258
defer { withExtendedLifetime ( bsm) { } } // Keep BSM alive for callbacks.
252
259
let del = await BSMDelegate ( bsm)
@@ -300,7 +307,8 @@ final class BuildSystemManagerTests: XCTestCase {
300
307
let bsm = await BuildSystemManager (
301
308
buildSystem: bs,
302
309
fallbackBuildSystem: nil ,
303
- mainFilesProvider: mainFiles
310
+ mainFilesProvider: mainFiles,
311
+ toolchainRegistry: ToolchainRegistry . forTesting
304
312
)
305
313
defer { withExtendedLifetime ( bsm) { } } // Keep BSM alive for callbacks.
306
314
let del = await BSMDelegate ( bsm)
@@ -341,7 +349,8 @@ final class BuildSystemManagerTests: XCTestCase {
341
349
let bsm = await BuildSystemManager (
342
350
buildSystem: bs,
343
351
fallbackBuildSystem: nil ,
344
- mainFilesProvider: mainFiles
352
+ mainFilesProvider: mainFiles,
353
+ toolchainRegistry: ToolchainRegistry . forTesting
345
354
)
346
355
defer { withExtendedLifetime ( bsm) { } } // Keep BSM alive for callbacks.
347
356
let del = await BSMDelegate ( bsm)
@@ -383,7 +392,8 @@ final class BuildSystemManagerTests: XCTestCase {
383
392
let bsm = await BuildSystemManager (
384
393
buildSystem: bs,
385
394
fallbackBuildSystem: nil ,
386
- mainFilesProvider: mainFiles
395
+ mainFilesProvider: mainFiles,
396
+ toolchainRegistry: ToolchainRegistry . forTesting
387
397
)
388
398
defer { withExtendedLifetime ( bsm) { } } // Keep BSM alive for callbacks.
389
399
let del = await BSMDelegate ( bsm)
0 commit comments