Function googletest::matchers::points_to

source ·
pub fn points_to<ExpectedT, MatcherT, ActualT>(
    expected: MatcherT
) -> impl Matcher<ActualT = ActualT>
where ExpectedT: Debug, MatcherT: Matcher<ActualT = ExpectedT>, ActualT: Deref<Target = ExpectedT> + Debug + ?Sized,
Expand description

Matches a (smart) pointer pointing to a value matched by the Matcher expected.

This allows easily matching smart pointers such as Box, Rc, and Arc. For example:

verify_that!(Box::new(123), points_to(eq(123)))?;