Module assert_err

Source
Expand description

Assert for Err(…) items.

These macros help compare Err(…) items, such as ::std::Result::Err or similar.

Assert expression is Err:

Compare Err(…) to another Err(…):

Compare Err(…) to an expression:

§Example

use assertables::*;

let a: Result<i8, i8> = Err(1);
assert_err!(a);

Modules§

assert_err
Assert expression is Err.
assert_err_eq
Assert two expressions are Err and their values are equal.
assert_err_eq_x
Assert an expression is Err and its value is equal to an expression.
assert_err_ne
Assert two expressions are Err and their values are not equal.
assert_err_ne_x
Assert an expression is Err and its value is not equal to an expression.