Clarify the number of supported argument collections in article which discusses combinatoric parameterized testing#1210
Merged
Conversation
… discusses combinatoric parameterized testing Fixes rdar://154647425
Contributor
Author
|
@swift-ci please test |
stmontgomery
commented
Jul 8, 2025
iamleeg
approved these changes
Jul 8, 2025
iamleeg
left a comment
Contributor
There was a problem hiding this comment.
That makes things clearer, thanks!
grynspan
reviewed
Jul 8, 2025
| Elements from the first collection are passed as the first argument to the test | ||
| function, elements from the second collection are passed as the second argument, | ||
| and so forth. | ||
| function, and elements from the second collection are passed as the second |
Contributor
There was a problem hiding this comment.
This strictly isn't true (wasn't before either) due to tuple desugaring. Do we want to adjust the phrasing to mention that somehow?
Contributor
Author
There was a problem hiding this comment.
This sentence refers to the code example which precedes it, and I think if you zoom out and reread the section in its entity it is clear in context.
Then, the subsequent paragraphs contrast it with the tuple desugaring behavior:
To avoid the combinatoric semantics shown above, use zip():
[…]
The zipped sequence will be “destructured” into two arguments automatically, then passed to the test function for evaluation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a small adjustment to the documentation article Implementing parameterized tests, in the section Test with more than one collection. It currently has a sentence which ends:
The "and so forth" has caused some confusion since it implies that you can pass more than two argument collections, but in reality only two are supported currently. Eventually this could potentially be expanded with further improvements to the testing library, but that is tracked separately and the docs should reflect its current capabilities.
Fixes rdar://154647425
Checklist: