Skip to content

Clarify the number of supported argument collections in article which discusses combinatoric parameterized testing #1210

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

Merged
merged 2 commits into from
Jul 8, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Sources/Testing/Testing.docc/ParameterizedTesting.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ func makeLargeOrder(of food: Food, count: Int) async throws {
```

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This strictly isn't true (wasn't before either) due to tuple desugaring. Do we want to adjust the phrasing to mention that somehow?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

argument.

Assuming there are five cases in the `Food` enumeration, this test function
will, when run, be invoked 500 times (5 x 100) with every possible combination
Expand Down