> I believe this isn't working because SaveArg uses the assignment operator to
> copy the value and protobufs do not support assignment operators. You can
> define a custom action as a workaround:
>
> // ACTION Needs to be defined at namespace level
> ACTION_P(SaveProtobuf, proto) { proto->CopyFrom(arg0); }
> my_protobuf::Foo data;
> EXPECT_CALL(mock_object, HandleData(_)).WilOnce(SaveProtobuf(&data);
>
> HTH,
> Vlad
>
Thanks for your help Vlad. That worked perfectly.
I have to say, I'm very impressed with how flexible googlemock is. It
seems like there's always a way to get at the data I'm interested in.
I'll have to do some more reading on how parameterized actions work.
Thanks!
-Michael