Macro assure::assure_set_eq [−][src]
Assure two sets are equal.
This implementation uses [HashSet
] 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, 2]; let b = [2, 1]; assure_set_eq!(&a, &b);
Example with linked lists
use std::collections::LinkedList; let mut a = LinkedList::new(); a.push_back(1); a.push_back(2); let mut b = LinkedList::new(); b.push_back(2); b.push_back(1); assure_set_eq!(&a, &b);