Expand description
Adds parametrization capabilty to #[test]
via #[args]
attribute macro.
§To install via umbrella devbox crate
[dev-dependencies]
devbox = { version = "0.1" }
§Simplest example
#[args(
char_a: 'a';
char_b: 'b' ! "wrong char";
)]
#[test]
fn parametrized_test_for(character:_) {
assert_eq!('a', character, "wrong char");
}
Check #[args] attribute for full example and usage specification.
Attribute Macros§
- This is an attribute complementing Rust’s standard
#[test]
attribute for test parametrization. - Same as
args
but applying standard Rust#[test]
attribute automatically