Open
Description
Description
If a recursive SuiteTrait type fails to also conform to TestSuite, you get a runtime crash (apparently an assertion failure)
Reproduction
// DANGER: missing TestSuite conformance
struct TestConfiguration: SuiteTrait, TestScoping {
let isRecursive: Bool = true
func provideScope(for test: Test, testCase: Test.Case?, performing function: @Sendable () async throws -> Void) async throws {
try await function()
}
}
extension Trait where Self == TestConfiguration {
static var testConfiguration: Self { Self() }
}
@Suite(.testConfiguration)
struct DemoSuite {
@Test func demo1() {}
Expected behavior
Ideally, some sort of catastrophic but non-crashing result. Or, at least, a clearer indication as to what's wrong
Environment
Xcode 16.3
Testing Library Version: 124
Additional information
No response