Macro assure::assure_bag_eq [−][src]
Assure two bags are equal.
This implementation uses [HashMap
] to count items.
On error, this macro will print the values of the expressions with their debug representations.
Like assure!
, this macro has a second form,
where a custom message can be provided.
Example with arrays
let a = [1, 1]; let b = [1, 1]; assure_bag_eq!(&a, &b);
Example with linked lists
use std::collections::LinkedList; let mut a = LinkedList::new(); a.push_back(1); a.push_back(1); let mut b = LinkedList::new(); b.push_back(1); b.push_back(1); assure_bag_eq!(&a, &b);