@@ -50,7 +50,7 @@ extension Issue {
50
50
return self
51
51
}
52
52
53
- /// Record an issue when a running test fails unexpectedly .
53
+ /// Records an issue that a test encounters while it's running .
54
54
///
55
55
/// - Parameters:
56
56
/// - comment: A comment describing the expectation.
@@ -62,18 +62,23 @@ extension Issue {
62
62
/// Use this function if, while running a test, an issue occurs that cannot be
63
63
/// represented as an expectation (using the ``expect(_:_:sourceLocation:)``
64
64
/// or ``require(_:_:sourceLocation:)-5l63q`` macros.)
65
+ @_disfavoredOverload
66
+ @_documentation ( visibility: private)
67
+ @available ( * , deprecated, message: " Use record(_:severity:sourceLocation:) instead. " )
65
68
@discardableResult public static func record(
66
69
_ comment: Comment ? = nil ,
67
70
sourceLocation: SourceLocation = #_sourceLocation
68
71
) -> Self {
69
72
record ( comment, severity: . error, sourceLocation: sourceLocation)
70
73
}
71
74
72
- /// Record an issue when a running test fails unexpectedly .
75
+ /// Records an issue that a test encounters while it's running .
73
76
///
74
77
/// - Parameters:
75
78
/// - comment: A comment describing the expectation.
76
- /// - severity: The severity of the issue.
79
+ /// - severity: The severity level of the issue. The testing library marks the
80
+ /// test as failed if the severity is greater than ``Issue/Severity/warning``.
81
+ /// The default is ``Issue/Severity/error``.
77
82
/// - sourceLocation: The source location to which the issue should be
78
83
/// attributed.
79
84
///
@@ -82,10 +87,13 @@ extension Issue {
82
87
/// Use this function if, while running a test, an issue occurs that cannot be
83
88
/// represented as an expectation (using the ``expect(_:_:sourceLocation:)``
84
89
/// or ``require(_:_:sourceLocation:)-5l63q`` macros.)
85
- @_spi ( Experimental)
90
+ ///
91
+ /// @Metadata {
92
+ /// @Available(Swift, introduced: 6.3)
93
+ /// }
86
94
@discardableResult public static func record(
87
95
_ comment: Comment ? = nil ,
88
- severity: Severity ,
96
+ severity: Severity = . error ,
89
97
sourceLocation: SourceLocation = #_sourceLocation
90
98
) -> Self {
91
99
let sourceContext = SourceContext ( backtrace: . current( ) , sourceLocation: sourceLocation)
0 commit comments