We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Current code might do something like this:
static void setup(int* optional_value) { if (optional_value != NULL) { STRICT_EXPECTED_CALL(foo(IGNORED_ARG)) .CopyOutArgumentBuffer_result(optional_value, sizeof(optional_value)); } else { STRICT_EXPECTED_CALL(foo(IGNORED_ARG)); } }
Would be nice to reduce that to something like:
static void setup(int* optional_value) { STRICT_EXPECTED_CALL(foo(IGNORED_ARG)) .If(optional_value != NULL) .CopyOutArgumentBuffer_result(optional_value, sizeof(optional_value)); // perhaps needs .EndIf() }
Alternatively, something like this could work:
static void setup(int* optional_value) { HELPER_TO_GET_TYPE x = STRICT_EXPECTED_CALL(foo(IGNORED_ARG)); if (optional_value != NULL) { x.CopyOutArgumentBuffer_result(optional_value, sizeof(optional_value)); } }
Or maybe:
static void setup(int* optional_value) { STRICT_EXPECTED_CALL(foo(IGNORED_ARG)).SaveExpectation(x); if (optional_value != NULL) { x.CopyOutArgumentBuffer_result(optional_value, sizeof(optional_value)); } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Current code might do something like this:
Would be nice to reduce that to something like:
Alternatively, something like this could work:
Or maybe:
The text was updated successfully, but these errors were encountered: