galvanic_assert::matchers

Function leq

Source
pub fn leq<'a, T: PartialOrd + Debug + 'a>(
    expected: T,
) -> Box<dyn Matcher<'a, T> + 'a>
Expand description

Matches if the asserted value is less than or equal to the expected value.

This is the same as less_than_or_equal.

#Examples

use galvanic_assert::matchers::*;
assert_that!(&(1+1), leq(3));
assert_that!(&(1+1), leq(2));