Closed darrylpinto closed 4 years ago
The test works correctly: test456() has not been called, so test123() has not been called before checking the call_count.
Can we close this?
Thank you so much for pointing that out @NINI1988. So the correct way of using FFF with array parameters would be to use the pointer representation instead, right?
Is there any plan to support array parameters when they are declared as [] in the function declaration @meekrosoft?
Describe the bug Hi, I recently started using FFF and it has worked wonders for me. While faking a function with array parameters I noticed a bug. In the following code, I am trying to fake test123() that is being used in test456(). test123() has an array parameter
Here is the FAKE_VALUE_FUNC macro for test123 and the testcase:
On running, this is what I am getting:
I change the signature to use pointer instead of array:
FAKE_VALUE_FUNC(int, test123, int *, int);
Now on running, I get the following, I don't get errors, but faking of test123 fails:
Surprisingly,
EXPECT_EQ(100, test456())
returns True, so that means return_val is working.Could you please suggest what should I do to fix the original FAKE_VALUE_FUNC macro?
Expected behavior
FAKE_VALUE_FUNC(int, test123, int [], int)
should not give an errorCompiler, toolset, platform (please complete the following information): OS: Ubuntu 18.10 Compiler: gcc (Ubuntu 8.2.0-7ubuntu1)