-
Notifications
You must be signed in to change notification settings - Fork 39
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
How to use with test-env-log ? #69
Comments
Hello, use test_case::test_case;
#[test_case(4, 2 ; "when operands are swapped")]
#[test_case(-2, -4 ; "when both operands are negative")]
#[test_case(2, 4 ; "when both operands are positive")]
#[test_env_log::test]
fn multiplication_tests(x: i8, y: i8) {
let actual = (x * y).abs();
assert_eq!(8, actual)
} This way If this solves your problem, please close this issue |
Hello, I had not tested in this order Your solution solves my problem Thank you ! |
Thanks for this useful crate! When I use the latest #[cfg(test)]
mod tests {
use test_case::test_case;
#[test_case(0, 0 ; "the same")]
#[test_case(0, 1 ; "different")]
#[test_log::test]
// #[test_env_log::test]
fn equality(a: usize, b: usize) {
log::info!("a: {}", a);
log::info!("b: {}", b);
assert_eq!(a, b)
}
} Output
|
Hmm, that's definitely not a desired result, must've slipped in testing. I'm gonna create a separate bug issue for this. |
Hello,
i tried to use
test-case
withtest-env-log
but i got the errorHow to use with
test-env-log
?related d-e-s-o/test-log#18
maybe related #38
The text was updated successfully, but these errors were encountered: