galvanic_assert::matchers::collection

Function sorted_strictly_descending

Source
pub fn sorted_strictly_descending<'a, T, I>() -> Box<dyn Fn(&'a I) -> MatchResult>
where &'a I: IntoIterator<Item = &'a T> + 'a, T: Ord + Debug + 'a,
Expand description

Matches if the asserted collection is sorted strictly descending.

An empty collection is assumed to be always sorted.

#Examples

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