Skip to content

Commit e3e7e94

Browse files
authored
Remove Test.Case's conformance to Identifiable. (#559)
With further consideration after #548, we've decided to remove conformance to `Identifiable` from `Test.Case` rather than promoting it to API. The identity of a test case is fuzzy because it depends on the arguments to a test, not all of which may be uniquely identifiable. We need more time to consider the design of this part of the interface before making it a permanent part of our API. ### 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.
1 parent 7cb5bc9 commit e3e7e94

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Sources/Testing/Parameterization/Test.Case.ID.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,27 @@
88
// See https://swift.org/CONTRIBUTORS.txt for Swift project authors
99
//
1010

11-
extension Test.Case: Identifiable {
11+
extension Test.Case {
1212
/// The ID of a test case.
1313
///
1414
/// Instances of this type are considered unique within the scope of a given
1515
/// parameterized test function. They are not necessarily unique across two
1616
/// different ``Test`` instances.
17+
@_spi(ForToolsIntegrationOnly)
1718
public struct ID: Sendable, Equatable, Hashable {
1819
/// The IDs of the arguments of this instance's associated ``Test/Case``, in
1920
/// the order they appear in ``Test/Case/arguments``.
2021
///
2122
/// The value of this property is `nil` if _any_ of the associated test
2223
/// case's arguments has a `nil` ID.
23-
@_spi(ForToolsIntegrationOnly)
2424
public var argumentIDs: [Argument.ID]?
2525

26-
@_spi(ForToolsIntegrationOnly)
2726
public init(argumentIDs: [Argument.ID]?) {
2827
self.argumentIDs = argumentIDs
2928
}
3029
}
3130

31+
@_spi(ForToolsIntegrationOnly)
3232
public var id: ID {
3333
let argumentIDs = arguments.compactMap(\.id)
3434
guard argumentIDs.count == arguments.count else {

0 commit comments

Comments
 (0)