Expand description
Assert macros for comparing iter collections.
These macros help with comparison of iter parameters, such as two arrays or two vectors. These macros convert each input using the std::iter::Iterator trait.
-
assert_iter_eq!(collection1, collection2)≈ iter a = iter b -
assert_iter_ne!(collection1, collection2)≈ iter a ≠ iter b -
assert_iter_lt!(collection1, collection2)≈ iter a < iter b -
assert_iter_le!(collection1, collection2)≈ iter a ≤ iter b -
assert_iter_gt!(collection1, collection2)≈ iter a > iter b -
assert_iter_ge!(collection1, collection2)≈ iter a ≥ iter b
§Example
use assertables::*;
let a = [1, 2];
let b = [1, 2];
assert_iter_eq!(&a, &b);Modules§
- Assert an iter is equal to another.
- Assert an iter is greater than or equal to another.
- Assert an iter is greater than another.
- Assert an iter is less than or equal to another.
- Assert an iter is less than another.
- Assert an iter is not equal to another.