test_concat() { // Define the "table" let tests: [(arg1: String, arg2: String, expected: String)] = [ ("cat", "hat", "cat hat"), ("red", "yellow", "red yellow"), ("", "", " "), // etc ... ] // Assert once per table row for test in tests { let actual = concat(test.arg1, arg2: test.arg2) XCTAssertEqual(actual, test.expected) } }