GoogleMock: how to expect precisely one call with a certain argument, and see diagnostic on failure?
Maybe a finesse question, my problem is that if I write: EXPECT_CALL(mock, handleMessage(_)).Times(0); // expectation #1 EXPECT_CALL(mock, handleMessage(Pointee(IsLike(aSpecificMessage)))); // expectation #2 ... and method handleMessage is called once, but with a different argument (not aSpecificMessage ), then the failure looks like: Mock function called more times than expected - returning default value. Function call: handleMessage(0x8b5378) Returns: false Expected: to be never called Actual: called once - over-saturated and active Google Mock doesn't print the diagnostic on why the