Skip to content

Commit 6e4fe1f

Browse files
authored
Restore DocC @Comment blocks to documentation line comments (#1103)
1 parent a82d0a8 commit 6e4fe1f

File tree

7 files changed

+89
-89
lines changed

7 files changed

+89
-89
lines changed

Sources/Testing/Attachments/Attachment.swift

+5-5
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,11 @@ extension Attachment where AttachableValue == AnyAttachable {
131131
/// events of kind ``Event/Kind/valueAttached(_:)``. Test tools authors who use
132132
/// `@_spi(ForToolsIntegrationOnly)` will see instances of this type when
133133
/// handling those events.
134-
//
135-
// @Comment {
136-
// Swift's type system requires that this type be at least as visible as
137-
// `Event.Kind.valueAttached(_:)`, otherwise it would be declared private.
138-
// }
134+
///
135+
/// @Comment {
136+
/// Swift's type system requires that this type be at least as visible as
137+
/// `Event.Kind.valueAttached(_:)`, otherwise it would be declared private.
138+
/// }
139139
@_spi(ForToolsIntegrationOnly)
140140
public struct AnyAttachable: AttachableWrapper, Copyable, Sendable {
141141
#if !SWT_NO_LAZY_ATTACHMENTS

Sources/Testing/Issues/Issue.swift

+12-12
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@ public struct Issue: Sendable {
4949
///
5050
/// - Parameters:
5151
/// - timeLimitComponents: The time limit reached by the test.
52-
//
53-
// @Comment {
54-
// - Bug: The associated value of this enumeration case should be an
55-
// instance of `Duration`, but the testing library's deployment target
56-
// predates the introduction of that type.
57-
// }
52+
///
53+
/// @Comment {
54+
/// - Bug: The associated value of this enumeration case should be an
55+
/// instance of `Duration`, but the testing library's deployment target
56+
/// predates the introduction of that type.
57+
/// }
5858
indirect case timeLimitExceeded(timeLimitComponents: (seconds: Int64, attoseconds: Int64))
5959

6060
/// A known issue was expected, but was not recorded.
@@ -434,12 +434,12 @@ extension Issue.Kind {
434434
///
435435
/// - Parameters:
436436
/// - timeLimitComponents: The time limit reached by the test.
437-
//
438-
// @Comment {
439-
// - Bug: The associated value of this enumeration case should be an
440-
// instance of `Duration`, but the testing library's deployment target
441-
// predates the introduction of that type.
442-
// }
437+
///
438+
/// @Comment {
439+
/// - Bug: The associated value of this enumeration case should be an
440+
/// instance of `Duration`, but the testing library's deployment target
441+
/// predates the introduction of that type.
442+
/// }
443443
indirect case timeLimitExceeded(timeLimitComponents: (seconds: Int64, attoseconds: Int64))
444444

445445
/// A known issue was expected, but was not recorded.

Sources/Testing/Parameterization/Test.Case.Generator.swift

+15-15
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ extension Test.Case {
1313
/// a known collection of argument values.
1414
///
1515
/// Instances of this type can be iterated over multiple times.
16-
//
17-
// @Comment {
18-
// - Bug: The testing library should support variadic generics.
19-
// ([103416861](rdar://103416861))
20-
// }
16+
///
17+
/// @Comment {
18+
/// - Bug: The testing library should support variadic generics.
19+
/// ([103416861](rdar://103416861))
20+
/// }
2121
struct Generator<S>: Sendable where S: Sequence & Sendable, S.Element: Sendable {
2222
/// The underlying sequence of argument values.
2323
///
@@ -146,11 +146,11 @@ extension Test.Case {
146146
///
147147
/// This initializer overload is specialized for sequences of 2-tuples to
148148
/// efficiently de-structure their elements when appropriate.
149-
//
150-
// @Comment {
151-
// - Bug: The testing library should support variadic generics.
152-
// ([103416861](rdar://103416861))
153-
// }
149+
///
150+
/// @Comment {
151+
/// - Bug: The testing library should support variadic generics.
152+
/// ([103416861](rdar://103416861))
153+
/// }
154154
private init<E1, E2>(
155155
sequence: S,
156156
parameters: [Test.Parameter],
@@ -184,11 +184,11 @@ extension Test.Case {
184184
///
185185
/// This initializer overload is specialized for collections of 2-tuples to
186186
/// efficiently de-structure their elements when appropriate.
187-
//
188-
// @Comment {
189-
// - Bug: The testing library should support variadic generics.
190-
// ([103416861](rdar://103416861))
191-
// }
187+
///
188+
/// @Comment {
189+
/// - Bug: The testing library should support variadic generics.
190+
/// ([103416861](rdar://103416861))
191+
/// }
192192
init<E1, E2>(
193193
arguments collection: S,
194194
parameters: [Test.Parameter],

Sources/Testing/Support/CartesianProduct.swift

+10-10
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
/// `[(1, "a"), (1, "b"), (1, "c"), (2, "a"), (2, "b"), ... (3, "c")]`.
1818
///
1919
/// This type is not part of the public interface of the testing library.
20-
//
21-
// @Comment {
22-
// - Bug: The testing library should support variadic generics.
23-
// ([103416861](rdar://103416861))
24-
// }
20+
///
21+
/// @Comment {
22+
/// - Bug: The testing library should support variadic generics.
23+
/// ([103416861](rdar://103416861))
24+
/// }
2525
struct CartesianProduct<C1, C2>: LazySequenceProtocol where C1: Collection, C2: Collection {
2626
fileprivate var collection1: C1
2727
fileprivate var collection2: C2
@@ -63,11 +63,11 @@ extension CartesianProduct: Sendable where C1: Sendable, C2: Sendable {}
6363
/// while `collection2` is iterated `collection1.count` times.
6464
///
6565
/// For more information on Cartesian products, see ``CartesianProduct``.
66-
//
67-
// @Comment {
68-
// - Bug: The testing library should support variadic generics.
69-
// ([103416861](rdar://103416861))
70-
// }
66+
///
67+
/// @Comment {
68+
/// - Bug: The testing library should support variadic generics.
69+
/// ([103416861](rdar://103416861))
70+
/// }
7171
func cartesianProduct<C1, C2>(_ collection1: C1, _ collection2: C2) -> CartesianProduct<C1, C2> where C1: Collection, C2: Collection {
7272
CartesianProduct(collection1: collection1, collection2: collection2)
7373
}

Sources/Testing/Test+Macro.swift

+25-25
Original file line numberDiff line numberDiff line change
@@ -220,14 +220,14 @@ public macro Test<C>(
220220
/// During testing, the associated test function is called once for each element
221221
/// in `collection`.
222222
///
223+
/// @Comment {
224+
/// - Bug: The testing library should support variadic generics.
225+
/// ([103416861](rdar://103416861))
226+
/// }
227+
///
223228
/// ## See Also
224229
///
225230
/// - <doc:DefiningTests>
226-
//
227-
// @Comment {
228-
// - Bug: The testing library should support variadic generics.
229-
// ([103416861](rdar://103416861))
230-
// }
231231
@attached(peer) public macro Test<C>(
232232
_ displayName: _const String? = nil,
233233
_ traits: any TestTrait...,
@@ -273,14 +273,14 @@ extension Test {
273273
/// During testing, the associated test function is called once for each pair of
274274
/// elements in `collection1` and `collection2`.
275275
///
276+
/// @Comment {
277+
/// - Bug: The testing library should support variadic generics.
278+
/// ([103416861](rdar://103416861))
279+
/// }
280+
///
276281
/// ## See Also
277282
///
278283
/// - <doc:DefiningTests>
279-
//
280-
// @Comment {
281-
// - Bug: The testing library should support variadic generics.
282-
// ([103416861](rdar://103416861))
283-
// }
284284
@attached(peer)
285285
@_documentation(visibility: private)
286286
public macro Test<C1, C2>(
@@ -301,14 +301,14 @@ public macro Test<C1, C2>(
301301
/// During testing, the associated test function is called once for each pair of
302302
/// elements in `collection1` and `collection2`.
303303
///
304+
/// @Comment {
305+
/// - Bug: The testing library should support variadic generics.
306+
/// ([103416861](rdar://103416861))
307+
/// }
308+
///
304309
/// ## See Also
305310
///
306311
/// - <doc:DefiningTests>
307-
//
308-
// @Comment {
309-
// - Bug: The testing library should support variadic generics.
310-
// ([103416861](rdar://103416861))
311-
// }
312312
@attached(peer) public macro Test<C1, C2>(
313313
_ displayName: _const String? = nil,
314314
_ traits: any TestTrait...,
@@ -327,14 +327,14 @@ public macro Test<C1, C2>(
327327
/// During testing, the associated test function is called once for each element
328328
/// in `zippedCollections`.
329329
///
330+
/// @Comment {
331+
/// - Bug: The testing library should support variadic generics.
332+
/// ([103416861](rdar://103416861))
333+
/// }
334+
///
330335
/// ## See Also
331336
///
332337
/// - <doc:DefiningTests>
333-
//
334-
// @Comment {
335-
// - Bug: The testing library should support variadic generics.
336-
// ([103416861](rdar://103416861))
337-
// }
338338
@attached(peer)
339339
@_documentation(visibility: private)
340340
public macro Test<C1, C2>(
@@ -355,14 +355,14 @@ public macro Test<C1, C2>(
355355
/// During testing, the associated test function is called once for each element
356356
/// in `zippedCollections`.
357357
///
358+
/// @Comment {
359+
/// - Bug: The testing library should support variadic generics.
360+
/// ([103416861](rdar://103416861))
361+
/// }
362+
///
358363
/// ## See Also
359364
///
360365
/// - <doc:DefiningTests>
361-
//
362-
// @Comment {
363-
// - Bug: The testing library should support variadic generics.
364-
// ([103416861](rdar://103416861))
365-
// }
366366
@attached(peer) public macro Test<C1, C2>(
367367
_ displayName: _const String? = nil,
368368
_ traits: any TestTrait...,

Sources/Testing/Traits/ConditionTrait.swift

+12-12
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,12 @@ extension Trait where Self == ConditionTrait {
115115
///
116116
/// - Returns: An instance of ``ConditionTrait`` that evaluates the
117117
/// closure you provide.
118-
//
119-
// @Comment {
120-
// - Bug: `condition` cannot be `async` without making this function
121-
// `async` even though `condition` is not evaluated locally.
122-
// ([103037177](rdar://103037177))
123-
// }
118+
///
119+
/// @Comment {
120+
/// - Bug: `condition` cannot be `async` without making this function
121+
/// `async` even though `condition` is not evaluated locally.
122+
/// ([103037177](rdar://103037177))
123+
/// }
124124
public static func enabled(
125125
if condition: @autoclosure @escaping @Sendable () throws -> Bool,
126126
_ comment: Comment? = nil,
@@ -174,12 +174,12 @@ extension Trait where Self == ConditionTrait {
174174
///
175175
/// - Returns: An instance of ``ConditionTrait`` that evaluates the
176176
/// closure you provide.
177-
//
178-
// @Comment {
179-
// - Bug: `condition` cannot be `async` without making this function
180-
// `async` even though `condition` is not evaluated locally.
181-
// ([103037177](rdar://103037177))
182-
// }
177+
///
178+
/// @Comment {
179+
/// - Bug: `condition` cannot be `async` without making this function
180+
/// `async` even though `condition` is not evaluated locally.
181+
/// ([103037177](rdar://103037177))
182+
/// }
183183
public static func disabled(
184184
if condition: @autoclosure @escaping @Sendable () throws -> Bool,
185185
_ comment: Comment? = nil,

Tests/TestingTests/TestSupport/TestingAdditions.swift

+10-10
Original file line numberDiff line numberDiff line change
@@ -162,11 +162,11 @@ extension Test {
162162
/// - testFunction: The function to call when running this test. During
163163
/// testing, this function is called once for each element in
164164
/// `collection`.
165-
//
166-
// @Comment {
167-
// - Bug: The testing library should support variadic generics.
168-
// ([103416861](rdar://103416861))
169-
// }
165+
///
166+
/// @Comment {
167+
/// - Bug: The testing library should support variadic generics.
168+
/// ([103416861](rdar://103416861))
169+
/// }
170170
init<C>(
171171
_ traits: any TestTrait...,
172172
arguments collection: C,
@@ -191,11 +191,11 @@ extension Test {
191191
/// - testFunction: The function to call when running this test. During
192192
/// testing, this function is called once for each pair of elements in
193193
/// `collection1` and `collection2`.
194-
//
195-
// @Comment {
196-
// - Bug: The testing library should support variadic generics.
197-
// ([103416861](rdar://103416861))
198-
// }
194+
///
195+
/// @Comment {
196+
/// - Bug: The testing library should support variadic generics.
197+
/// ([103416861](rdar://103416861))
198+
/// }
199199
init<C1, C2>(
200200
_ traits: any TestTrait...,
201201
arguments collection1: C1, _ collection2: C2,

0 commit comments

Comments
 (0)