diff --git a/src/matchers/vecs.rs b/src/matchers/vecs.rs index ee9b825..9de4352 100644 --- a/src/matchers/vecs.rs +++ b/src/matchers/vecs.rs @@ -123,6 +123,19 @@ fn is_next_index(current_index: &usize, previous_index: &Option) -> bool return true; } +/// Creates a matcher that checks if actual vector has all items of the given vector. +/// +/// # Examples +/// +/// ``` +/// #[macro_use] extern crate hamcrest; +/// use hamcrest::prelude::*; +/// +/// fn main() { +/// assert_that!(&vec![1, 2, 3, 4], contains_all_of(vec![1, 2, 3])); +/// assert_that!(&vec![1, 2, 3], does_not(contain_all_of(vec![1, 2, 4]))); +/// } +/// ``` pub fn contains_all_of(items: Vec) -> Contains { Contains { items: items,