simplify mockgen usage for private interfaces (#3769)

This commit is contained in:
Marten Seemann 2023-04-19 16:57:00 +02:00 committed by GitHub
parent 379e7ec848
commit c9a2f79b1c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
35 changed files with 325 additions and 310 deletions

View file

@ -1,5 +1,5 @@
// Code generated by MockGen. DO NOT EDIT.
// Source: receive_stream.go
// Source: github.com/quic-go/quic-go (interfaces: ReceiveStreamI)
// Package quic is a generated GoMock package.
package quic
@ -10,6 +10,7 @@ import (
gomock "github.com/golang/mock/gomock"
protocol "github.com/quic-go/quic-go/internal/protocol"
qerr "github.com/quic-go/quic-go/internal/qerr"
wire "github.com/quic-go/quic-go/internal/wire"
)
@ -37,7 +38,7 @@ func (m *MockReceiveStreamI) EXPECT() *MockReceiveStreamIMockRecorder {
}
// CancelRead mocks base method.
func (m *MockReceiveStreamI) CancelRead(arg0 StreamErrorCode) {
func (m *MockReceiveStreamI) CancelRead(arg0 qerr.StreamErrorCode) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "CancelRead", arg0)
}
@ -49,39 +50,39 @@ func (mr *MockReceiveStreamIMockRecorder) CancelRead(arg0 interface{}) *gomock.C
}
// Read mocks base method.
func (m *MockReceiveStreamI) Read(p []byte) (int, error) {
func (m *MockReceiveStreamI) Read(arg0 []byte) (int, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Read", p)
ret := m.ctrl.Call(m, "Read", arg0)
ret0, _ := ret[0].(int)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Read indicates an expected call of Read.
func (mr *MockReceiveStreamIMockRecorder) Read(p interface{}) *gomock.Call {
func (mr *MockReceiveStreamIMockRecorder) Read(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Read", reflect.TypeOf((*MockReceiveStreamI)(nil).Read), p)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Read", reflect.TypeOf((*MockReceiveStreamI)(nil).Read), arg0)
}
// SetReadDeadline mocks base method.
func (m *MockReceiveStreamI) SetReadDeadline(t time.Time) error {
func (m *MockReceiveStreamI) SetReadDeadline(arg0 time.Time) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SetReadDeadline", t)
ret := m.ctrl.Call(m, "SetReadDeadline", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// SetReadDeadline indicates an expected call of SetReadDeadline.
func (mr *MockReceiveStreamIMockRecorder) SetReadDeadline(t interface{}) *gomock.Call {
func (mr *MockReceiveStreamIMockRecorder) SetReadDeadline(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetReadDeadline", reflect.TypeOf((*MockReceiveStreamI)(nil).SetReadDeadline), t)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetReadDeadline", reflect.TypeOf((*MockReceiveStreamI)(nil).SetReadDeadline), arg0)
}
// StreamID mocks base method.
func (m *MockReceiveStreamI) StreamID() StreamID {
func (m *MockReceiveStreamI) StreamID() protocol.StreamID {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StreamID")
ret0, _ := ret[0].(StreamID)
ret0, _ := ret[0].(protocol.StreamID)
return ret0
}