This repository was archived by the owner on Jun 27, 2023. It is now read-only.

Description
Check exhaustedNum and callsErrors.len() , if it's true, fill with error msg
There is a case where matches will return nil for an ordering error.
e.g.
gomock.InOrder(
mockFoo.EXPECT().Foo().AnyTimes(),
mockBar.EXPECT().Bar().AnyTimes(),
mockBaz.EXPECT().Baz().AnyTimes(),
)
mockFoo.Foo()
mockBar.Bar()
mockFoo.Foo()
This will produce an error message with no additional information following because: (as reported in the issue)
err will always be nil
|
if err := call.matches(args); err != nil { |
len(exhausted) will be 1 and len(expected) will be 0
|
if len(expected)+len(exhausted) == 0 { |
Originally posted by @cvgw in #292 (comment)