On Wed, Sep 8, 2010 at 1:18 PM, Edgar <oat...@gmail.com> wrote:
> To answer my own question it's not possible using the usual
> MOCK_METHOD macros.
>
> I've been able to create MOCK_VOLATILE_METHODn macros similar to the
> MOCK_METHODn ones.
>
> Are these macros useful enough to be included in gmock? I've only
> created MOCK_VOLATILE_METHOD and MOCK_CONST_VOLATILE_METHOD macros, if
> done completely it would double the number of method mocking macros.
> Is it best to create an "issue" for this?
I created http://code.google.com/p/googlemock/issues/detail?id=122 to
track this.
As you said, implementing MOCK_VOLATILE_METHOD0() and friends
completely will end up with a combinatorial explosion, so it isn't
viable. I think we'll instead provide a more generic family of macros
that require the user to provide more arguments but are more flexible.
Please see the issue for details. Thanks.
>
> - Edgar
>
> On Sep 3, 10:13 am, Edgar <oat...@gmail.com> wrote:
>> Hello,
>> I have a class where some methods have the volatile qualifier. Is
>> there a way to mock these in googleMock?
>>
>> eg:
>> virtual int foo() volatile = 0;
>>
>> Thanks,
>> - Edgar
>
--
Zhanyong