Unlike the question in Gmock - matching structures, I'm wondring how I could create a matcher for a struct with >2 members. Let's say I've got a structure of 8 members, and that MyFun() takes a pointer to a SomeStruct_t as an argument.
typedef struct
{
int data_1;
int data_2;
int data_3;
int data_4;
int data_5;
int data_6;
int data_7;
int data_8;
} SomeStruct_t;
SomeStruct_t my_struct;
EXPECT_CALL(*myMock, MyFun(MyMatcher(my_struct)));
Do you have any suggestions/examples on how MyMatcher should be implemented? Or, could I solve this without using a matcher? I'd like to check each element of my_struct.