XCTestParametrizedMacro icon indicating copy to clipboard operation
XCTestParametrizedMacro copied to clipboard

Array of tuple object as an argument in macro

Open mkowalski87 opened this issue 1 year ago • 0 comments

As an enhancement, we could introduce an option to pass an array of tuples as an argument to the macro. This syntax would make it easier to discern which input corresponds to the output.

with input and output

@Parametrize(arguments: [
(input1, output1),
(input2, output2),
(input3, output3)
])
func testMethod(input n: I, output o: O) {
	
}

without output but with labels

@Parametrize(arguments: [
(input1, "label1"),
(input2, "label2"),
(input3, "label3")
])
func testMethod(input n: I) {
	
}

with input, output and labels

@Parametrize(arguments: [
(input1, output1, "label1"),
(input2, output2, "label2"),
(input3, output3, "label3")
])
func testMethod(input n: I, output o: O) {
	
}

mkowalski87 avatar Nov 16 '23 09:11 mkowalski87