diff --git a/Sources/Testing/Test+Macro.swift b/Sources/Testing/Test+Macro.swift index 1b1bb59a3..4e9a349d4 100644 --- a/Sources/Testing/Test+Macro.swift +++ b/Sources/Testing/Test+Macro.swift @@ -719,7 +719,7 @@ extension Test { arguments zippedCollections: @escaping @Sendable () async throws -> Zip2Sequence, sourceBounds: __SourceBounds, parameters paramTuples: [__Parameter], - testFunction: nonisolated(nonsending) @escaping @Sendable (C1.Element, C2.Element) async throws -> Void + testFunction: nonisolated(nonsending) @escaping @Sendable ((C1.Element, C2.Element)) async throws -> Void ) -> Self where S: ~Copyable & ~Escapable, C1: Collection & Sendable, C1.Element: Sendable, C2: Collection & Sendable, C2.Element: Sendable { let containingTypeInfo = containingType.map { TypeInfo($0, sourceBounds: sourceBounds) } let parameters = paramTuples.parameters @@ -754,7 +754,7 @@ extension Test { arguments zippedCollections: @escaping @Sendable () async throws -> Zip2Sequence, sourceBounds: __SourceBounds, parameters paramTuples: [__Parameter], - testFunction: nonisolated(nonsending) @escaping @Sendable (C1.Element, C2.Element) async throws -> Void + testFunction: nonisolated(nonsending) @escaping @Sendable ((C1.Element, C2.Element)) async throws -> Void ) -> Self where S: ~Copyable & ~Escapable, C1: Collection & Sendable, C1.Element: Sendable & CustomTestStringConvertible, C2: Collection & Sendable, C2.Element: Sendable & CustomTestStringConvertible { let containingTypeInfo = containingType.map { TypeInfo($0, sourceBounds: sourceBounds) } let parameters = paramTuples.parameters diff --git a/Tests/TestingTests/ZipTests.swift b/Tests/TestingTests/ZipTests.swift index bd767b222..76e19323b 100644 --- a/Tests/TestingTests/ZipTests.swift +++ b/Tests/TestingTests/ZipTests.swift @@ -25,4 +25,9 @@ struct ZipTests { func allElementsEqual(i: Int, j: Int) { #expect(i == j) } + + @Test("Zipped collections can be passed as a single argument", arguments: zip("abc", "def")) + func singleArgument(ij: (Character, Character)) { + #expect(ij.0 < ij.1) + } }