Skip to content

Conversation

grynspan
Copy link
Contributor

@grynspan grynspan commented Oct 3, 2025

This PR adds an experimental property to Test.Case to allow callers to get the test case's arguments as a type-erased array. For example:

if let testCase = Test.Case.current {
  for value in testCase.argumentValues {
    print("\(value): \(type(of: value))")
  }
}

We already have an arguments property of a type that we do not intend to make API, so the new property is named argumentValues pending any SPI renaming.

Checklist:

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

This PR adds an experimental property to `Test.Case` to allow callers to get the
test case's arguments as a type-erased array. For example:

```swift
if let testCase = Test.Case.current {
  for value in testCase.argumentValues {
    print("\(value): \(type(of: value))")
  }
}
```

We already have an `arguments` property of a type that we do not intend to make
API, so the new property is named `argumentValues` pending any of SPI renaming.
@grynspan grynspan added this to the Swift 6.x (main) milestone Oct 3, 2025
@grynspan grynspan self-assigned this Oct 3, 2025
@grynspan grynspan added enhancement New feature or request public-api Affects public API traits Issues and PRs related to the trait subsystem or built-in traits parameterized-testing Related to parameterized testing functionality labels Oct 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request parameterized-testing Related to parameterized testing functionality public-api Affects public API traits Issues and PRs related to the trait subsystem or built-in traits
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant