Skip to content

Commit 47dd496

Browse files
committed
Fix SourceKitLSPAPITests
1 parent 14482e0 commit 47dd496

File tree

1 file changed

+26
-4
lines changed

1 file changed

+26
-4
lines changed

Tests/SourceKitLSPAPITests/SourceKitLSPAPITests.swift

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class SourceKitLSPAPITests: XCTestCase {
2727
)
2828

2929
let observability = ObservabilitySystem.makeForTesting()
30-
let graph = try loadPackageGraph(
30+
let graph = try loadModulesGraph(
3131
fileSystem: fs,
3232
manifests: [
3333
Manifest.createRootManifest(
@@ -52,13 +52,35 @@ class SourceKitLSPAPITests: XCTestCase {
5252
)
5353
let description = BuildDescription(buildPlan: plan)
5454

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+
)
5775
}
5876
}
5977

6078
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 {
6284
let target = try XCTUnwrap(graph.allTargets.first(where: { $0.name == targetName }))
6385
let buildTarget = try XCTUnwrap(self.getBuildTarget(for: target))
6486

0 commit comments

Comments
 (0)