Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WTB better validation than ValidateArgumentBuffer #148

Open
anporumb opened this issue Mar 12, 2020 · 0 comments
Open

WTB better validation than ValidateArgumentBuffer #148

anporumb opened this issue Mar 12, 2020 · 0 comments

Comments

@anporumb
Copy link
Contributor

anporumb commented Mar 12, 2020

  1. ValidateArgumentBuffer does not have a "a name" (doesn't expand to ValidateArgumentBuffer_result where "result" is the name of the parameter)

  2. Would be nice to have ValidateArgumentBuffer understand structures. ValidateArgumentBuffer_result_some_struct_field(&is_true, sizeof(bool)) would make a KILLING feature!

  3. At least ValidateArgumentBuffer should have a way to validate from offset 3, 4 bytes. That would allow validating arguments that are struct fields... in an archaic way, but workable. Maybe this is the easiest to implement proposal :)

The current workaround is to have a "hook_" and register it with REGISTER_GLOBAL_MOCK_HOOK, some global variables and validate inside the hook_ function that the globals match the actual parameters. So maybe thsi suggestion should not be exactly top of the priority list.

Best Regards,
Andrei Porumb

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

No branches or pull requests

1 participant