-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a Bundle.testTarget
property.
#848
base: main
Are you sure you want to change the base?
Conversation
This PR adds an experimental class property to `Bundle` in the Foundation cross-import overlay. The property's value represents the bundle containing the test target. On Apple platforms, this is an XCTest bundle. Elsewhere, it's just the main bundle. This is an experimental interface only.
@swift-ci test |
@swift-ci test |
@swift-ci test Windows |
/// | ||
/// - Note: This property accesses the file system the first time it is used. | ||
@_spi(Experimental) | ||
public static var testTarget: Bundle { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not think we should extend Foundation this way from Testing. The correct way would be implementation in Foundation itself, following the process there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a prototype only. 🙂 We can certainly follow the Foundation review process for this feature (in whatever form it takes) although due to layering it may need to live here in the overlay.
I have no plans to merge this without your team's signoff!
This PR adds an experimental class property to
Bundle
in the Foundation cross-import overlay. The property's value represents the bundle containing the test target. On Apple platforms, this is an XCTest bundle. Elsewhere, it's just the main bundle.This is an experimental interface only.
Checklist: