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
This commit is contained in:
Abseil Team 2020-06-02 12:58:22 -04:00 committed by Gennadiy Rozental
parent df6813f5e0
commit 26dadc2241

View File

@ -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. | | `ASSERT_THAT(actual_value, matcher)` | The same as `EXPECT_THAT(actual_value, matcher)`, except that it generates a **fatal** failure. |
<!-- mdformat on --> <!-- 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. Built-in matchers (where `argument` is the function argument, e.g.
`actual_value` in the example above, or when used in the context of `actual_value` in the example above, or when used in the context of
`EXPECT_CALL(mock_object, method(matchers))`, the arguments of `method`) are `EXPECT_CALL(mock_object, method(matchers))`, the arguments of `method`) are