diff options
author | Abseil Team <absl-team@google.com> | 2022-12-19 16:27:30 (GMT) |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2022-12-19 16:28:01 (GMT) |
commit | a4e0be898bc81cdbf96731336cb41ff03a6b1cc5 (patch) | |
tree | 7602ac9db708fcf43d7c932a919534d62f6d4aed /docs | |
parent | 3fa7f983c69f780378b4d1ad44d36030ca951ba6 (diff) | |
download | googletest-a4e0be898bc81cdbf96731336cb41ff03a6b1cc5.zip googletest-a4e0be898bc81cdbf96731336cb41ff03a6b1cc5.tar.gz googletest-a4e0be898bc81cdbf96731336cb41ff03a6b1cc5.tar.bz2 |
Specify a name for a `Property` in a code example.
It is good practice to specify a name for the `testing::Property` matcher's use in diagnostics, and we should do so in our examples.
PiperOrigin-RevId: 496406309
Change-Id: Ibb4d1ba63771b5d6855442b91564027cda8ddaca
Diffstat (limited to 'docs')
-rw-r--r-- | docs/gmock_cook_book.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/gmock_cook_book.md b/docs/gmock_cook_book.md index 6a795ec..7672457 100644 --- a/docs/gmock_cook_book.md +++ b/docs/gmock_cook_book.md @@ -904,7 +904,7 @@ using ::testing::Contains; using ::testing::Property; inline constexpr auto HasFoo = [](const auto& f) { - return Property(&MyClass::foo, Contains(f)); + return Property("foo", &MyClass::foo, Contains(f)); }; ... EXPECT_THAT(x, HasFoo("blah")); |