update gomock to v1.5.0

This commit is contained in:
Marten Seemann 2021-02-20 09:06:31 +08:00
parent 972a08c40d
commit 383f1a6e89
44 changed files with 781 additions and 771 deletions

View file

@ -13,54 +13,54 @@ import (
protocol "github.com/lucas-clemente/quic-go/internal/protocol"
)
// MockStream is a mock of Stream interface
// MockStream is a mock of Stream interface.
type MockStream struct {
ctrl *gomock.Controller
recorder *MockStreamMockRecorder
}
// MockStreamMockRecorder is the mock recorder for MockStream
// MockStreamMockRecorder is the mock recorder for MockStream.
type MockStreamMockRecorder struct {
mock *MockStream
}
// NewMockStream creates a new mock instance
// NewMockStream creates a new mock instance.
func NewMockStream(ctrl *gomock.Controller) *MockStream {
mock := &MockStream{ctrl: ctrl}
mock.recorder = &MockStreamMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockStream) EXPECT() *MockStreamMockRecorder {
return m.recorder
}
// CancelRead mocks base method
// CancelRead mocks base method.
func (m *MockStream) CancelRead(arg0 protocol.ApplicationErrorCode) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "CancelRead", arg0)
}
// CancelRead indicates an expected call of CancelRead
// CancelRead indicates an expected call of CancelRead.
func (mr *MockStreamMockRecorder) CancelRead(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CancelRead", reflect.TypeOf((*MockStream)(nil).CancelRead), arg0)
}
// CancelWrite mocks base method
// CancelWrite mocks base method.
func (m *MockStream) CancelWrite(arg0 protocol.ApplicationErrorCode) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "CancelWrite", arg0)
}
// CancelWrite indicates an expected call of CancelWrite
// CancelWrite indicates an expected call of CancelWrite.
func (mr *MockStreamMockRecorder) CancelWrite(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CancelWrite", reflect.TypeOf((*MockStream)(nil).CancelWrite), arg0)
}
// Close mocks base method
// Close mocks base method.
func (m *MockStream) Close() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Close")
@ -68,13 +68,13 @@ func (m *MockStream) Close() error {
return ret0
}
// Close indicates an expected call of Close
// Close indicates an expected call of Close.
func (mr *MockStreamMockRecorder) Close() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockStream)(nil).Close))
}
// Context mocks base method
// Context mocks base method.
func (m *MockStream) Context() context.Context {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Context")
@ -82,13 +82,13 @@ func (m *MockStream) Context() context.Context {
return ret0
}
// Context indicates an expected call of Context
// Context indicates an expected call of Context.
func (mr *MockStreamMockRecorder) Context() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Context", reflect.TypeOf((*MockStream)(nil).Context))
}
// Read mocks base method
// Read mocks base method.
func (m *MockStream) Read(arg0 []byte) (int, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Read", arg0)
@ -97,13 +97,13 @@ func (m *MockStream) Read(arg0 []byte) (int, error) {
return ret0, ret1
}
// Read indicates an expected call of Read
// Read indicates an expected call of Read.
func (mr *MockStreamMockRecorder) Read(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Read", reflect.TypeOf((*MockStream)(nil).Read), arg0)
}
// SetDeadline mocks base method
// SetDeadline mocks base method.
func (m *MockStream) SetDeadline(arg0 time.Time) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SetDeadline", arg0)
@ -111,13 +111,13 @@ func (m *MockStream) SetDeadline(arg0 time.Time) error {
return ret0
}
// SetDeadline indicates an expected call of SetDeadline
// SetDeadline indicates an expected call of SetDeadline.
func (mr *MockStreamMockRecorder) SetDeadline(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetDeadline", reflect.TypeOf((*MockStream)(nil).SetDeadline), arg0)
}
// SetReadDeadline mocks base method
// SetReadDeadline mocks base method.
func (m *MockStream) SetReadDeadline(arg0 time.Time) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SetReadDeadline", arg0)
@ -125,13 +125,13 @@ func (m *MockStream) SetReadDeadline(arg0 time.Time) error {
return ret0
}
// SetReadDeadline indicates an expected call of SetReadDeadline
// SetReadDeadline indicates an expected call of SetReadDeadline.
func (mr *MockStreamMockRecorder) SetReadDeadline(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetReadDeadline", reflect.TypeOf((*MockStream)(nil).SetReadDeadline), arg0)
}
// SetWriteDeadline mocks base method
// SetWriteDeadline mocks base method.
func (m *MockStream) SetWriteDeadline(arg0 time.Time) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SetWriteDeadline", arg0)
@ -139,13 +139,13 @@ func (m *MockStream) SetWriteDeadline(arg0 time.Time) error {
return ret0
}
// SetWriteDeadline indicates an expected call of SetWriteDeadline
// SetWriteDeadline indicates an expected call of SetWriteDeadline.
func (mr *MockStreamMockRecorder) SetWriteDeadline(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetWriteDeadline", reflect.TypeOf((*MockStream)(nil).SetWriteDeadline), arg0)
}
// StreamID mocks base method
// StreamID mocks base method.
func (m *MockStream) StreamID() protocol.StreamID {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StreamID")
@ -153,13 +153,13 @@ func (m *MockStream) StreamID() protocol.StreamID {
return ret0
}
// StreamID indicates an expected call of StreamID
// StreamID indicates an expected call of StreamID.
func (mr *MockStreamMockRecorder) StreamID() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StreamID", reflect.TypeOf((*MockStream)(nil).StreamID))
}
// Write mocks base method
// Write mocks base method.
func (m *MockStream) Write(arg0 []byte) (int, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Write", arg0)
@ -168,7 +168,7 @@ func (m *MockStream) Write(arg0 []byte) (int, error) {
return ret0, ret1
}
// Write indicates an expected call of Write
// Write indicates an expected call of Write.
func (mr *MockStreamMockRecorder) Write(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Write", reflect.TypeOf((*MockStream)(nil).Write), arg0)