frondeus / test-case

Rust procedural macro attribute for adding test cases easily
MIT License
614 stars 39 forks source link

Allow replacement of test-case assertion on per-fn scale #83

Open luke-biel opened 2 years ago

luke-biel commented 2 years ago

Currently test_case allows replacing it's built in assert via using and with keywords.

We'd like to be able to replace assertion on per-function and global levels. This refers to requirements specified within https://github.com/frondeus/test-case/issues/31.

Initial work specifies

#[test_case(input2)]
#[test_case_use(assert_nan)]
fn tested(v: X) -> f64 {
    ...
}

as possible solution for per-function replacements.