You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I feed this header file to the CMock then generated mock function checks only first byte of the void pointers sendBuffer and receiveBuffer. Here is a snippet:
You bring up a good point. I'm not sure what the best default is for void* (they all kinda stink), but I suspect it might be a pointer comparison. At least when that fails, it fails in a way that users can understand more easily without digging into code, right?
Hello.
Here is the case I met. I have a file named "Device.h". And there is a function:
If I feed this header file to the CMock then generated mock function checks only first byte of the void pointers sendBuffer and receiveBuffer. Here is a snippet:
Argument number 3 in the UNITY_TEST_ASSERT_EQUAL_HEX8_ARRAY specifies number of elements to check. Let's check what hides behind it:
Finally, in the UnityAssertEqualIntArray original void pointers are cast to the pointer to a byte:
It is easy to fix it by using "treat_as" option:
But it is still quite confusing.
Thank you for your attention!
The text was updated successfully, but these errors were encountered: