An open API service indexing awesome lists of open source software.

https://github.com/lu-zero/interpolate_name

Do not repeat yourself when writing tests
https://github.com/lu-zero/interpolate_name

rust testing

Last synced: 9 months ago
JSON representation

Do not repeat yourself when writing tests

Awesome Lists containing this project

README

          

# Procedural macro attribute to do not repeat yourself while testing

## Usage

``` rust
#[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
```