@@ -27,7 +27,7 @@ class SourceKitLSPAPITests: XCTestCase {
27
27
)
28
28
29
29
let observability = ObservabilitySystem . makeForTesting ( )
30
- let graph = try loadPackageGraph (
30
+ let graph = try loadModulesGraph (
31
31
fileSystem: fs,
32
32
manifests: [
33
33
Manifest . createRootManifest (
@@ -52,13 +52,35 @@ class SourceKitLSPAPITests: XCTestCase {
52
52
)
53
53
let description = BuildDescription ( buildPlan: plan)
54
54
55
- try description. checkArguments ( for: " exe " , graph: graph, partialArguments: [ " -module-name " , " exe " , " -emit-dependencies " , " -emit-module " , " -emit-module-path " , " /path/to/build/debug/exe.build/exe.swiftmodule " ] )
56
- try description. checkArguments ( for: " lib " , graph: graph, partialArguments: [ " -module-name " , " lib " , " -emit-dependencies " , " -emit-module " , " -emit-module-path " , " /path/to/build/debug/Modules/lib.swiftmodule " ] )
55
+ try description. checkArguments (
56
+ for: " exe " ,
57
+ graph: graph,
58
+ partialArguments: [
59
+ " -module-name " , " exe " ,
60
+ " -emit-dependencies " ,
61
+ " -emit-module " ,
62
+ " -emit-module-path " , " /path/to/build/ \( buildParameters. triple) /debug/exe.build/exe.swiftmodule "
63
+ ]
64
+ )
65
+ try description. checkArguments (
66
+ for: " lib " ,
67
+ graph: graph,
68
+ partialArguments: [
69
+ " -module-name " , " lib " ,
70
+ " -emit-dependencies " ,
71
+ " -emit-module " ,
72
+ " -emit-module-path " , " /path/to/build/ \( buildParameters. triple) /debug/Modules/lib.swiftmodule "
73
+ ]
74
+ )
57
75
}
58
76
}
59
77
60
78
extension SourceKitLSPAPI . BuildDescription {
61
- @discardableResult func checkArguments( for targetName: String , graph: ModulesGraph , partialArguments: [ String ] ) throws -> Bool {
79
+ @discardableResult func checkArguments(
80
+ for targetName: String ,
81
+ graph: ModulesGraph ,
82
+ partialArguments: [ String ]
83
+ ) throws -> Bool {
62
84
let target = try XCTUnwrap ( graph. allTargets. first ( where: { $0. name == targetName } ) )
63
85
let buildTarget = try XCTUnwrap ( self . getBuildTarget ( for: target) )
64
86
0 commit comments