-
Notifications
You must be signed in to change notification settings - Fork 120
Synthesize Test
instances for all suite types.
#311
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
Conversation
I've XFAILed a test for now as we're not 100% sure what to do with it. We'll take a look after the weekend. |
@swift-ci please test |
// If the real test is hidden, so shall the synthesized test be hidden. | ||
// Copy the exact traits from the real test in case they someday carry | ||
// any interesting metadata. | ||
let traits = test.traits.compactMap { $0 as? HiddenTrait } |
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.
Is this no longer needed?
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.
Yes, it's redundant as we already recursively apply traits like this one during planning.
This PR extends test discovery to synthesize `Test` instances for all suite types (that is, types containing other suites or test functions but which do not have the `@Suite` attribute explicitly applied to them.) This ensures that deep type hierarchies like the following are fully represented in test plans: ```swift struct AllTests { struct FoodTruckTests { @suite struct MechanicalTests { struct BatteryTests { @test func isCharged() { ... } } } } } ``` Resolves rdar://125241067.
f784cd5
to
fbe535d
Compare
@swift-ci please test |
@swift-ci please test |
This PR extends test discovery to synthesize
Test
instances for all suite types (that is, types containing other suites or test functions but which do not have the@Suite
attribute explicitly applied to them.)This ensures that deep type hierarchies like the following are fully represented in test plans:
Resolves rdar://125241067.
Checklist: