forked from NethermindEth/juno
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmock_vm.go
74 lines (63 loc) · 2.79 KB
/
mock_vm.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/NethermindEth/juno/vm (interfaces: VM)
//
// Generated by this command:
//
// mockgen -destination=../mocks/mock_vm.go -package=mocks github.com/NethermindEth/juno/vm VM
//
// Package mocks is a generated GoMock package.
package mocks
import (
reflect "reflect"
core "github.com/NethermindEth/juno/core"
felt "github.com/NethermindEth/juno/core/felt"
utils "github.com/NethermindEth/juno/utils"
vm "github.com/NethermindEth/juno/vm"
gomock "go.uber.org/mock/gomock"
)
// MockVM is a mock of VM interface.
type MockVM struct {
ctrl *gomock.Controller
recorder *MockVMMockRecorder
isgomock struct{}
}
// MockVMMockRecorder is the mock recorder for MockVM.
type MockVMMockRecorder struct {
mock *MockVM
}
// NewMockVM creates a new mock instance.
func NewMockVM(ctrl *gomock.Controller) *MockVM {
mock := &MockVM{ctrl: ctrl}
mock.recorder = &MockVMMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockVM) EXPECT() *MockVMMockRecorder {
return m.recorder
}
// Call mocks base method.
func (m *MockVM) Call(callInfo *vm.CallInfo, blockInfo *vm.BlockInfo, state core.StateReader, network *utils.Network, maxSteps uint64, sierraVersion string) (vm.CallResult, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Call", callInfo, blockInfo, state, network, maxSteps, sierraVersion)
ret0, _ := ret[0].(vm.CallResult)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Call indicates an expected call of Call.
func (mr *MockVMMockRecorder) Call(callInfo, blockInfo, state, network, maxSteps, sierraVersion any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Call", reflect.TypeOf((*MockVM)(nil).Call), callInfo, blockInfo, state, network, maxSteps, sierraVersion)
}
// Execute mocks base method.
func (m *MockVM) Execute(txns []core.Transaction, declaredClasses []core.Class, paidFeesOnL1 []*felt.Felt, blockInfo *vm.BlockInfo, state core.StateReader, network *utils.Network, skipChargeFee, skipValidate, errOnRevert bool) (vm.ExecutionResults, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Execute", txns, declaredClasses, paidFeesOnL1, blockInfo, state, network, skipChargeFee, skipValidate, errOnRevert)
ret0, _ := ret[0].(vm.ExecutionResults)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Execute indicates an expected call of Execute.
func (mr *MockVMMockRecorder) Execute(txns, declaredClasses, paidFeesOnL1, blockInfo, state, network, skipChargeFee, skipValidate, errOnRevert any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Execute", reflect.TypeOf((*MockVM)(nil).Execute), txns, declaredClasses, paidFeesOnL1, blockInfo, state, network, skipChargeFee, skipValidate, errOnRevert)
}