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

Wrong Expectaition message #320

Open
Thurnheer opened this issue Oct 27, 2023 · 1 comment
Open

Wrong Expectaition message #320

Thurnheer opened this issue Oct 27, 2023 · 1 comment

Comments

@Thurnheer
Copy link

Instead of reporting a missmatch in the function call it reports a missing function call
Expected exhaust.update(Configuration{PERIOD, 5ms}) to be called once,
actually never called.

See godbolt link to bug

The only difference in the left version to the right version of the code is line 154 where the right version has the correct expected value and the left version has a wrong value.

Expected behaviour on the left version would be call with wrong arguments

@rollbear
Copy link
Owner

This is a known problem. Unfortunately I am not sure that it is possible to solve.

When the mismatch happens, it throws an exception. That exception causes the expectation object for the other function to be destroyed, which makes it to be reported as never called.

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

2 participants