Module assert_abs_diff

Source
Expand description

Assert for comparing absolute differences.

These macros help with collection lengths, such as for strings, arrays, vectors, iterators, and anything that has a typical .len() method.

Compare an absolute difference with an expression:

§Example

use assertables::*;

let a = 10;
let b = 13;
let x = 3;
assert_abs_diff_eq_x!(a, b, x);

Modules§

assert_abs_diff_eq
Assert an absolute difference is equal to an expression.
assert_abs_diff_eq_x
Assert an absolute difference is equal to an expression.
assert_abs_diff_ge
Assert an absolute difference is greater than or equal to an expression.
assert_abs_diff_ge_x
Assert an absolute difference is greater than or equal to an expression.
assert_abs_diff_gt
Assert an absolute difference is greater than an expression.
assert_abs_diff_gt_x
Assert an absolute difference is greater than an expression.
assert_abs_diff_le
Assert an absolute difference is less than or equal to an expression.
assert_abs_diff_le_x
Assert an absolute difference is less than or equal to an expression.
assert_abs_diff_lt
Assert an absolute difference is less than an expression.
assert_abs_diff_lt_x
Assert an absolute difference is less than an expression.
assert_abs_diff_ne
Assert an absolute difference is not equal to an expression.
assert_abs_diff_ne_x
Assert an absolute difference is not equal to an expression.