Skip to content

Commit b470365

Browse files
authored
Update DocC symbol references for Attachment _et al._ (#822)
Follow-up to #821. ### 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 17209c0 commit b470365

File tree

5 files changed

+28
-29
lines changed

5 files changed

+28
-29
lines changed

Sources/Testing/ABI/v0/Encoded/ABIv0.EncodedAttachment.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
//
1010

1111
extension ABIv0 {
12-
/// A type implementing the JSON encoding of ``Test/Attachment`` for the ABI
13-
/// entry point and event stream output.
12+
/// A type implementing the JSON encoding of ``Attachment`` for the ABI entry
13+
/// point and event stream output.
1414
///
1515
/// This type is not part of the public interface of the testing library. It
1616
/// assists in converting values to JSON; clients that consume this JSON are

Sources/Testing/Attachments/Attachable.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
/// written to disk when a test is run.
1313
///
1414
/// To attach an attachable value to a test report or test run output, use it to
15-
/// initialize a new instance of ``Test/Attachment``, then call
16-
/// ``Test/Attachment/attach(sourceLocation:)``. An attachment can only be
17-
/// attached once.
15+
/// initialize a new instance of ``Attachment``, then call
16+
/// ``Attachment/attach(sourceLocation:)``. An attachment can only be attached
17+
/// once.
1818
///
1919
/// The testing library provides default conformances to this protocol for a
2020
/// variety of standard library types. Most user-defined types do not need to
@@ -24,7 +24,7 @@
2424
/// sequence of bytes that would be diagnostically useful if a test fails. If a
2525
/// type cannot conform directly to this protocol (such as a non-final class or
2626
/// a type declared in a third-party module), you can create a container type
27-
/// that conforms to ``Test/AttachableContainer`` to act as a proxy.
27+
/// that conforms to ``AttachableContainer`` to act as a proxy.
2828
@_spi(Experimental)
2929
public protocol Attachable: ~Copyable {
3030
/// An estimate of the number of bytes of memory needed to store this value as

Sources/Testing/Attachments/AttachableContainer.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
/// stands in for.
1414
///
1515
/// To attach an attachable value to a test report or test run output, use it to
16-
/// initialize a new instance of ``Test/Attachment``, then call
17-
/// ``Test/Attachment/attach(sourceLocation:)``. An attachment can only be
18-
/// attached once.
16+
/// initialize a new instance of ``Attachment``, then call
17+
/// ``Attachment/attach(sourceLocation:)``. An attachment can only be attached
18+
/// once.
1919
///
2020
/// A type can conform to this protocol if it represents another type that
21-
/// cannot directly conform to ``Test/Attachable``, such as a non-final class or
22-
/// a type declared in a third-party module.
21+
/// cannot directly conform to ``Attachable``, such as a non-final class or a
22+
/// type declared in a third-party module.
2323
@_spi(Experimental)
2424
public protocol AttachableContainer<AttachableValue>: Attachable, ~Copyable {
2525
#if hasFeature(SuppressedAssociatedTypes)

Sources/Testing/Attachments/Attachment.swift

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ private import _TestingInternals
1515
///
1616
/// Attachments are included in test reports in Xcode or written to disk when
1717
/// tests are run at the command line. To create an attachment, you need a value
18-
/// of some type that conforms to ``Test/Attachable``. Initialize an instance of
19-
/// ``Test/Attachment`` with that value and, optionally, a preferred filename to
20-
/// use when writing to disk.
18+
/// of some type that conforms to ``Attachable``. Initialize an instance of
19+
/// ``Attachment`` with that value and, optionally, a preferred filename to use
20+
/// when writing to disk.
2121
@_spi(Experimental)
2222
public struct Attachment<AttachableValue>: ~Copyable where AttachableValue: Attachable & ~Copyable {
2323
/// Storage for ``attachableValue-7dyjv``.
@@ -89,7 +89,7 @@ extension Attachment where AttachableValue: ~Copyable {
8989

9090
@_spi(Experimental) @_spi(ForToolsIntegrationOnly)
9191
extension Attachment where AttachableValue == AnyAttachable {
92-
/// Create a type-erased attachment from an instance of ``Test/Attachment``.
92+
/// Create a type-erased attachment from an instance of ``Attachment``.
9393
///
9494
/// - Parameters:
9595
/// - attachment: The attachment to type-erase.
@@ -163,10 +163,10 @@ extension Attachment where AttachableValue: ~Copyable {
163163
extension Attachment where AttachableValue: AttachableContainer & ~Copyable {
164164
/// The value of this attachment.
165165
///
166-
/// When the attachable value's type conforms to ``Test/AttachableContainer``,
167-
/// the value of this property equals the container's underlying attachable
168-
/// value. To access the attachable value as an instance of `T` (where `T`
169-
/// conforms to ``Test/AttachableContainer``), specify the type explicitly:
166+
/// When the attachable value's type conforms to ``AttachableContainer``, the
167+
/// value of this property equals the container's underlying attachable value.
168+
/// To access the attachable value as an instance of `T` (where `T` conforms
169+
/// to ``AttachableContainer``), specify the type explicitly:
170170
///
171171
/// ```swift
172172
/// let attachableValue = attachment.attachableValue as T
@@ -230,7 +230,7 @@ extension Attachment where AttachableValue: ~Copyable {
230230

231231
extension Attachment where AttachableValue: ~Copyable {
232232
/// Call a function and pass a buffer representing the value of this
233-
/// instance's ``attachableValue-7dyjv`` property to it.
233+
/// instance's ``attachableValue-2tnj5`` property to it.
234234
///
235235
/// - Parameters:
236236
/// - body: A function to call. A temporary buffer containing a data
@@ -243,8 +243,8 @@ extension Attachment where AttachableValue: ~Copyable {
243243
///
244244
/// The testing library uses this function when writing an attachment to a
245245
/// test report or to a file on disk. This function calls the
246-
/// ``Test/Attachable/withUnsafeBufferPointer(for:_:)`` function on this
247-
/// attachment's ``attachableValue-7dyjv`` property.
246+
/// ``Attachable/withUnsafeBufferPointer(for:_:)`` function on this
247+
/// attachment's ``attachableValue-2tnj5`` property.
248248
@inlinable public borrowing func withUnsafeBufferPointer<R>(_ body: (UnsafeRawBufferPointer) throws -> R) throws -> R {
249249
try attachableValue.withUnsafeBufferPointer(for: self, body)
250250
}
@@ -265,8 +265,7 @@ extension Attachment where AttachableValue: ~Copyable {
265265
/// - Returns: The path to the file that was written.
266266
///
267267
/// The attachment is written to a file _within_ `directoryPath`, whose name
268-
/// is derived from the value of the ``Test/Attachment/preferredName``
269-
/// property.
268+
/// is derived from the value of the ``Attachment/preferredName`` property.
270269
///
271270
/// If you pass `--experimental-attachments-path` to `swift test`, the testing
272271
/// library automatically uses this function to persist attachments to the
@@ -302,8 +301,8 @@ extension Attachment where AttachableValue: ~Copyable {
302301
/// - Returns: The path to the file that was written.
303302
///
304303
/// The attachment is written to a file _within_ `directoryPath`, whose name
305-
/// is derived from the value of the ``Test/Attachment/preferredName``
306-
/// property and the value of `suffix`.
304+
/// is derived from the value of the ``Attachment/preferredName`` property and
305+
/// the value of `suffix`.
307306
///
308307
/// If the argument `suffix` always produces the same string, the result of
309308
/// this function is undefined.
@@ -363,8 +362,8 @@ extension Configuration {
363362
/// - Parameters:
364363
/// - event: The event to handle. This event must be of kind
365364
/// ``Event/Kind/valueAttached(_:)``. If the associated attachment's
366-
/// ``Test/Attachment/fileSystemPath`` property is not `nil`, this
367-
/// function does nothing.
365+
/// ``Attachment/fileSystemPath`` property is not `nil`, this function
366+
/// does nothing.
368367
/// - context: The context associated with the event.
369368
///
370369
/// - Returns: Whether or not to continue handling the event.

Sources/Testing/Events/Recorder/Event.Symbol.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ extension Event {
3939
/// The symbol to use when presenting details about an event to the user.
4040
case details
4141

42-
/// The symbol to use when describing an instance of ``Test/Attachment``.
42+
/// The symbol to use when describing an instance of ``Attachment``.
4343
@_spi(Experimental)
4444
case attachment
4545
}

0 commit comments

Comments
 (0)