Open AlexandreMarkus opened 3 years ago
CMock doesn't yet support double-pointers, unfortunately. When you use it in this way, it's comparing the second layer of pointers instead of the things being pointed to. That makes for some cryptic errors and potential problems.
This is already on our list of things to improve upon.
Sorry for the inconvenience!
Mark
On Fri, Jun 11, 2021 at 8:39 AM AlexandreMarkus @.***> wrote:
I am trying to mock a function that uses a pointer pointer (**) for a 2d array. When I populate that 2d array, the mock function returns me wrong values. The function being tested uses different (random) values instead of the ones I init the array with. Is someone having similar issues?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ThrowTheSwitch/Ceedling/issues/603, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAEA7ZWDKAMXXKK6LMIUITTSH7ZHANCNFSM46QU5UQQ .
CMock doesn't yet support double-pointers, unfortunately. When you use it in this way, it's comparing the second layer of pointers instead of the things being pointed to. That makes for some cryptic errors and potential problems. This is already on our list of things to improve upon. Sorry for the inconvenience! Mark … On Fri, Jun 11, 2021 at 8:39 AM AlexandreMarkus @.*> wrote: I am trying to mock a function that uses a pointer pointer () for a 2d array. When I populate that 2d array, the mock function returns me wrong values. The function being tested uses different (random) values instead of the ones I init the array with. Is someone having similar issues? — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#603>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAEA7ZWDKAMXXKK6LMIUITTSH7ZHANCNFSM46QU5UQQ .
Thank you for your quick answer! I will try to test this function in a other way
I am trying to mock a function that uses a pointer pointer (**) for a 2d array. When I populate that 2d array, the mock function returns me wrong values. The function being tested uses different (random) values instead of the ones I init the array with. Is someone having similar issues?