Fix #479, add name association to stub arguments #480
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Describe the contribution
Add the capability to store parameter names in addition to pointers as part of the stub argument context data.
Macroize the UT_Stub_RegisterContext function utstubs.h to also pass the parameter name in addition to the pointer.
Add hook-side accessor functions/macros to make it easier and more reliable to get this information from the context data.
Also other minor items:
Fixes #479
Testing performed
Build and execute unit tests, confirm all passing (baseline).
Update EVS stub and SAMPLE_APP test cases to use new functions and confirm operation.
Expected behavior changes
New features only, does not change existing behavior.
UT Hook functions now have the capability to get argument values by name, which is more future proof than assuming a numeric index.
System(s) tested on
Ubuntu 20.04
Contributor Info - All information REQUIRED for consideration of pull request
Joseph Hickey, Vantage Systems, Inc.