diff options
author | Abseil Team <absl-team@google.com> | 2020-06-02 12:58:22 -0400 |
---|---|---|
committer | Gennadiy Rozental <rogeeff@google.com> | 2020-06-02 20:45:11 -0400 |
commit | 26dadc2241b1d67e0cd3690f8ef90cd1e4294d03 (patch) | |
tree | db6d4ec1f68d5082ea000fac7e6c3a4c842f414a | |
parent | df6813f5e0770f5028b4e897871478e3b8c98969 (diff) | |
download | googletest-26dadc2241b1d67e0cd3690f8ef90cd1e4294d03.tar.gz |
Googletest export
Note that EXPECT_EQ(actual_value, expected_value) or EXPECT_THAT(actual_value, Eq(expected_value)) is preferred over EXPECT_THAT(actual_value, expected_value).
PiperOrigin-RevId: 314350852
-rw-r--r-- | googlemock/docs/cheat_sheet.md | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/googlemock/docs/cheat_sheet.md b/googlemock/docs/cheat_sheet.md index 1e0541ba..f2fb2723 100644 --- a/googlemock/docs/cheat_sheet.md +++ b/googlemock/docs/cheat_sheet.md @@ -239,6 +239,11 @@ A **matcher** matches a *single* argument. You can use it inside `ON_CALL()` or | `ASSERT_THAT(actual_value, matcher)` | The same as `EXPECT_THAT(actual_value, matcher)`, except that it generates a **fatal** failure. | <!-- mdformat on --> +**Note:** Although equality matching via `EXPECT_THAT(actual_value, +expected_value)` is supported, prefer to make the comparison explicit via +`EXPECT_THAT(actual_value, Eq(expected_value))` or `EXPECT_EQ(actual_value, +expected_value)`. + Built-in matchers (where `argument` is the function argument, e.g. `actual_value` in the example above, or when used in the context of `EXPECT_CALL(mock_object, method(matchers))`, the arguments of `method`) are |