Skip to content
Merged
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
7 changes: 3 additions & 4 deletions Sources/_TestDiscovery/TestContentRecord.swift
Original file line number Diff line number Diff line change
Expand Up @@ -223,10 +223,9 @@ private import _TestingInternals
/// - nameSubstring: A string which the names of matching classes all contain.
///
/// - Returns: A sequence of Swift types whose names contain `nameSubstring`.
///
/// - Warning: Do not adopt this functionality in new code. It is for use by
/// Swift Testing along its legacy discovery codepath only.
package func types(withNamesContaining nameSubstring: String) -> some Sequence<Any.Type> {
@_spi(Experimental) @_spi(ForToolsIntegrationOnly)
@available(swift, deprecated: 100000.0, message: "Do not adopt this functionality in new code. It will be removed in a future release.")
public func types(withNamesContaining nameSubstring: String) -> some Sequence<Any.Type> {
SectionBounds.all(.typeMetadata).lazy.flatMap { sb in
stride(from: sb.buffer.baseAddress!, to: sb.buffer.baseAddress! + sb.buffer.count, by: SWTTypeMetadataRecordByteCount).lazy
.compactMap { swt_getType(fromTypeMetadataRecord: $0, ifNameContains: nameSubstring) }
Expand Down