Skip to content

Commit cb090d3

Browse files
Update docc comments for Issue.record (#1257)
Update docc comments for Issue.record ### Motivation: Docc comments were not updated when we added a severity to Issue.record. This fixes that. ### Modifications: Add severity parameter to the record docc comments. ### 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. --------- Co-authored-by: Stuart Montgomery <[email protected]>
1 parent be62a4f commit cb090d3

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

Sources/Testing/Issues/Issue.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public struct Issue: Sendable {
1313
/// Kinds of issues which may be recorded.
1414
public enum Kind: Sendable {
1515
/// An issue which occurred unconditionally, for example by using
16-
/// ``Issue/record(_:sourceLocation:)``.
16+
/// ``Issue/record(_:severity:sourceLocation:)``.
1717
case unconditional
1818

1919
/// An issue due to a failed expectation, such as those produced by
@@ -409,7 +409,7 @@ extension Issue.Kind {
409409
@_spi(ForToolsIntegrationOnly)
410410
public enum Snapshot: Sendable, Codable {
411411
/// An issue which occurred unconditionally, for example by using
412-
/// ``Issue/record(_:sourceLocation:)``.
412+
/// ``Issue/record(_:severity:sourceLocation:)``.
413413
case unconditional
414414

415415
/// An issue due to a failed expectation, such as those produced by

Sources/Testing/Support/CustomIssueRepresentable.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
/// record themselves as test issues.
1313
///
1414
/// When a type conforms to this protocol, values of that type can be passed to
15-
/// ``Issue/record(_:_:)``. The testing library then calls the
15+
/// ``Issue/record(_:severity:sourceLocation:)``. The testing library then calls the
1616
/// ``customize(_:)`` function and passes it an instance of ``Issue`` that will
1717
/// be used to represent the value. The function can then reconfigure or replace
1818
/// the issue as needed.
@@ -43,7 +43,7 @@ protocol CustomIssueRepresentable: Error {
4343
///
4444
/// This type is not part of the public interface of the testing library.
4545
/// External callers should generally record issues by throwing their own errors
46-
/// or by calling ``Issue/record(_:sourceLocation:)``.
46+
/// or by calling ``Issue/record(_:severity:sourceLocation:)``.
4747
struct SystemError: Error, CustomStringConvertible, CustomIssueRepresentable {
4848
var description: String
4949

@@ -62,7 +62,7 @@ struct SystemError: Error, CustomStringConvertible, CustomIssueRepresentable {
6262
///
6363
/// This type is not part of the public interface of the testing library.
6464
/// External callers should generally record issues by throwing their own errors
65-
/// or by calling ``Issue/record(_:sourceLocation:)``.
65+
/// or by calling ``Issue/record(_:severity:sourceLocation:)``.
6666
struct APIMisuseError: Error, CustomStringConvertible, CustomIssueRepresentable {
6767
var description: String
6868

Sources/Testing/Testing.docc/MigratingFromXCTest.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ XCTest has a function, [`XCTFail()`](https://developer.apple.com/documentation/x
277277
that causes a test to fail immediately and unconditionally. This function is
278278
useful when the syntax of the language prevents the use of an `XCTAssert()`
279279
function. To record an unconditional issue using the testing library, use the
280-
``Issue/record(_:sourceLocation:)`` function:
280+
``Issue/record(_:severity:sourceLocation:)`` function:
281281

282282
@Row {
283283
@Column {

0 commit comments

Comments
 (0)