As noted in issue #766, mockery failed to generate a mock because it incorrectly considered the return values themselves to be variadic, which is impossible. The fix is to always consider return tuples non-variadic.
The .EXPECT() struct had an incorrect signature when the argument was a variadic function. The reason was because it triggered off the presence of "..." in the type string instead of triggering off the variadic-ness of the outer function. The fix was to simply use the variadic flag to determine if the last argument should be variadic.
Fixes #766
Type of change
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
Description
There are two bugs fixed in this commit:
.EXPECT()
struct had an incorrect signature when the argument was a variadic function. The reason was because it triggered off the presence of"..."
in the type string instead of triggering off the variadic-ness of the outer function. The fix was to simply use thevariadic
flag to determine if the last argument should be variadic.Fixes #766
Type of change
Version of Golang used when building/testing: