Functions

  • template <typename MatcherTrue, typename MatcherFalse>
    internal::ConditionalMatcher<MatcherTrue, MatcherFalse> Conditional (bool condition, MatcherTrue matcher_true, MatcherFalse matcher_false)

    Conditional() creates a matcher that conditionally uses either the first or

    second matcher provided. For example, we could create an `equal if, and only

    if' matcher using the Conditional wrapper as follows:

    EXPECT_THAT(result, Conditional(condition, Eq(expected), Ne(expected)));

    Defined at line 5277 of file ../../third_party/googletest/src/googlemock/include/gmock/gmock-matchers.h

  • template <typename... M>
    internal::FieldsAreMatcher<typename std::decay<M>::type...> FieldsAre (M &&... matchers)

    FieldsAre(matchers...) matches piecewise the fields of compatible structs.

    These include those that support `get

    <I

    >(obj)`, and when structured bindings

    are enabled any class that supports them.

    In particular, `std::tuple`, `std::pair`, `std::array` and aggregate types.

    Defined at line 5288 of file ../../third_party/googletest/src/googlemock/include/gmock/gmock-matchers.h

  • template <typename InnerMatcher>
    internal::PointerMatcher<InnerMatcher> Pointer (const InnerMatcher & inner_matcher)

    Creates a matcher that matches a pointer (raw or smart) that matches

    inner_matcher.

    Defined at line 5297 of file ../../third_party/googletest/src/googlemock/include/gmock/gmock-matchers.h

  • template <typename InnerMatcher>
    internal::AddressMatcher<InnerMatcher> Address (const InnerMatcher & inner_matcher)

    Creates a matcher that matches an object that has an address that matches

    inner_matcher.

    Defined at line 5305 of file ../../third_party/googletest/src/googlemock/include/gmock/gmock-matchers.h

  • template <typename MatcherType>
    internal::WhenBase64UnescapedMatcher WhenBase64Unescaped (const MatcherType & internal_matcher)

    Matches a base64 escaped string, when the unescaped string matches the

    internal matcher.

    Defined at line 5313 of file ../../third_party/googletest/src/googlemock/include/gmock/gmock-matchers.h