diff --git a/Documentation/ABI/TestContent.md b/Documentation/ABI/TestContent.md index cd12b2872..370566eb3 100644 --- a/Documentation/ABI/TestContent.md +++ b/Documentation/ABI/TestContent.md @@ -252,14 +252,14 @@ a custom `hint` type for your accessor functions, you can set extension FoodTruckDiagnostic: DiscoverableAsTestContent { static var testContentKind: TestContentKind { /* Your `kind` value here. */ } - typealias TestContentContext = UnsafePointer + typealias TestContentContext = UnsafePointer? typealias TestContentAccessorHint = String } ``` If you customize `TestContentContext`, be aware that the type you specify must have the same stride as `UInt` and must have an alignment less than or equal to -that of `UInt`. +that of `UInt`. The type must also conform to [`ConvertibleFromBytes`](https://developer.apple.com/documentation/swift/convertiblefrombytes). When you are done configuring your type's protocol conformance, you can then enumerate all test content records matching it as instances of diff --git a/Sources/_TestDiscovery/DiscoverableAsTestContent.swift b/Sources/_TestDiscovery/DiscoverableAsTestContent.swift index 0484dd8af..565baef0d 100644 --- a/Sources/_TestDiscovery/DiscoverableAsTestContent.swift +++ b/Sources/_TestDiscovery/DiscoverableAsTestContent.swift @@ -31,7 +31,7 @@ public protocol DiscoverableAsTestContent: Sendable { /// type with the same stride and alignment as `UInt`. Using a type with /// different stride or alignment will result in a failure when trying to /// discover test content records associated with this type. - associatedtype TestContentContext: BitwiseCopyable = UInt + associatedtype TestContentContext: ConvertibleFromBytes = UInt /// A type of "hint" passed to ``allTestContentRecords()`` to help the testing /// library find the correct result.