• Abseil Team's avatar
    Googletest export · 6ef59138
    Abseil Team authored
    The gmock matchers have a concept of MatchAndExpain; where the details of the
    matching are written to a "result listener". A matcher can avoid creating
    expensive debug info by checking result_listener->IsInterested(); but,
    unfortunately, the default matcher code (called from EXPECT_THAT) is always
    "interested".
    
    This change implements EXPECT_THAT matching to first run the matcher in a "not
    interested" mode; and then run it a second time ("interested") only if the
    match fails.
    
    PiperOrigin-RevId: 225036073
    6ef59138
gmock-matchers_test.cc 225 KB