Attribute Macro testgen::pass

source ·
#[pass]
Expand description

Test for a single input => expected. Good for quick sanity checks. Optionally named.

Can be used multiple times but only if each test has differing names.

Example:

use testgen::pass;

#[pass(1 => 2)]
#[pass(name="turbofish", 2 => 3)]
fn add_one(n: i32) -> i32 {
    n + 1
}