rstest 0.4.1

Rust fixture based test framework. It use procedural macro to implement fixtures and table based tests.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use rstest::*;

#[derive(Debug)]
struct A {}

#[fixture]
fn fu32() -> u32 { 42 }
#[fixture]
fn fstring() -> String { "A String".to_string() }
#[fixture]
fn ftuple() -> (A, String, i32) { (A{}, "A String".to_string(), -12) }

#[rstest(::trace)]
fn should_fail(fu32: u32, fstring: String, ftuple: (A, String, i32)) {
    assert!(false);
}