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

Support automocking for varargs #30

Open
malsyned opened this issue Oct 5, 2017 · 0 comments
Open

Support automocking for varargs #30

malsyned opened this issue Oct 5, 2017 · 0 comments

Comments

@malsyned
Copy link
Owner

malsyned commented Oct 5, 2017

I don't know quite how I would want to handle mocking of varargs yet, but I suspect it would be possible. Perhaps a varargs combinator:

when(mock_func1, arg_that(is_the_int(5)), varargs_that(is_the_string("foo"), is_the_int(4), NULL));

Plus some way to package varargs from a mock.

va_start(__pfstest_ap, __pfstest_mock_arg_0);
[...]
the_varargs(__pfstest_ap)
[...]
va_end(__pfstest_ap);

I haven't tried these or thought through whether they are actually implementable.

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