4 ms·
I do like C# test casing better where you take n+1 params. N being n params in function, and return value being the expected value. Very clean #[test_c
by Ygg2 3y ago
I do like C# test casing better where you take n+1 params. N being n params in function, and return value being the expected value. Very clean
#[test_case(-2, -4, 8 ; "when both operands are negative")]
#[test_case(2, 4, 8 ; "when both operands are positive")]
#[test_case(4, -2, 8 ; "when one operands is negative")]
fn multiplication_tests(x: i8, y: i8) -> i8 {
x * y
}