summaryrefslogtreecommitdiffstats
path: root/docs/gmock_cook_book.md
Commit message (Collapse)AuthorAgeFilesLines
* Mention using MockFunction as a way to mock free functions.Abseil Team2023-01-181-0/+4
| | | | | PiperOrigin-RevId: 502901538 Change-Id: I0cf351b9ad1411ae9c45e09550c24e006a24e179
* Fix a typo in the documentation for "Using Predicates as Matchers".Abseil Team2022-12-201-1/+1
| | | | | PiperOrigin-RevId: 496679950 Change-Id: I2842050902876231d49a142165bcbb88d737505d
* Specify a name for a `Property` in a code example.Abseil Team2022-12-191-1/+1
| | | | | | | 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
* Fix a typo in the gMock sample code for Defining a Custom Matcher Class.Abseil Team2022-12-141-1/+1
| | | | | | | EXPECT_CALL doesn't seem to make much sense here. I think the intent was to use EXPECT_THAT instead. PiperOrigin-RevId: 495427663 Change-Id: I39a16ea37282729d34017c6bcd331a60cedf1fbe
* This commit fixes a minor verb conjugation error in gmock_cook_book.md.Abseil Team2022-11-231-1/+1
| | | | | PiperOrigin-RevId: 490601453 Change-Id: I733b2ed8740b1c809dddb166a42993b869198469
* Change MakeUnique -> std::make_unique in docsrefs/pull/4066/headDenis Hananein2022-11-201-4/+4
|
* Use UnorderedElementsAre in example about using matchers with mapsAbseil Team2022-09-091-6/+7
| | | | | PiperOrigin-RevId: 473353707 Change-Id: Ief5bdbd2b8e28bac8f47be9aaeac4bb93875a793
* gmock_cook_book.md: Delete superfluous statement from 2014.Abseil Team2022-06-131-2/+1
| | | | | PiperOrigin-RevId: 454677195 Change-Id: I7a1419e22d617db41a5c310bc6f6158ba4cec1ab
* gmock-actions: make OnceAction public.Aaron Jacobs2022-05-111-12/+51
| | | | | | | | So that it can be referenced in conversion operators for actions that need to know the concrete return type. PiperOrigin-RevId: 447889344 Change-Id: I643d3298bc8effd08741282a956c221f9d67d378
* Rewrite "Testing a Certain Property of an Object" as "Defining a Custom ↵Abseil Team2022-04-281-17/+22
| | | | | | | Matcher Class", and fix the code examples. PiperOrigin-RevId: 445252626 Change-Id: I9f038cb669d3da6743606343c2341fc59725d722
* Fix typo in GoogleMock Cookbook.Abseil Team2021-12-021-1/+1
| | | | | PiperOrigin-RevId: 413674665 Change-Id: I466f87348390f42434a70f183efdf0557be9dddd
* Googletest exportAbseil Team2021-10-131-0/+1
| | | | | | add missing using ::testing::DoAll when DoAll used in example PiperOrigin-RevId: 402416497
* Fix typos discovered by codespellrefs/pull/3573/headChristian Clauss2021-09-161-3/+3
|
* Simplify example code with c++11refs/pull/3531/headtheidexisted2021-08-191-4/+1
|
* typo fix gmock_cook_bookrefs/pull/3511/headBerke2021-08-051-1/+1
|
* Googletest exportAbseil Team2021-06-021-1/+1
| | | | | | Create new Mocking Reference PiperOrigin-RevId: 376951575
* Googletest exportAbseil Team2021-06-021-45/+2
| | | | | | Create Assertions Reference PiperOrigin-RevId: 375824718
* Googletest exportAbseil Team2021-05-191-1/+1
| | | | | | Fix a comment in a code snippet. PiperOrigin-RevId: 374504337
* Googletest exportAbseil Team2021-05-181-27/+17
| | | | | Docs: Clarify that expectations must be set before mocks are exercised PiperOrigin-RevId: 373644072
* Googletest exportAbseil Team2021-04-291-1/+2
| | | | | | Clean up links to Matchers Reference PiperOrigin-RevId: 370821457
* Googletest exportAbseil Team2021-04-291-5/+6
| | | | | | Move matchers reference from cheat sheet into its own document PiperOrigin-RevId: 370749693
* Googletest exportAbseil Team2021-04-291-1/+1
| | | | | | | | Update the `DescribeTo` signature in the code example at the Writing New Polymorphic Matchers section in gmock_cook_book. `os` should be a pointer to be consistent with the implementation, which dereference it as `*os`. PiperOrigin-RevId: 370693387
* Googletest exportAbseil Team2021-04-081-9/+1
| | | | | | | Update the example for Notify to use a lambda. It is much less boilerplate and easier to remember. PiperOrigin-RevId: 367284222
* Googletest exportAbseil Team2021-03-251-3/+3
| | | | | | Clarify explanation of mocking free functions PiperOrigin-RevId: 364943561
* Googletest exportAbseil Team2021-03-251-3/+3
| | | | | | Code style cleanup in docs PiperOrigin-RevId: 364907938
* Googletest exportAbseil Team2021-02-191-3/+17
| | | | | | Add files for GitHub Pages PiperOrigin-RevId: 358289110
* Googletest exportAbseil Team2021-02-181-4/+8
| | | | | | Add files for GitHub Pages PiperOrigin-RevId: 357096486
* Googletest exportAbseil Team2021-02-181-4/+0
| | | | | | Internal change PiperOrigin-RevId: 356867746
* Googletest exportAbseil Team2021-02-051-49/+88
| | | | | | Fix table formatting in cookbook PiperOrigin-RevId: 355659722
* Googletest exportAbseil Team2021-02-051-2/+4
| | | | | | Add a note to recommend against using `Property()` for functions that the test author does not own. PiperOrigin-RevId: 355295183
* Googletest exportAbseil Team2021-02-051-0/+3
| | | | | | Document the fact that MatchAndExplain(T, MatchResultListener*) is supported. PiperOrigin-RevId: 354172275
* Googletest exportAbseil Team2021-01-261-0/+2
| | | | | | Add missing `is_gtest_matcher` to the polymorphic matcher example. PiperOrigin-RevId: 353881883
* Googletest exportAbseil Team2021-01-261-17/+1
| | | | | | Delete internal tags from docs PiperOrigin-RevId: 353769887
* Googletest exportAbseil Team2021-01-261-9/+9
| | | | | | Merge CONTRIBUTORS, delete LICENSEs in googletest/ and googlemock/ PiperOrigin-RevId: 352558822
* Googletest exportAbseil Team2021-01-151-1/+1
| | | | | | Fixes #3222, fixes #3225, closes #3223 PiperOrigin-RevId: 352066131
* Googletest exportAbseil Team2021-01-151-0/+2
| | | | | | Add "using is_gtest_matcher = void" to the DivisibleBy7Matcher example. PiperOrigin-RevId: 351797821
* Googletest exportAbseil Team2021-01-141-66/+113
| | | | | | | | | | | | Change Matcher<T> to allow binding an implementation by value directly: - Drop the requirement of MatcherInterface. Doing manual type erasure avoid extra layers in many cases. - Avoid the adaptor for `MatcherInterface<T>` and `MatcherInterface<const T&>` mismatch. - Use a small object optimization when possible. This makes things like `_` and `Eq(1)` really cheap and do not require memory allocations. - Migrate some matchers to the new model to speed them up and to test the new framework. More matchers to come in future changes. PiperOrigin-RevId: 350580998
* Googletest exportAbseil Team2021-01-141-0/+4267
Move all docs into top-level docs/ directory PiperOrigin-RevId: 350211277