Function googletest::matchers::displays_as
source · pub fn displays_as<InnerMatcher: for<'a> Matcher<&'a str>>(
inner: InnerMatcher,
) -> DisplayMatcher<InnerMatcher>
Expand description
Matches the string representation of types that implement Display
.
ⓘ
let result: impl Display = ...;
verify_that!(result, displays_as(eq(format!("{}", result))))?;