interpolate_name

Crates.iointerpolate_name
lib.rsinterpolate_name
version0.2.4
sourcesrc
created_at2018-08-07 02:37:21.308109
updated_at2023-09-12 13:08:18.7746
descriptionSimple procedural macro attribute for repetitive tests
homepage
repositoryhttps://github.com/lu-zero/interpolate_name
max_upload_size
id77881
size10,923
Luca Barbato (lu-zero)

documentation

README

Procedural macro attribute to do not repeat yourself while testing

Usage

#[macro_use]
extern crate interpolate_name;

use interpolate_name::interpolate_test;

#[interpolate_test(foo, "foo")]
#[interpolate_test(bar, "bar")]
#[interpolate_test(baz, "baz")]
fn testme(f: &str) {
    println!("testing {}", f);
}

Produces

running 3 tests
test testme_baz ... ok
test testme_bar ... ok
test testme_foo ... ok
Commit count: 16

cargo fmt