Skip to content

Apply parameterized test optimizations for Dictionary to KeyValuePairs.#1699

Merged
grynspan merged 1 commit into
mainfrom
jgrynspan/key-value-pairs-optimization
May 1, 2026
Merged

Apply parameterized test optimizations for Dictionary to KeyValuePairs.#1699
grynspan merged 1 commit into
mainfrom
jgrynspan/key-value-pairs-optimization

Conversation

@grynspan

@grynspan grynspan commented May 1, 2026

Copy link
Copy Markdown
Contributor

This change ensures that test authors who explicitly pass collections of type KeyValuePairs<K, V> as test arguments will get the same sort of optimizations as they would if they passed a Dictionary<K, V> instead.

This change complements, but is not dependent on, #1627.

Checklist:

  • Code and documentation should follow the style of the Style Guide.
  • If public symbols are renamed or modified, DocC references should be updated.

…airs`.

This change ensures that test authors who explicitly pass collections of type
`KeyValuePairs<K, V>` as test arguments will get the same sort of optimizations
as they would if they passed a `Dictionary<K, V>` instead.

This change complements, but is not dependent on, #1627.
@grynspan grynspan added this to the Swift 6.4.0 (main) milestone May 1, 2026
@grynspan grynspan self-assigned this May 1, 2026
@grynspan grynspan added the enhancement New feature or request label May 1, 2026
@grynspan grynspan added performance 🏎️ Performance issues parameterized-testing Related to parameterized testing functionality macros 🔭 Related to Swift macros such as @Test or #expect labels May 1, 2026
@grynspan grynspan merged commit a4d2209 into main May 1, 2026
35 checks passed
@grynspan grynspan deleted the jgrynspan/key-value-pairs-optimization branch May 1, 2026 18:18
grynspan added a commit that referenced this pull request May 1, 2026
In #1699 I added `__DictionaryLikeCollection` but I can just use
`ExpressibleByDictionaryLiteral` for this purpose.

### Checklist:

- [x] Code and documentation should follow the style of the [Style
Guide](https://github.com/apple/swift-testing/blob/main/Documentation/StyleGuide.md).
- [x] If public symbols are renamed or modified, DocC references should
be updated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request macros 🔭 Related to Swift macros such as @Test or #expect parameterized-testing Related to parameterized testing functionality performance 🏎️ Performance issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants