Attribute Macro testgen::fail

source ·
#[fail]
Expand description

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

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

Example:

use testgen::fail;

#[fail(1 => 1)]
#[fail(name="oof", 1 => 6)]
fn add_one(n: i32) -> i32 {
    n + 1
}