Crate assertify

source ·
Expand description

Deprecated. Use assert2 instead.

This provides two convenience macros to make tests from simple expressions. The failure messages produced by these macros are more instantly obvious than those of assert_eq! and friends, which often require looking at the source code to see the expression that failed.

See assertify! for an example of a failure message.

testify!(add_one_two, 1 + 2 == 3);
#[test]
fn add_one_two() {
    assertify!(1 + 2 == 3);
}

Macros§

  • assertifyDeprecated
    Assert an expression is true or give a useful error when it isn’t.
  • Create a test function from an expression.