-
Notifications
You must be signed in to change notification settings - Fork 211
/
template.go
271 lines (228 loc) · 7.97 KB
/
template.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/spacemeshos/go-spacemesh/genvm/core (interfaces: Template)
//
// Generated by this command:
//
// mockgen -typed -package=mocks -destination=./mocks/template.go github.com/spacemeshos/go-spacemesh/genvm/core Template
//
// Package mocks is a generated GoMock package.
package mocks
import (
reflect "reflect"
scale "github.com/spacemeshos/go-scale"
core "github.com/spacemeshos/go-spacemesh/genvm/core"
gomock "go.uber.org/mock/gomock"
)
// MockTemplate is a mock of Template interface.
type MockTemplate struct {
ctrl *gomock.Controller
recorder *MockTemplateMockRecorder
}
// MockTemplateMockRecorder is the mock recorder for MockTemplate.
type MockTemplateMockRecorder struct {
mock *MockTemplate
}
// NewMockTemplate creates a new mock instance.
func NewMockTemplate(ctrl *gomock.Controller) *MockTemplate {
mock := &MockTemplate{ctrl: ctrl}
mock.recorder = &MockTemplateMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockTemplate) EXPECT() *MockTemplateMockRecorder {
return m.recorder
}
// BaseGas mocks base method.
func (m *MockTemplate) BaseGas(arg0 byte) uint64 {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "BaseGas", arg0)
ret0, _ := ret[0].(uint64)
return ret0
}
// BaseGas indicates an expected call of BaseGas.
func (mr *MockTemplateMockRecorder) BaseGas(arg0 any) *MockTemplateBaseGasCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BaseGas", reflect.TypeOf((*MockTemplate)(nil).BaseGas), arg0)
return &MockTemplateBaseGasCall{Call: call}
}
// MockTemplateBaseGasCall wrap *gomock.Call
type MockTemplateBaseGasCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockTemplateBaseGasCall) Return(arg0 uint64) *MockTemplateBaseGasCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockTemplateBaseGasCall) Do(f func(byte) uint64) *MockTemplateBaseGasCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockTemplateBaseGasCall) DoAndReturn(f func(byte) uint64) *MockTemplateBaseGasCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// EncodeScale mocks base method.
func (m *MockTemplate) EncodeScale(arg0 *scale.Encoder) (int, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "EncodeScale", arg0)
ret0, _ := ret[0].(int)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// EncodeScale indicates an expected call of EncodeScale.
func (mr *MockTemplateMockRecorder) EncodeScale(arg0 any) *MockTemplateEncodeScaleCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EncodeScale", reflect.TypeOf((*MockTemplate)(nil).EncodeScale), arg0)
return &MockTemplateEncodeScaleCall{Call: call}
}
// MockTemplateEncodeScaleCall wrap *gomock.Call
type MockTemplateEncodeScaleCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockTemplateEncodeScaleCall) Return(arg0 int, arg1 error) *MockTemplateEncodeScaleCall {
c.Call = c.Call.Return(arg0, arg1)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockTemplateEncodeScaleCall) Do(f func(*scale.Encoder) (int, error)) *MockTemplateEncodeScaleCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockTemplateEncodeScaleCall) DoAndReturn(f func(*scale.Encoder) (int, error)) *MockTemplateEncodeScaleCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// ExecGas mocks base method.
func (m *MockTemplate) ExecGas(arg0 byte) uint64 {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ExecGas", arg0)
ret0, _ := ret[0].(uint64)
return ret0
}
// ExecGas indicates an expected call of ExecGas.
func (mr *MockTemplateMockRecorder) ExecGas(arg0 any) *MockTemplateExecGasCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExecGas", reflect.TypeOf((*MockTemplate)(nil).ExecGas), arg0)
return &MockTemplateExecGasCall{Call: call}
}
// MockTemplateExecGasCall wrap *gomock.Call
type MockTemplateExecGasCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockTemplateExecGasCall) Return(arg0 uint64) *MockTemplateExecGasCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockTemplateExecGasCall) Do(f func(byte) uint64) *MockTemplateExecGasCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockTemplateExecGasCall) DoAndReturn(f func(byte) uint64) *MockTemplateExecGasCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// LoadGas mocks base method.
func (m *MockTemplate) LoadGas() uint64 {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "LoadGas")
ret0, _ := ret[0].(uint64)
return ret0
}
// LoadGas indicates an expected call of LoadGas.
func (mr *MockTemplateMockRecorder) LoadGas() *MockTemplateLoadGasCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoadGas", reflect.TypeOf((*MockTemplate)(nil).LoadGas))
return &MockTemplateLoadGasCall{Call: call}
}
// MockTemplateLoadGasCall wrap *gomock.Call
type MockTemplateLoadGasCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockTemplateLoadGasCall) Return(arg0 uint64) *MockTemplateLoadGasCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockTemplateLoadGasCall) Do(f func() uint64) *MockTemplateLoadGasCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockTemplateLoadGasCall) DoAndReturn(f func() uint64) *MockTemplateLoadGasCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// MaxSpend mocks base method.
func (m *MockTemplate) MaxSpend(arg0 byte, arg1 any) (uint64, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "MaxSpend", arg0, arg1)
ret0, _ := ret[0].(uint64)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// MaxSpend indicates an expected call of MaxSpend.
func (mr *MockTemplateMockRecorder) MaxSpend(arg0, arg1 any) *MockTemplateMaxSpendCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MaxSpend", reflect.TypeOf((*MockTemplate)(nil).MaxSpend), arg0, arg1)
return &MockTemplateMaxSpendCall{Call: call}
}
// MockTemplateMaxSpendCall wrap *gomock.Call
type MockTemplateMaxSpendCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockTemplateMaxSpendCall) Return(arg0 uint64, arg1 error) *MockTemplateMaxSpendCall {
c.Call = c.Call.Return(arg0, arg1)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockTemplateMaxSpendCall) Do(f func(byte, any) (uint64, error)) *MockTemplateMaxSpendCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockTemplateMaxSpendCall) DoAndReturn(f func(byte, any) (uint64, error)) *MockTemplateMaxSpendCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// Verify mocks base method.
func (m *MockTemplate) Verify(arg0 core.Host, arg1 []byte, arg2 *scale.Decoder) bool {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Verify", arg0, arg1, arg2)
ret0, _ := ret[0].(bool)
return ret0
}
// Verify indicates an expected call of Verify.
func (mr *MockTemplateMockRecorder) Verify(arg0, arg1, arg2 any) *MockTemplateVerifyCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Verify", reflect.TypeOf((*MockTemplate)(nil).Verify), arg0, arg1, arg2)
return &MockTemplateVerifyCall{Call: call}
}
// MockTemplateVerifyCall wrap *gomock.Call
type MockTemplateVerifyCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockTemplateVerifyCall) Return(arg0 bool) *MockTemplateVerifyCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockTemplateVerifyCall) Do(f func(core.Host, []byte, *scale.Decoder) bool) *MockTemplateVerifyCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockTemplateVerifyCall) DoAndReturn(f func(core.Host, []byte, *scale.Decoder) bool) *MockTemplateVerifyCall {
c.Call = c.Call.DoAndReturn(f)
return c
}