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
- Host: GitHub
- URL: https://github.com/lu-zero/interpolate_name
- Owner: lu-zero
- License: mit
- Created: 2018-08-07T02:30:25.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2023-09-12T13:08:54.000Z (almost 3 years ago)
- Last Synced: 2024-05-02T00:15:32.383Z (about 2 years ago)
- Topics: rust, testing
- Language: Rust
- Size: 9.77 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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
```