2424///
2525/// - ``Trait/compactMapIssues(_:)``
2626/// - ``Trait/filterIssues(_:)``
27- @_spi ( Experimental)
27+ ///
28+ /// @Metadata {
29+ /// @Available(Swift, introduced: 6.2)
30+ /// }
2831public struct IssueHandlingTrait : TestTrait , SuiteTrait {
2932 /// A function which handles an issue and returns an optional replacement.
3033 ///
@@ -49,6 +52,10 @@ public struct IssueHandlingTrait: TestTrait, SuiteTrait {
4952 ///
5053 /// - Returns: An issue to replace `issue`, or else `nil` if the issue should
5154 /// not be recorded.
55+ ///
56+ /// @Metadata {
57+ /// @Available(Swift, introduced: 6.2)
58+ /// }
5259 public func handleIssue( _ issue: Issue ) -> Issue ? {
5360 _handler ( issue)
5461 }
@@ -58,6 +65,9 @@ public struct IssueHandlingTrait: TestTrait, SuiteTrait {
5865 }
5966}
6067
68+ /// @Metadata {
69+ /// @Available(Swift, introduced: 6.2)
70+ /// }
6171extension IssueHandlingTrait : TestScoping {
6272 public func scopeProvider( for test: Test , testCase: Test . Case ? ) -> Self ? {
6373 // Provide scope for tests at both the suite and test case levels, but not
@@ -126,7 +136,6 @@ extension IssueHandlingTrait: TestScoping {
126136 }
127137}
128138
129- @_spi ( Experimental)
130139extension Trait where Self == IssueHandlingTrait {
131140 /// Constructs an trait that transforms issues recorded by a test.
132141 ///
@@ -158,6 +167,10 @@ extension Trait where Self == IssueHandlingTrait {
158167 /// - Note: `transform` will never be passed an issue for which the value of
159168 /// ``Issue/kind`` is ``Issue/Kind/system``, and may not return such an
160169 /// issue.
170+ ///
171+ /// @Metadata {
172+ /// @Available(Swift, introduced: 6.2)
173+ /// }
161174 public static func compactMapIssues( _ transform: @escaping @Sendable ( Issue ) -> Issue ? ) -> Self {
162175 Self ( handler: transform)
163176 }
@@ -192,6 +205,10 @@ extension Trait where Self == IssueHandlingTrait {
192205 ///
193206 /// - Note: `isIncluded` will never be passed an issue for which the value of
194207 /// ``Issue/kind`` is ``Issue/Kind/system``.
208+ ///
209+ /// @Metadata {
210+ /// @Available(Swift, introduced: 6.2)
211+ /// }
195212 public static func filterIssues( _ isIncluded: @escaping @Sendable ( Issue ) -> Bool ) -> Self {
196213 Self { issue in
197214 isIncluded ( issue) ? issue : nil
0 commit comments