Is this a bug? #4042
Replies: 1 comment
-
This is expected behavior. You have made an expectation for calls that have params unequal to 1, but you did not write any expectations about calls that are equal to 1. GoogleMock is telling you that it did not expect that call foo(1) and that it tried to match it against the expectation you wrote, which happened to be in the state of "not called so far". If you have any explicit expectations on a function, all calls to that function should have expectations, for example by adding: |
Beta Was this translation helpful? Give feedback.
-
I have a code that looks like this
When I run tests, it fails with the following is in the output
The lines
Expected: to be never called
andActual: never called
sound like the code is behaving like expected.The question is - Is this a bug and if not, what is the meaning of the output?
Beta Was this translation helpful? Give feedback.
All reactions