Skip to content
Merged
Changes from 1 commit
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
6 changes: 3 additions & 3 deletions Sources/Testing/Testing.docc/ParameterizedTesting.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,11 @@ 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
will, when run, be invoked 500 times (5 × 100) with every possible combination
of food and order size. These combinations are referred to as the collections'
Cartesian product.

Expand Down