# Are these "tuple splat" parameterized tests legit?

**URL:** <https://forums.swift.org/t/are-these-tuple-splat-parameterized-tests-legit/73250>\
**Category:** Swift Testing\
**Tags:** tuple\
**Created:** [July 18, 2024, 12:15am UTC](https://forums.swift.org/t/are-these-tuple-splat-parameterized-tests-legit/73250 "2024-07-18T00:15:55Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Quedlinbug](https://avatars.discourse-cdn.com/v4/letter/q/77aa72/32.png) [@Quedlinbug](https://forums.swift.org/u/Quedlinbug)\
**Post date:** [July 18, 2024, 4:14am UTC](https://forums.swift.org/t/are-these-tuple-splat-parameterized-tests-legit/73250/3 "2024-07-18T04:14:21Z")

</div>

> [@Using tuple pattern in closure parameters](https://forums.swift.org/t/using-tuple-pattern-in-closure-parameters/67917/5):
>
> It is fine to use, because it is a deliberate, special-case exception to the rules implemented in SE-0110:

* * *

This is one of the use cases of `forEach`.

```swift
let array = [
  (1, 2, 3),
  (4, 5, 6),
  (7, 8, 9)
]
func f1(_: (x: Int, y: Int, z: Int)) { }
func f2(x: Int, y: Int, z: Int) { }
array.forEach(f1)
array.forEach(f2)

```

The first form, which takes a tuple, will yield a usage warning for mismatched labels. Tests do not care about labels.

```swift
@Test(
  arguments: [
    (a: 1, b: 2, c: 3),
    (a: 4, b: 5, c: 6),
    (a: 7, b: 8, c: 9)
  ]
) func t1(x: Int, y: Int, z: Int) { }

@Test(
  arguments: [
    (1, 2, 3),
    (4, 5, 6),
    (7, 8, 9)
  ]
) func t2(x: Int, y: Int, z: Int) { }

```

---

_[View the full topic](https://forums.swift.org/t/are-these-tuple-splat-parameterized-tests-legit/73250)._
