summaryrefslogtreecommitdiffstats
path: root/googlemock
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2019-12-02 20:30:24 (GMT)
committerMark Barolak <mbar@google.com>2019-12-02 21:42:01 (GMT)
commitae8d1fc81b1469905b3d0fa6f8a077f58fc4b250 (patch)
tree7434b2c02c298eb92cb7ae60ed2100e33077c2f4 /googlemock
parent52825d78aac66e146f2f56bc5d4268d87992380b (diff)
downloadgoogletest-ae8d1fc81b1469905b3d0fa6f8a077f58fc4b250.zip
googletest-ae8d1fc81b1469905b3d0fa6f8a077f58fc4b250.tar.gz
googletest-ae8d1fc81b1469905b3d0fa6f8a077f58fc4b250.tar.bz2
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
Diffstat (limited to 'googlemock')
-rw-r--r--googlemock/docs/cheat_sheet.md6
1 files changed, 6 insertions, 0 deletions
diff --git a/googlemock/docs/cheat_sheet.md b/googlemock/docs/cheat_sheet.md
index f6e7349..b425e0a 100644
--- a/googlemock/docs/cheat_sheet.md
+++ b/googlemock/docs/cheat_sheet.md
@@ -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) -->