This commit is contained in:
Manikandan K S 2026-09-04 05:02:02 +00:00 committed by GitHub
commit ec6abbe68e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 0 deletions

View File

@ -15,6 +15,8 @@ brevity, but you should do it in your own code.
Mock classes are defined as normal classes, using the `MOCK_METHOD` macro to
generate mocked methods. The macro gets 3 or 4 parameters:
Note that a mocked method can have at most 31 arguments.
```cpp
class MyMock {
public:

View File

@ -16,6 +16,8 @@ GoogleTest defines the following macros for working with mocks.
Defines a mock method *`method_name`* with arguments `(`*`args...`*`)` and
return type *`return_type`* within a mock class.
The number of arguments is limited to 31.
The parameters of `MOCK_METHOD` mirror the method declaration. The optional
fourth parameter *`specs...`* is a comma-separated list of qualifiers. The
following qualifiers are accepted: