use mockgen source mode

This commit is contained in:
Marten Seemann 2021-02-20 09:46:41 +08:00
parent 383f1a6e89
commit efe6d02bef
24 changed files with 146 additions and 111 deletions

View file

@ -1,5 +1,5 @@
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/lucas-clemente/quic-go (interfaces: SendStreamI)
// Source: send_stream.go
// Package quic is a generated GoMock package.
package quic
@ -39,7 +39,7 @@ func (m *MockSendStreamI) EXPECT() *MockSendStreamIMockRecorder {
}
// CancelWrite mocks base method.
func (m *MockSendStreamI) CancelWrite(arg0 protocol.ApplicationErrorCode) {
func (m *MockSendStreamI) CancelWrite(arg0 ErrorCode) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "CancelWrite", arg0)
}
@ -79,24 +79,24 @@ func (mr *MockSendStreamIMockRecorder) Context() *gomock.Call {
}
// SetWriteDeadline mocks base method.
func (m *MockSendStreamI) SetWriteDeadline(arg0 time.Time) error {
func (m *MockSendStreamI) SetWriteDeadline(t time.Time) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SetWriteDeadline", arg0)
ret := m.ctrl.Call(m, "SetWriteDeadline", t)
ret0, _ := ret[0].(error)
return ret0
}
// SetWriteDeadline indicates an expected call of SetWriteDeadline.
func (mr *MockSendStreamIMockRecorder) SetWriteDeadline(arg0 interface{}) *gomock.Call {
func (mr *MockSendStreamIMockRecorder) SetWriteDeadline(t interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetWriteDeadline", reflect.TypeOf((*MockSendStreamI)(nil).SetWriteDeadline), arg0)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetWriteDeadline", reflect.TypeOf((*MockSendStreamI)(nil).SetWriteDeadline), t)
}
// StreamID mocks base method.
func (m *MockSendStreamI) StreamID() protocol.StreamID {
func (m *MockSendStreamI) StreamID() StreamID {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StreamID")
ret0, _ := ret[0].(protocol.StreamID)
ret0, _ := ret[0].(StreamID)
return ret0
}
@ -107,18 +107,18 @@ func (mr *MockSendStreamIMockRecorder) StreamID() *gomock.Call {
}
// Write mocks base method.
func (m *MockSendStreamI) Write(arg0 []byte) (int, error) {
func (m *MockSendStreamI) Write(p []byte) (int, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Write", arg0)
ret := m.ctrl.Call(m, "Write", p)
ret0, _ := ret[0].(int)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Write indicates an expected call of Write.
func (mr *MockSendStreamIMockRecorder) Write(arg0 interface{}) *gomock.Call {
func (mr *MockSendStreamIMockRecorder) Write(p interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Write", reflect.TypeOf((*MockSendStreamI)(nil).Write), arg0)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Write", reflect.TypeOf((*MockSendStreamI)(nil).Write), p)
}
// closeForShutdown mocks base method.
@ -172,16 +172,16 @@ func (mr *MockSendStreamIMockRecorder) hasData() *gomock.Call {
}
// popStreamFrame mocks base method.
func (m *MockSendStreamI) popStreamFrame(arg0 protocol.ByteCount) (*ackhandler.Frame, bool) {
func (m *MockSendStreamI) popStreamFrame(maxBytes protocol.ByteCount) (*ackhandler.Frame, bool) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "popStreamFrame", arg0)
ret := m.ctrl.Call(m, "popStreamFrame", maxBytes)
ret0, _ := ret[0].(*ackhandler.Frame)
ret1, _ := ret[1].(bool)
return ret0, ret1
}
// popStreamFrame indicates an expected call of popStreamFrame.
func (mr *MockSendStreamIMockRecorder) popStreamFrame(arg0 interface{}) *gomock.Call {
func (mr *MockSendStreamIMockRecorder) popStreamFrame(maxBytes interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "popStreamFrame", reflect.TypeOf((*MockSendStreamI)(nil).popStreamFrame), arg0)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "popStreamFrame", reflect.TypeOf((*MockSendStreamI)(nil).popStreamFrame), maxBytes)
}