Hi all,
I would like to ask you if this change makes sense.
In my test scenario a Function Under Test was calling mock generated by fff, this mock had a custom_fake defined, this custom_fake was doing calloc and returning pointer to allocated area, then my function under test was storing this ptr in struct field.
My idea was to assert that pointers returned by custom_fake and stored in struct field pointing to the same area.
I tried to use func_fake.return_val_history[] but it was empty.
And I've found that history is stored only in case when custom_fake_seq is set.
So I modified returning value from custom_fake and added SAVE_RET_HISTORY.
My test scenario is quite strange, and most probably I will change it. If this change to fff makes sense I can add it to all functions together with tests.
Hi all, I would like to ask you if this change makes sense.
In my test scenario a Function Under Test was calling mock generated by fff, this mock had a custom_fake defined, this custom_fake was doing calloc and returning pointer to allocated area, then my function under test was storing this ptr in struct field. My idea was to assert that pointers returned by custom_fake and stored in struct field pointing to the same area. I tried to use func_fake.return_val_history[] but it was empty. And I've found that history is stored only in case when custom_fake_seq is set. So I modified returning value from custom_fake and added SAVE_RET_HISTORY.
My test scenario is quite strange, and most probably I will change it. If this change to fff makes sense I can add it to all functions together with tests.
Br, Mykhailo