Skip to content
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
4 changes: 2 additions & 2 deletions Documentation/ABI/TestContent.md
Original file line number Diff line number Diff line change
Expand Up @@ -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<FoodTruck.Name>
typealias TestContentContext = UnsafePointer<FoodTruck.Name>?
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
Expand Down
2 changes: 1 addition & 1 deletion Sources/_TestDiscovery/DiscoverableAsTestContent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Loading