Skip to content

Commit a70c099

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 db3895e commit a70c099

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
@@ -6780,13 +6780,13 @@ final class SwiftDriverTests: XCTestCase {
67806780
}
67816781

67826782
func testPluginPaths() throws {
6783-
try pluginPathTest(platform: "iPhoneOS", searchPlatform: "iPhoneOS")
6784-
try pluginPathTest(platform: "iPhoneSimulator", searchPlatform: "iPhoneOS")
6783+
try pluginPathTest(platform: "iPhoneOS", sdk: "iPhoneOS13.0", searchPlatform: "iPhoneOS")
6784+
try pluginPathTest(platform: "iPhoneSimulator", sdk: "iPhoneSimulator15.0", searchPlatform: "iPhoneOS")
67856785
}
67866786

6787-
func pluginPathTest(platform: String, searchPlatform: String) throws {
6787+
func pluginPathTest(platform: String, sdk: String, searchPlatform: String) throws {
67886788
let sdkRoot = testInputsPath.appending(
6789-
components: ["PlatformChecks", "\(platform).platform", "Developer", "SDKs", "\(platform).sdk"])
6789+
components: ["Platform Checks", "\(platform).platform", "Developer", "SDKs", "\(sdk).sdk"])
67906790
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"])
67916791
guard driver.isFrontendArgSupported(.pluginPath) && driver.isFrontendArgSupported(.externalPluginPath) else {
67926792
return

0 commit comments

Comments
 (0)