diff --git a/Sources/Testing/Test+Macro.swift b/Sources/Testing/Test+Macro.swift index 50afa755d..637256b16 100644 --- a/Sources/Testing/Test+Macro.swift +++ b/Sources/Testing/Test+Macro.swift @@ -568,7 +568,7 @@ public func __ifMainActorIsolationEnforced( _ selector: __XCTestCompatibleSelector?, onInstanceOf type: T.Type, sourceLocation: SourceLocation -) async throws -> Bool { +) async throws -> Bool where T: ~Copyable { false } diff --git a/Tests/TestingTests/NonCopyableSuiteTests.swift b/Tests/TestingTests/NonCopyableSuiteTests.swift index 56a530199..6e70cab24 100644 --- a/Tests/TestingTests/NonCopyableSuiteTests.swift +++ b/Tests/TestingTests/NonCopyableSuiteTests.swift @@ -16,6 +16,7 @@ struct NonCopyableTests: ~Copyable { @Test borrowing func borrowMe() {} @Test consuming func consumeMe() {} @Test mutating func mutateMe() {} + @Test borrowing func testNotAnXCTestCaseMethod() {} @Test borrowing func typeComparison() { let lhs = TypeInfo(describing: Self.self)