Skip to content

Conversation

ml-physec
Copy link
Contributor

🍍

As the callback is called after validating the last argument, but before CLR_DETAILS, the detail is still set to function+last argument, leading to confusing output.

This changes it so the argument name is cleared before calling the callback.

For stubs, no change is needed, as those are called before the arguments, so just the function name is already set at that point.

@@ -96,6 +96,7 @@
function = {:name => "Apple", :args => [], :args_string => "void", :return => test_return[:void]}
expected = [" if (Mock.Apple_CallbackFunctionPointer != NULL)\n",
" {\n",
" UNITY_SET_DETAIL(CMockString_#{function[:name]});\n",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:) Thanks for updating the tests too!

@mvandervoord mvandervoord merged commit bb0b0e0 into ThrowTheSwitch:master Jul 4, 2025
4 checks passed
@mvandervoord
Copy link
Member

Thanks, @ml-physec -- We appreciate the help!

@ml-physec ml-physec deleted the fix-callback-detail branch July 4, 2025 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants