Loose mocks, i.e. mocks that simply return defaults for unexpected methods are
fairly common in other mock frameworks. I experimentally added this to gomock
and it seems to work. By allowing this I can skip the following call in my test:
storer.EXPECT().Allocate(gomock.Any(), gomock.Any()).AnyTimes()
In this case the storer is a mocked dependency of my SUT which I don't care
about in this particular test. The default of it returning nil for the single
error return is fine.
Original issue reported on code.google.com by andre.na...@gmail.com on 4 Mar 2014 at 9:24
Original issue reported on code.google.com by
andre.na...@gmail.com
on 4 Mar 2014 at 9:24