[][src]Macro assertify::testify

testify!() { /* proc-macro */ }

Create a test function from an expression.

testify! is essentially a wrapper around assertify!. It takes two arguments:

  1. name: A name for the test (as a bareword — don’t use quotes).
  2. expression: The expression to be tested with assertify!.

Examples

The following two examples are equivalent:

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

Assert that an expression is true.

Do not use this directly. Instead, use assertify::assertify.