Homec4science

Googletest export

Authored by Abseil Team <absl-team@google.com> on Dec 11 2018, 04:46.

Description

Googletest export

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: 224929783

Details

Committed
Gennadiy Civil <misterg@google.com>Dec 11 2018, 16:11
Pushed
trottetDec 4 2019, 13:52
Parents
R9484:695cf7c96249: Merge pull request #1997 from gpakosz:GTEST_IS_THREADSAFE
Branches
Unknown
Tags
Unknown

Event Timeline

Gennadiy Civil <misterg@google.com> committed R9484:06bb8d4d6dcf: Googletest export (authored by Abseil Team <absl-team@google.com>).Dec 11 2018, 16:11