I am testing whether my class calls a method on a mocked class, with the proper argument. I have set up a basic expectation:
// mListener is a mocked object
// This expectation accepts any argument
EXPECT_CALL(this->mListener, OnChanged(_))
.Times(1);
This is fine, but I also want to verify the argument. It is an object which only has accessors that use output parameters:
// aValue is an output parameter
HRESULT get_Value(int* aValue);
How can I define a matcher that will inspect the value that get_Value
puts into aValue
?