-
Notifications
You must be signed in to change notification settings - Fork 112
Expand parameterized testing documentation to mention try/await support and showcase helper pattern #1133
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
Expand parameterized testing documentation to mention try/await support and showcase helper pattern #1133
Conversation
…rt and showcase helper pattern Fixes rdar://130929060
@swift-ci please test |
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 useful guidance, thank you! I've suggested changing from passive to active voice throughout, and provided an example of what I mean.
@swift-ci please test |
@@ -217,8 +217,10 @@ public macro Test<C>( | |||
/// - collection: A collection of values to pass to the associated test | |||
/// function. | |||
/// | |||
/// During testing, the associated test function is called once for each element | |||
/// in `collection`. | |||
/// You can prefix the expression you pass to `collection` with `try` or `await`. |
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 don't feel strongly here, but do we need to repeat this for each overload or can we just document it in the article?
} | ||
``` | ||
|
||
> Tip: You can prefix expressions passed to `arguments:` with `try` or `await`. |
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.
Do we use tips otherwise in our documentation? I don't mind starting to use them, but I would like to get guidelines for when to use them instead of other callouts.
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.
@iamleeg Any advice?
@swift-ci please test |
This expands a few places where we document parameterized testing APIs to mention
try
/await
support and showcase a common pattern for sharing arguments between multiple tests.Modifications:
@Test
macro which accepts arguments, mention thattry
andawait
are supported and that arguments are lazily evaluated.> Tip:
callout within that new article section mentioningtry
/await
support.Checklist:
Fixes rdar://130929060