last day (15 days later) » 

3:43 AM
0
Q: Google Mocking Framework Matcher Elements Array comparision

liv2hakI have a google test that make a call EXPECT_THAT(unit.OnEndStartup(), ::testing::ElementsAre( IsEvent(Result::NoError,Type::S , ""), IsEvent(Result::NoError,Type::N , ""), IsEvent(Result::NoError,Type::E , ""), IsEvent(Result::NoError,Type::C , "") )); IsEvent is ...

 
Is equality defined for Info?
 
@Yang- I have operator== defined. Please see updated code
 
What's the compilation error?
 
@Yang - Please see error above. for some reason it is not recognizing operator==
 
In your operator==, can you try to make the parameter const EventInfo& e1?
 
3:43 AM
@Yang- I tried it. Surprisingly I am getting the same error.
 
Did you define it in Info or EventInfo? You need to define it in Info, and take const Info& e1.
 
sorry I defnied it in Info. There is not struct called EventInfo now
 
Can you paste your current operator==?
 
inline bool operator==(Info &e1)
{
return (e1.result == result
&& e1.package == package
&& e1.newVersion == newVersion);
}
 
Can you make it const Info& e1?
 
3:45 AM
ok. let me try that.
I have made the changes. build is taking slightly more time
 
Does it work?
 
no it doesnt
same error
 
I see, sorry I need to go
 

last day (15 days later) »