construct

Attribute Macro construct 

Source
#[construct]
Expand description

Turns something like:

#[mod_template::construct(one = 1, mut to_be_three: i32 = 2)]
#[test]
fn test_one_adds_three() {
    to_be_three += 1;
    assert_eq!(format!("{}", one + to_be_three), four_text.to_string())
}

into:

#[test]
fn test_one_adds_three() {
    let one = 1;
    let mut to_be_three: i32 = 2;
    let four_text = {
        fn type_checked() -> impl std::fmt::Display { "4" }
        type_checked()
    };
    to_be_three += 1;
    assert_eq!(format!("{}", one + to_be_three), four_text.to_string())
}

See mod_template::construct.