You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It appears that AssertExpectations always re-executes every MatchedBy() function. That's a problem if the matcher isn't re-entrant. It's not hard to work around (see below), but it would be nice if the function was never evaluated a second time.
The problem is AssertExpectations re-evaluates everything, which has other problems: mock is storing the calls internally to replicate on the assertions, which in turn means that it can have a false failure if the mocked method received a pointer and the underlying object was mutated after the call succeeded.
Last time I looked into this it was quite tricky to fix that behaviour without introducing breaking changes.
Happy to receive proposals that would be backwards-compatible, though.
It appears that AssertExpectations always re-executes every MatchedBy() function. That's a problem if the matcher isn't re-entrant. It's not hard to work around (see below), but it would be nice if the function was never evaluated a second time.
My fix:
The text was updated successfully, but these errors were encountered: