assertables

Module assert_bag

source
Expand description

Assert macros for comparing bag collections.

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

For eq & ne:

For subbag & superbag:

§Example

use assertables::*;
let a = [1, 1];
let b = [1, 1];
assert_bag_eq!(&a, &b);

Modules§