Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Array of tuple object as an argument in macro #15

Open
mkowalski87 opened this issue Nov 16, 2023 · 0 comments
Open

Array of tuple object as an argument in macro #15

mkowalski87 opened this issue Nov 16, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@mkowalski87
Copy link
Contributor

mkowalski87 commented Nov 16, 2023

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) {
	
}
@mmysliwiec mmysliwiec added the enhancement New feature or request label Nov 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants