abisco
unread,Mar 31, 2011, 11:46:29 AM3/31/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google C++ Mocking Framework
I ran into a strange problem using AllOf() with Property(). Here's a
call that works:
EXPECT_CALL(myMock, makeWidget(AllOf(Property(&ParamsClass::getArg1,
expectedArg1),
Property(&ParamsClass::getArg2, expectedArg2),
Property(&ParamsClass::getArg3, expectedArg3),
Property(&ParamsClass::getArg4, expectedArg4),
Property(&ParamsClass::getArg5, expectedArg5))))
.Times(1)
.WillOnce(Return(expectedRetValue));
As soon as I add another Property() matcher, I get:
error: no matching function for call to
'AllOf(testing::PolymorphicMatcher<testing::internal::PropertyMatcher<ParamsClass,
int> >,
testing::PolymorphicMatcher<testing::internal::PropertyMatcher<ParamsClass,
int> >,
testing::PolymorphicMatcher<testing::internal::PropertyMatcher<ParamsClass,
double> >,
testing::PolymorphicMatcher<testing::internal::PropertyMatcher<ParamsClass,
int> >,
testing::PolymorphicMatcher<testing::internal::PropertyMatcher<ParamsClass,
double> >,
testing::PolymorphicMatcher<testing::internal::PropertyMatcher<ParamsClass,
int> >)'
from my MinGW-5.1.4\bin\make.exe
I think it's clear that I'm trying to test
myMock::makeWidget(ParamsClass& paramsObject) ,
where I have several ParamsClass::getArg#() const getters.
Any ideas as to what can cause this?
Build under Eclipse Galileo3.5 on Windows XP 32, with Eclipse 6.0.2 C/C
++ dev platform and the CDT GCC cross compiler 1.0.0