galvanic_assert::matchers

Function equal_to

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

Matches if the asserted value is equal to the expected value.

This matcher should not be used when asserting floating point values. Use close_to instead. This is the same as eq.

#Examples

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