Module assertables::assert_set

source ·
Expand description

Assert macros for comparing set collections.

These macros help with comparison of set parameters, such as two arrays or two vectors. where the item order does not matter, and the item count does not matter. These macros convert their inputs into HashSet iterators.

For eq & ne:

For subset & superset:

For joint & disjoint:

§Example

let a = [1, 2];
let b = [2, 1];
assert_set_eq!(&a, &b);

Modules§