mirror of https://github.com/google/googletest.git
docs: document MOCK_METHOD argument limit
Fixes #4608
MOCK_METHOD accepts at most 31 arguments (doubled from 15 by
dc3c9eda). Document this limit in gmock_cook_book.md and the
MOCK_METHOD reference.
This commit is contained in:
parent
1b6f64d659
commit
5b3039e827
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in New Issue