Module assert_ok

Module assert_ok 

Source
Expand description

Assert for Ok(…) items.

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

Assert expression is Ok:

Compare Ok(…) to another Ok(…):

Compare Ok(…) to an expression:

§Example

use assertables::*;

let a: Result<i8, i8> = Ok(1);
assert_ok!(a);

Modules§

assert_ok
Assert expression is Ok.
assert_ok_eq
Assert two expressions are Ok and their values are equal.
assert_ok_eq_x
Assert an expression is Ok and its value is equal to an expression.
assert_ok_ne
Assert two expressions are Ok and their values are not equal.
assert_ok_ne_x
Assert an expression is Ok and its value is not equal to an expression.