From 6e2e824a165e2752e20da3dd7ab122c55fd0cd1c Mon Sep 17 00:00:00 2001 From: Stuart Montgomery Date: Fri, 2 May 2025 23:15:06 -0500 Subject: [PATCH] Restore DocC comments blocks to full documentation line comments --- Sources/Testing/Attachments/Attachment.swift | 10 ++-- Sources/Testing/Issues/Issue.swift | 24 ++++----- .../Test.Case.Generator.swift | 30 +++++------ .../Testing/Support/CartesianProduct.swift | 20 ++++---- Sources/Testing/Test+Macro.swift | 50 +++++++++---------- Sources/Testing/Traits/ConditionTrait.swift | 24 ++++----- .../TestSupport/TestingAdditions.swift | 20 ++++---- 7 files changed, 89 insertions(+), 89 deletions(-) diff --git a/Sources/Testing/Attachments/Attachment.swift b/Sources/Testing/Attachments/Attachment.swift index 7468834bf..366e288d1 100644 --- a/Sources/Testing/Attachments/Attachment.swift +++ b/Sources/Testing/Attachments/Attachment.swift @@ -131,11 +131,11 @@ extension Attachment where AttachableValue == AnyAttachable { /// events of kind ``Event/Kind/valueAttached(_:)``. Test tools authors who use /// `@_spi(ForToolsIntegrationOnly)` will see instances of this type when /// handling those events. -// -// @Comment { -// Swift's type system requires that this type be at least as visible as -// `Event.Kind.valueAttached(_:)`, otherwise it would be declared private. -// } +/// +/// @Comment { +/// Swift's type system requires that this type be at least as visible as +/// `Event.Kind.valueAttached(_:)`, otherwise it would be declared private. +/// } @_spi(ForToolsIntegrationOnly) public struct AnyAttachable: AttachableWrapper, Copyable, Sendable { #if !SWT_NO_LAZY_ATTACHMENTS diff --git a/Sources/Testing/Issues/Issue.swift b/Sources/Testing/Issues/Issue.swift index 4a17cb945..9a2555177 100644 --- a/Sources/Testing/Issues/Issue.swift +++ b/Sources/Testing/Issues/Issue.swift @@ -49,12 +49,12 @@ public struct Issue: Sendable { /// /// - Parameters: /// - timeLimitComponents: The time limit reached by the test. - // - // @Comment { - // - Bug: The associated value of this enumeration case should be an - // instance of `Duration`, but the testing library's deployment target - // predates the introduction of that type. - // } + /// + /// @Comment { + /// - Bug: The associated value of this enumeration case should be an + /// instance of `Duration`, but the testing library's deployment target + /// predates the introduction of that type. + /// } indirect case timeLimitExceeded(timeLimitComponents: (seconds: Int64, attoseconds: Int64)) /// A known issue was expected, but was not recorded. @@ -434,12 +434,12 @@ extension Issue.Kind { /// /// - Parameters: /// - timeLimitComponents: The time limit reached by the test. - // - // @Comment { - // - Bug: The associated value of this enumeration case should be an - // instance of `Duration`, but the testing library's deployment target - // predates the introduction of that type. - // } + /// + /// @Comment { + /// - Bug: The associated value of this enumeration case should be an + /// instance of `Duration`, but the testing library's deployment target + /// predates the introduction of that type. + /// } indirect case timeLimitExceeded(timeLimitComponents: (seconds: Int64, attoseconds: Int64)) /// A known issue was expected, but was not recorded. diff --git a/Sources/Testing/Parameterization/Test.Case.Generator.swift b/Sources/Testing/Parameterization/Test.Case.Generator.swift index d30e3a7d3..05467d9bd 100644 --- a/Sources/Testing/Parameterization/Test.Case.Generator.swift +++ b/Sources/Testing/Parameterization/Test.Case.Generator.swift @@ -13,11 +13,11 @@ extension Test.Case { /// a known collection of argument values. /// /// Instances of this type can be iterated over multiple times. - // - // @Comment { - // - Bug: The testing library should support variadic generics. - // ([103416861](rdar://103416861)) - // } + /// + /// @Comment { + /// - Bug: The testing library should support variadic generics. + /// ([103416861](rdar://103416861)) + /// } struct Generator: Sendable where S: Sequence & Sendable, S.Element: Sendable { /// The underlying sequence of argument values. /// @@ -146,11 +146,11 @@ extension Test.Case { /// /// This initializer overload is specialized for sequences of 2-tuples to /// efficiently de-structure their elements when appropriate. - // - // @Comment { - // - Bug: The testing library should support variadic generics. - // ([103416861](rdar://103416861)) - // } + /// + /// @Comment { + /// - Bug: The testing library should support variadic generics. + /// ([103416861](rdar://103416861)) + /// } private init( sequence: S, parameters: [Test.Parameter], @@ -184,11 +184,11 @@ extension Test.Case { /// /// This initializer overload is specialized for collections of 2-tuples to /// efficiently de-structure their elements when appropriate. - // - // @Comment { - // - Bug: The testing library should support variadic generics. - // ([103416861](rdar://103416861)) - // } + /// + /// @Comment { + /// - Bug: The testing library should support variadic generics. + /// ([103416861](rdar://103416861)) + /// } init( arguments collection: S, parameters: [Test.Parameter], diff --git a/Sources/Testing/Support/CartesianProduct.swift b/Sources/Testing/Support/CartesianProduct.swift index 07b164eb5..43d92e462 100644 --- a/Sources/Testing/Support/CartesianProduct.swift +++ b/Sources/Testing/Support/CartesianProduct.swift @@ -17,11 +17,11 @@ /// `[(1, "a"), (1, "b"), (1, "c"), (2, "a"), (2, "b"), ... (3, "c")]`. /// /// This type is not part of the public interface of the testing library. -// -// @Comment { -// - Bug: The testing library should support variadic generics. -// ([103416861](rdar://103416861)) -// } +/// +/// @Comment { +/// - Bug: The testing library should support variadic generics. +/// ([103416861](rdar://103416861)) +/// } struct CartesianProduct: LazySequenceProtocol where C1: Collection, C2: Collection { fileprivate var collection1: C1 fileprivate var collection2: C2 @@ -63,11 +63,11 @@ extension CartesianProduct: Sendable where C1: Sendable, C2: Sendable {} /// while `collection2` is iterated `collection1.count` times. /// /// For more information on Cartesian products, see ``CartesianProduct``. -// -// @Comment { -// - Bug: The testing library should support variadic generics. -// ([103416861](rdar://103416861)) -// } +/// +/// @Comment { +/// - Bug: The testing library should support variadic generics. +/// ([103416861](rdar://103416861)) +/// } func cartesianProduct(_ collection1: C1, _ collection2: C2) -> CartesianProduct where C1: Collection, C2: Collection { CartesianProduct(collection1: collection1, collection2: collection2) } diff --git a/Sources/Testing/Test+Macro.swift b/Sources/Testing/Test+Macro.swift index d1ad6623b..be0b5a91b 100644 --- a/Sources/Testing/Test+Macro.swift +++ b/Sources/Testing/Test+Macro.swift @@ -220,14 +220,14 @@ public macro Test( /// During testing, the associated test function is called once for each element /// in `collection`. /// +/// @Comment { +/// - Bug: The testing library should support variadic generics. +/// ([103416861](rdar://103416861)) +/// } +/// /// ## See Also /// /// - -// -// @Comment { -// - Bug: The testing library should support variadic generics. -// ([103416861](rdar://103416861)) -// } @attached(peer) public macro Test( _ displayName: _const String? = nil, _ traits: any TestTrait..., @@ -273,14 +273,14 @@ extension Test { /// During testing, the associated test function is called once for each pair of /// elements in `collection1` and `collection2`. /// +/// @Comment { +/// - Bug: The testing library should support variadic generics. +/// ([103416861](rdar://103416861)) +/// } +/// /// ## See Also /// /// - -// -// @Comment { -// - Bug: The testing library should support variadic generics. -// ([103416861](rdar://103416861)) -// } @attached(peer) @_documentation(visibility: private) public macro Test( @@ -301,14 +301,14 @@ public macro Test( /// During testing, the associated test function is called once for each pair of /// elements in `collection1` and `collection2`. /// +/// @Comment { +/// - Bug: The testing library should support variadic generics. +/// ([103416861](rdar://103416861)) +/// } +/// /// ## See Also /// /// - -// -// @Comment { -// - Bug: The testing library should support variadic generics. -// ([103416861](rdar://103416861)) -// } @attached(peer) public macro Test( _ displayName: _const String? = nil, _ traits: any TestTrait..., @@ -327,14 +327,14 @@ public macro Test( /// During testing, the associated test function is called once for each element /// in `zippedCollections`. /// +/// @Comment { +/// - Bug: The testing library should support variadic generics. +/// ([103416861](rdar://103416861)) +/// } +/// /// ## See Also /// /// - -// -// @Comment { -// - Bug: The testing library should support variadic generics. -// ([103416861](rdar://103416861)) -// } @attached(peer) @_documentation(visibility: private) public macro Test( @@ -355,14 +355,14 @@ public macro Test( /// During testing, the associated test function is called once for each element /// in `zippedCollections`. /// +/// @Comment { +/// - Bug: The testing library should support variadic generics. +/// ([103416861](rdar://103416861)) +/// } +/// /// ## See Also /// /// - -// -// @Comment { -// - Bug: The testing library should support variadic generics. -// ([103416861](rdar://103416861)) -// } @attached(peer) public macro Test( _ displayName: _const String? = nil, _ traits: any TestTrait..., diff --git a/Sources/Testing/Traits/ConditionTrait.swift b/Sources/Testing/Traits/ConditionTrait.swift index eb3d1bd11..079b64d8e 100644 --- a/Sources/Testing/Traits/ConditionTrait.swift +++ b/Sources/Testing/Traits/ConditionTrait.swift @@ -115,12 +115,12 @@ extension Trait where Self == ConditionTrait { /// /// - Returns: An instance of ``ConditionTrait`` that evaluates the /// closure you provide. - // - // @Comment { - // - Bug: `condition` cannot be `async` without making this function - // `async` even though `condition` is not evaluated locally. - // ([103037177](rdar://103037177)) - // } + /// + /// @Comment { + /// - Bug: `condition` cannot be `async` without making this function + /// `async` even though `condition` is not evaluated locally. + /// ([103037177](rdar://103037177)) + /// } public static func enabled( if condition: @autoclosure @escaping @Sendable () throws -> Bool, _ comment: Comment? = nil, @@ -174,12 +174,12 @@ extension Trait where Self == ConditionTrait { /// /// - Returns: An instance of ``ConditionTrait`` that evaluates the /// closure you provide. - // - // @Comment { - // - Bug: `condition` cannot be `async` without making this function - // `async` even though `condition` is not evaluated locally. - // ([103037177](rdar://103037177)) - // } + /// + /// @Comment { + /// - Bug: `condition` cannot be `async` without making this function + /// `async` even though `condition` is not evaluated locally. + /// ([103037177](rdar://103037177)) + /// } public static func disabled( if condition: @autoclosure @escaping @Sendable () throws -> Bool, _ comment: Comment? = nil, diff --git a/Tests/TestingTests/TestSupport/TestingAdditions.swift b/Tests/TestingTests/TestSupport/TestingAdditions.swift index 6807fd62a..4648f96af 100644 --- a/Tests/TestingTests/TestSupport/TestingAdditions.swift +++ b/Tests/TestingTests/TestSupport/TestingAdditions.swift @@ -162,11 +162,11 @@ extension Test { /// - testFunction: The function to call when running this test. During /// testing, this function is called once for each element in /// `collection`. - // - // @Comment { - // - Bug: The testing library should support variadic generics. - // ([103416861](rdar://103416861)) - // } + /// + /// @Comment { + /// - Bug: The testing library should support variadic generics. + /// ([103416861](rdar://103416861)) + /// } init( _ traits: any TestTrait..., arguments collection: C, @@ -191,11 +191,11 @@ extension Test { /// - testFunction: The function to call when running this test. During /// testing, this function is called once for each pair of elements in /// `collection1` and `collection2`. - // - // @Comment { - // - Bug: The testing library should support variadic generics. - // ([103416861](rdar://103416861)) - // } + /// + /// @Comment { + /// - Bug: The testing library should support variadic generics. + /// ([103416861](rdar://103416861)) + /// } init( _ traits: any TestTrait..., arguments collection1: C1, _ collection2: C2,