Skip to content

Commit 37f4358

Browse files
[TEST-ONLY] Fix emit-clang-header-min-access test
Fix the test for older swift-frontend and eliminate the warning.
1 parent 71e14fe commit 37f4358

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Tests/SwiftDriverTests/SwiftDriverTests.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7988,9 +7988,12 @@ final class SwiftDriverTests: XCTestCase {
79887988
var driver = try Driver(args: [
79897989
"swiftc", "-emit-clang-header-path", "path/to/header", "-emit-clang-header-min-access", "public", "-typecheck", "test.swift"
79907990
])
7991+
guard driver.isFrontendArgSupported(.emitClangHeaderMinAccess) else {
7992+
throw XCTSkip("Skipping: compiler does not support '-emit-clang-header-min-access'")
7993+
}
79917994
let jobs = try driver.planBuild().removingAutolinkExtractJobs()
79927995
XCTAssertEqual(jobs.count, 2)
7993-
try XCTAssertJobInvocationMatches(jobs[0], .flag("-emit-clang-header-min-access"), .flag("public"))
7996+
XCTAssertJobInvocationMatches(jobs[0], .flag("-emit-clang-header-min-access"), .flag("public"))
79947997
}
79957998

79967999
func testGccToolchainFlags() throws {

0 commit comments

Comments
 (0)