Attribute Macro interpolate_name::interpolate_test
source · #[interpolate_test]
Expand description
Generate a new test that calls the decorated function with the provided arguments.
The test function name is the same as the called plus _
and specifier
.
Can decorate the same function multiple times.
use interpolate_name::interpolate_test;
#[interpolate_test(some, "some", "arguments", 1)]
#[interpolate_test(name, "other", "arguments", 42)]
fn foo(a: &str, b: &str, c: usize) {
println!("{} {} {}", a, b,c);
}
produces:
#[test]
fn foo_some() { foo("some", "arguments", 1); }
#[test]
fn foo_name() { foo("other", "arguments", 42); }