You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Currently CheckAllTestCases and RunAllTestCases function take a tuple of the form: (name : String, test_case : () -> 'T, expected : 'T). So, Iif someone wants to test a function for multiple inputs/outputs it leads to code duplication.
CheckAllTestCases([
("Should add 1 to 5", () -> AddOne(5), 6),
("Should add 1 to 5", () -> AddOne(6), 7),
]);
function AddOne(x: Int) : Int {
return x+1;
}
Describe the solution you'd like
Allow CheckAllTestCases and RunAllTestCases function by having input array and expected output array for a function. This is motivated by pytest.mark.parameterize that allows listing inputs and expected outputs
CheckAllTestCases([
("Should add 1 to 5", (x) -> AddOne(x), [5,6], [6, 7]),
]);
function AddOne(x: Int) : Int {
return x+1;
}
Describe alternatives you've considered
Have duplicate entries in testcases array in CheckAllTestCases and RunAllTestCases function.
Is your feature request related to a problem? Please describe.
Currently
CheckAllTestCases
andRunAllTestCases
function take a tuple of the form:(name : String, test_case : () -> 'T, expected : 'T)
. So, Iif someone wants to test a function for multiple inputs/outputs it leads to code duplication.Describe the solution you'd like
Allow
CheckAllTestCases
andRunAllTestCases
function by having input array and expected output array for a function. This is motivated by pytest.mark.parameterize that allows listing inputs and expected outputsDescribe alternatives you've considered
Have duplicate entries in testcases array in
CheckAllTestCases
andRunAllTestCases
function.Additional context
See #2013 (comment)
The text was updated successfully, but these errors were encountered: