Skip to content

Commit b80dade

Browse files
committed
[Platform macros] Make test inputs more realistic and complicated
... to make sure we're not missing any odd corner cases here.
1 parent 20c26c2 commit b80dade

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Tests/SwiftDriverTests/SwiftDriverTests.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6869,13 +6869,13 @@ final class SwiftDriverTests: XCTestCase {
68696869
}
68706870

68716871
func testPluginPaths() throws {
6872-
try pluginPathTest(platform: "iPhoneOS", searchPlatform: "iPhoneOS")
6873-
try pluginPathTest(platform: "iPhoneSimulator", searchPlatform: "iPhoneOS")
6872+
try pluginPathTest(platform: "iPhoneOS", sdk: "iPhoneOS13.0", searchPlatform: "iPhoneOS")
6873+
try pluginPathTest(platform: "iPhoneSimulator", sdk: "iPhoneSimulator15.0", searchPlatform: "iPhoneOS")
68746874
}
68756875

6876-
func pluginPathTest(platform: String, searchPlatform: String) throws {
6876+
func pluginPathTest(platform: String, sdk: String, searchPlatform: String) throws {
68776877
let sdkRoot = testInputsPath.appending(
6878-
components: ["PlatformChecks", "\(platform).platform", "Developer", "SDKs", "\(platform).sdk"])
6878+
components: ["Platform Checks", "\(platform).platform", "Developer", "SDKs", "\(sdk).sdk"])
68796879
var driver = try Driver(args: ["swiftc", "-typecheck", "foo.swift", "-sdk", VirtualPath.absolute(sdkRoot).name, "-plugin-path", "PluginA", "-external-plugin-path", "Plugin~B#Bexe", "-load-plugin-library", "PluginB2", "-plugin-path", "PluginC"])
68806880
guard driver.isFrontendArgSupported(.pluginPath) && driver.isFrontendArgSupported(.externalPluginPath) else {
68816881
return

0 commit comments

Comments
 (0)