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
If set return parameters without .Expected for method with arguments, then not call the method - minimock will panic on Finish.
tmp.go
package asd
import"testing"typeIntinterface {
M()
MA(iint)
}
funcTestExpected(t*testing.T) {
m:=NewIntMock(t)
m.MMock.Return()
// Work as expected: fail test because method not calledm.MinimockFinish()
}
funcTestNilPanic(t*testing.T) {
m:=NewIntMock(t)
m.MAMock.Return() // for method with arguments// invalid memory address or nil pointer dereference. Bug.m.MinimockFinish()
}
If set return parameters without .Expected for method with arguments, then not call the method - minimock will panic on Finish.
tmp.go
generated code:
https://gist.github.com/rekby/3e95b03c8220cd5da895e8ccaa66bd44
The text was updated successfully, but these errors were encountered: