-
-
Notifications
You must be signed in to change notification settings - Fork 293
Description
Calling a mocked function that does not have an _Expect call in the Unit tests (or calling the mocked function more than _Expect calls were made) results in an error "Called more times than expected". This makes sense.
However, when making less calls to the mocked function than there are _Expect calls in the Unit test does not result in any error? This surprises me.
From what I understand from digging online, and reading pages such as this one, that one and this one, there is a _Verify function that needs to be called in some cases, in order for the call-counters to be compared.
We can find this function in the generated mock files, yes. But:
- This _Verify function isn't mentioned anywhere in the docs.
- I can't recall ever having used this function when using CMock in the past.
Could this be clarified? Is this a missing element in the docs? Is it a bug in CMock? Or... are we simply doing something wrong still?