boost::shared_ptr<Message> ReceiveMessage();
with the following mock declaration:
MOCK_METHOD0(ReceiveMessage, boost::shared_ptr<CciMessage>());
This compiles without problems. I would like to write an EXPECT_CALL
that returns a shared_ptr that points to an object with a particular
value. I've tried things like
Message message;
EXPECT_CALL(mLayer,
ReceiveMessage()).Times(1).WillOnce(Return(Pointee(message)));
but this does not compile. There's no specific Returnx() for a
boost::shared_ptr, like there is for a C++ reference. Is this
possible? Perhaps there is another way to go about this?
I have a class member function with following signature:
boost::shared_ptr<Message> ReceiveMessage();
with the following mock declaration:
MOCK_METHOD0(ReceiveMessage, boost::shared_ptr<CciMessage>());
This compiles without problems. I would like to write an EXPECT_CALL
that returns a shared_ptr that points to an object with a particular
value. I've tried things like
Message message;
EXPECT_CALL(mLayer,
ReceiveMessage()).Times(1).WillOnce(Return(Pointee(message)));
but this does not compile.
There's no specific Returnx() for a
boost::shared_ptr, like there is for a C++ reference. Is this
possible? Perhaps there is another way to go about this?