We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
-sdk
testCompletionUsingCompileFlagsTxt
1 parent b757fb9 commit 4b30573Copy full SHA for 4b30573
Tests/SourceKitLSPTests/SwiftCompletionTests.swift
@@ -1148,6 +1148,17 @@ final class SwiftCompletionTests: XCTestCase {
1148
}
1149
1150
func testCompletionUsingCompileFlagsTxt() async throws {
1151
+ let compileFlags =
1152
+ if let defaultSDKPath {
1153
+ """
1154
+ -DFOO
1155
+ -sdk
1156
+ \(defaultSDKPath)
1157
1158
+ } else {
1159
+ "-DFOO"
1160
+ }
1161
+
1162
let project = try await MultiFileTestProject(
1163
files: [
1164
"test.swift": """
@@ -1160,7 +1171,7 @@ final class SwiftCompletionTests: XCTestCase {
1171
print(myVar1️⃣)
1172
1173
""",
- "compile_flags.txt": "-DFOO",
1174
+ "compile_flags.txt": compileFlags,
1175
]
1165
1176
)
1166
1177
let (uri, positions) = try project.openDocument("test.swift")
0 commit comments