From ef482578b4543e65a4ed253b7fd1c3fb790934b9 Mon Sep 17 00:00:00 2001 From: dustinxie Date: Fri, 23 Dec 2022 01:06:55 -0600 Subject: [PATCH] update mockgen (#3733) --- action/protocol/mock_protocol_test.go | 37 +++++++++++++++++++++++++++ test/mock/mock_trie/mock_trie.go | 15 ----------- 2 files changed, 37 insertions(+), 15 deletions(-) diff --git a/action/protocol/mock_protocol_test.go b/action/protocol/mock_protocol_test.go index b720bded38..7ecfab65e8 100644 --- a/action/protocol/mock_protocol_test.go +++ b/action/protocol/mock_protocol_test.go @@ -225,6 +225,43 @@ func (mr *MockPreStatesCreatorMockRecorder) CreatePreStates(arg0, arg1 interface return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreatePreStates", reflect.TypeOf((*MockPreStatesCreator)(nil).CreatePreStates), arg0, arg1) } +// MockPreCommitter is a mock of PreCommitter interface. +type MockPreCommitter struct { + ctrl *gomock.Controller + recorder *MockPreCommitterMockRecorder +} + +// MockPreCommitterMockRecorder is the mock recorder for MockPreCommitter. +type MockPreCommitterMockRecorder struct { + mock *MockPreCommitter +} + +// NewMockPreCommitter creates a new mock instance. +func NewMockPreCommitter(ctrl *gomock.Controller) *MockPreCommitter { + mock := &MockPreCommitter{ctrl: ctrl} + mock.recorder = &MockPreCommitterMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockPreCommitter) EXPECT() *MockPreCommitterMockRecorder { + return m.recorder +} + +// PreCommit mocks base method. +func (m *MockPreCommitter) PreCommit(arg0 context.Context, arg1 StateManager) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "PreCommit", arg0, arg1) + ret0, _ := ret[0].(error) + return ret0 +} + +// PreCommit indicates an expected call of PreCommit. +func (mr *MockPreCommitterMockRecorder) PreCommit(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PreCommit", reflect.TypeOf((*MockPreCommitter)(nil).PreCommit), arg0, arg1) +} + // MockCommitter is a mock of Committer interface. type MockCommitter struct { ctrl *gomock.Controller diff --git a/test/mock/mock_trie/mock_trie.go b/test/mock/mock_trie/mock_trie.go index 0d051c84a5..44d24a4ec5 100644 --- a/test/mock/mock_trie/mock_trie.go +++ b/test/mock/mock_trie/mock_trie.go @@ -226,21 +226,6 @@ func (m *MockTwoLayerTrie) EXPECT() *MockTwoLayerTrieMockRecorder { return m.recorder } -// Clone mocks base method. -func (m *MockTwoLayerTrie) Clone(arg0 trie.KVStore) (trie.TwoLayerTrie, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Clone", arg0) - ret0, _ := ret[0].(trie.TwoLayerTrie) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// Clone indicates an expected call of Clone. -func (mr *MockTwoLayerTrieMockRecorder) Clone(arg0 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Clone", reflect.TypeOf((*MockTwoLayerTrie)(nil).Clone), arg0) -} - // Delete mocks base method. func (m *MockTwoLayerTrie) Delete(arg0, arg1 []byte) error { m.ctrl.T.Helper()