-
Notifications
You must be signed in to change notification settings - Fork 47
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
mock tests fails on cygwin64 - because of typing problems #37
Comments
Adding a cast in the macro like
works, but I am assuming this only covers the first argument. |
Ok, so problem was not applying the cast to actual arguments to |
Ok, created a PR with a fix, so closing this. |
thoni56
added a commit
that referenced
this issue
Nov 21, 2015
Fixed #37 - single mock() argument was not cast
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
On Cygwin64 a couple of tests fails (
always_expect_keeps_affirming_parameter
,expect_a_sequence
andlearning_mocks_emit_pastable_code
), all because of the va_arg unpacking wrong size of data.It seems that on Cygwin64
uintptr_t
are bigger thanint
so when anint
argument tomock()
is unpacked often garbage is included.(Strange thing is that those tests have code that causes multiple evaluation of constraints and every one fails on this problem except the last one in the test, no matter how many you add....)
They pass if the argument to the mocked function is defined as
uintptr_t
so this is some kind of proof of the problem.Is there a way to force a type cast to uintptr_t to all VA_ARGS in the
mock()
macro?I suppose I'm asking @matthargett primarily, but any input is appreciated.
The text was updated successfully, but these errors were encountered: