Skip to content

Restore DocC @Comment blocks to documentation line comments #1103

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Sources/Testing/Attachments/Attachment.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
24 changes: 12 additions & 12 deletions Sources/Testing/Issues/Issue.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
30 changes: 15 additions & 15 deletions Sources/Testing/Parameterization/Test.Case.Generator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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<S>: Sendable where S: Sequence & Sendable, S.Element: Sendable {
/// The underlying sequence of argument values.
///
Expand Down Expand Up @@ -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<E1, E2>(
sequence: S,
parameters: [Test.Parameter],
Expand Down Expand Up @@ -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<E1, E2>(
arguments collection: S,
parameters: [Test.Parameter],
Expand Down
20 changes: 10 additions & 10 deletions Sources/Testing/Support/CartesianProduct.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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<C1, C2>: LazySequenceProtocol where C1: Collection, C2: Collection {
fileprivate var collection1: C1
fileprivate var collection2: C2
Expand Down Expand Up @@ -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<C1, C2>(_ collection1: C1, _ collection2: C2) -> CartesianProduct<C1, C2> where C1: Collection, C2: Collection {
CartesianProduct(collection1: collection1, collection2: collection2)
}
50 changes: 25 additions & 25 deletions Sources/Testing/Test+Macro.swift
Original file line number Diff line number Diff line change
Expand Up @@ -220,14 +220,14 @@ public macro Test<C>(
/// 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
///
/// - <doc:DefiningTests>
//
// @Comment {
// - Bug: The testing library should support variadic generics.
// ([103416861](rdar://103416861))
// }
@attached(peer) public macro Test<C>(
_ displayName: _const String? = nil,
_ traits: any TestTrait...,
Expand Down Expand Up @@ -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
///
/// - <doc:DefiningTests>
//
// @Comment {
// - Bug: The testing library should support variadic generics.
// ([103416861](rdar://103416861))
// }
@attached(peer)
@_documentation(visibility: private)
public macro Test<C1, C2>(
Expand All @@ -301,14 +301,14 @@ public macro Test<C1, C2>(
/// 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
///
/// - <doc:DefiningTests>
//
// @Comment {
// - Bug: The testing library should support variadic generics.
// ([103416861](rdar://103416861))
// }
@attached(peer) public macro Test<C1, C2>(
_ displayName: _const String? = nil,
_ traits: any TestTrait...,
Expand All @@ -327,14 +327,14 @@ public macro Test<C1, C2>(
/// 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
///
/// - <doc:DefiningTests>
//
// @Comment {
// - Bug: The testing library should support variadic generics.
// ([103416861](rdar://103416861))
// }
@attached(peer)
@_documentation(visibility: private)
public macro Test<C1, C2>(
Expand All @@ -355,14 +355,14 @@ public macro Test<C1, C2>(
/// 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
///
/// - <doc:DefiningTests>
//
// @Comment {
// - Bug: The testing library should support variadic generics.
// ([103416861](rdar://103416861))
// }
@attached(peer) public macro Test<C1, C2>(
_ displayName: _const String? = nil,
_ traits: any TestTrait...,
Expand Down
24 changes: 12 additions & 12 deletions Sources/Testing/Traits/ConditionTrait.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
20 changes: 10 additions & 10 deletions Tests/TestingTests/TestSupport/TestingAdditions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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<C>(
_ traits: any TestTrait...,
arguments collection: C,
Expand All @@ -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<C1, C2>(
_ traits: any TestTrait...,
arguments collection1: C1, _ collection2: C2,
Expand Down