Function galvanic_assert::matchers::collection::contains_subset [] [src]

pub fn contains_subset<'a, T: 'a, I: 'a, J: 'a>(
    expected_elements: I
) -> Box<Matcher<'a, J> + 'a> where
    T: PartialEq + Debug,
    I: IntoIterator<Item = T>,
    J: IntoIterator<Item = T>,
    ContainsSubset<T>: Matcher<'a, J>, 

Matches if the asserted collection contains all (possibly more) of the expected elements.

Examples

use galvanic_assert::matchers::collection::*;
assert_that!(&vec![1,2,3,4,5,6], contains_subset(vec![3,1,2,4]));