mirror of
https://github.com/google/googletest.git
synced 2024-12-26 17:41:03 +08:00
Googletest export
Clarify use of IsTrue and IsFalse matchers. These matchers are subtle and confusing: what are they for? The docs in the code are clear, but not very accessible. googletest/googlemock/include/gmock/gmock-more-matchers.h PiperOrigin-RevId: 283393275
This commit is contained in:
parent
52825d78aa
commit
ae8d1fc81b
@ -278,6 +278,12 @@ copy constructor, try wrap it in `ByRef()`, e.g.
|
||||
`Eq(ByRef(non_copyable_value))`. If you do that, make sure `non_copyable_value`
|
||||
is not changed afterwards, or the meaning of your matcher will be changed.
|
||||
|
||||
`IsTrue` and `IsFalse` are useful when you need to use a matcher, or for types
|
||||
that can be explicitly converted to Boolean, but are not implicitly converted to
|
||||
Boolean. In other cases, you can use the basic
|
||||
[`EXPECT_TRUE` and `EXPECT_FALSE`](../../googletest/docs/primer#basic-assertions)
|
||||
assertions.
|
||||
|
||||
#### Floating-Point Matchers {#FpMatchers}
|
||||
|
||||
<!-- mdformat off(no multiline tables) -->
|
||||
|
Loading…
x
Reference in New Issue
Block a user