You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<!--When adding cases to this enumeration, be sure to also update the
105
-
corresponding enumeration in TestContentGeneration.swift. -->
105
+
<!--The kind values listed in this table should be a superset of the cases in
106
+
the `TestContentKind` enumeration. -->
106
107
107
108
If a test content record's `kind` field equals `0x00000000`, the values of all
108
109
other fields in that record are undefined.
@@ -149,25 +150,12 @@ The fourth argument to this function, `reserved`, is reserved for future use.
149
150
Accessor functions should assume it is `0` and must not access it.
150
151
151
152
The concrete Swift type of the value written to `outValue`, the type pointed to
152
-
by `type`, and the value pointed to by `hint` depend on the kind of record:
153
+
by `type`, and the value pointed to by `hint` depend on the kind of record.
153
154
154
-
- For test or suite declarations (kind `0x74657374`), the accessor produces a
155
-
structure of type `Testing.Test.Generator` that the testing library can use
156
-
to generate the corresponding test[^notAccessorSignature].
157
-
158
-
[^notAccessorSignature]: This level of indirection is necessary because
159
-
loading a test or suite declaration is an asynchronous operation, but C
160
-
functions cannot be `async`.
161
-
162
-
Test content records of this kind do not specify a type for `hint`. Always
163
-
pass `nil`.
164
-
165
-
- For exit test declarations (kind `0x65786974`), the accessor produces a
166
-
structure describing the exit test (of type `Testing.ExitTest`.)
167
-
168
-
Test content records of this kind accept a `hint` of type `Testing.ExitTest.ID`.
169
-
They only produce a result if they represent an exit test declared with the
170
-
same ID (or if `hint` is `nil`.)
155
+
The record kinds defined by Swift Testing (kinds `0x74657374` and `0x65786974`)
156
+
make use of the `DiscoverableAsTestContent` protocol in the `_TestDiscovery`
157
+
module and do not publicly expose the types of their accessor functions'
158
+
arguments. Do not call the accessor functions for these records directly.
171
159
172
160
> [!WARNING]
173
161
> Calling code should use [`withUnsafeTemporaryAllocation(of:capacity:_:)`](https://developer.apple.com/documentation/swift/withunsafetemporaryallocation(of:capacity:_:))
0 commit comments