Macro assure::assure_bag_ne[][src]

macro_rules! assure_bag_ne {
    ($left:expr, $right:expr $(,)?) => { ... };
    ($left:expr, $right:expr, $($arg:tt)+) => { ... };
}

Assure two bags are not 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, 1];
assure_bag_ne!(&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);
b.push_back(1);
assure_bag_ne!(&a, &b);