Module assert_some

Source
Expand description

Assert for Some(_) items.

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

Assert expression is Some:

Compare Some(…) to another Some(…):

Compare Some(…) to an expression:

§Example

use assertables::*;

let a: Option<i8> = Option::Some(1);
assert_some!(a);

Modules§

assert_some
Assert expression is Some.
assert_some_eq
Assert two expressions are Some and their values are equal.
assert_some_eq_x
Assert an expression is Some and its value is equal to an expression.
assert_some_ne
Assert two expressions are Some and their values are not equal.
assert_some_ne_x
Assert an expression is Some and its value is not equal to an expression.