Module collection

Source
Expand description

The collection module contains matchers for asserting properties of collections and iterators.

Structs§

ContainedIn
Matches if the asserted (single) value is contained in the expected elements.
ContainsInAnyOrder
Matches if the asserted collection contains all and only the expected elements in any order.
ContainsInOrder
Matches if the asserted collection contains all and only of the expected elements in the given order.
ContainsSubset
Matches if the asserted collection contains all (possibly more) of the expected elements.
HasEntry
Matches if the map-like collection contains the given key/value pair.
HasKey
Matches if the map-like collection contains the given key.
HasValue
Matches if the map-like collection contains the given value.

Functions§

all_elements_satisfy
Matches if all elements in the asserted collection satisfy the given predicate.
contained_in
Matches if the asserted (single) value is contained in the expected elements.
contains_in_any_order
Matches if the asserted collection contains all and only of the expected elements in any order.
contains_in_order
Matches if the asserted collection contains all and only of the expected elements in the given order.
contains_subset
Matches if the asserted collection contains all (possibly more) of the expected elements.
has_entry
Matches if the map-like collection contains the given key/value pair.
has_key
Matches if the map-like collection contains the given key.
has_value
Matches if the map-like collection contains the given value.
some_elements_satisfy
Matches if at least one element in the asserted collection satisfy the given predicate.
sorted_ascending
Matches if the asserted collection is sorted weakly ascending.
sorted_by
Matches if the elements in the asserted collection are sorted weakly monotone according to the given predicate in the expected order.
sorted_by_in_any_order
Matches if the elements in the asserted collection are sorted weakly monotone according to the given predicate in any order.
sorted_descending
Matches if the asserted collection is sorted weakly descending.
sorted_strictly_ascending
Matches if the asserted collection is sorted strictly ascending.
sorted_strictly_by
Matches if the elements in the asserted collection are sorted strictly monotone according to the given predicate in the expected order`.
sorted_strictly_by_in_any_order
Matches if the elements in the asserted collection are sorted strictly monotone according to the given predicate in any order.
sorted_strictly_descending
Matches if the asserted collection is sorted strictly descending.