github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/fvm/mock/procedure.go (about) 1 // Code generated by mockery v2.21.4. DO NOT EDIT. 2 3 package mock 4 5 import ( 6 fvm "github.com/onflow/flow-go/fvm" 7 logical "github.com/onflow/flow-go/fvm/storage/logical" 8 mock "github.com/stretchr/testify/mock" 9 10 storage "github.com/onflow/flow-go/fvm/storage" 11 ) 12 13 // Procedure is an autogenerated mock type for the Procedure type 14 type Procedure struct { 15 mock.Mock 16 } 17 18 // ComputationLimit provides a mock function with given fields: ctx 19 func (_m *Procedure) ComputationLimit(ctx fvm.Context) uint64 { 20 ret := _m.Called(ctx) 21 22 var r0 uint64 23 if rf, ok := ret.Get(0).(func(fvm.Context) uint64); ok { 24 r0 = rf(ctx) 25 } else { 26 r0 = ret.Get(0).(uint64) 27 } 28 29 return r0 30 } 31 32 // ExecutionTime provides a mock function with given fields: 33 func (_m *Procedure) ExecutionTime() logical.Time { 34 ret := _m.Called() 35 36 var r0 logical.Time 37 if rf, ok := ret.Get(0).(func() logical.Time); ok { 38 r0 = rf() 39 } else { 40 r0 = ret.Get(0).(logical.Time) 41 } 42 43 return r0 44 } 45 46 // MemoryLimit provides a mock function with given fields: ctx 47 func (_m *Procedure) MemoryLimit(ctx fvm.Context) uint64 { 48 ret := _m.Called(ctx) 49 50 var r0 uint64 51 if rf, ok := ret.Get(0).(func(fvm.Context) uint64); ok { 52 r0 = rf(ctx) 53 } else { 54 r0 = ret.Get(0).(uint64) 55 } 56 57 return r0 58 } 59 60 // NewExecutor provides a mock function with given fields: ctx, txnState 61 func (_m *Procedure) NewExecutor(ctx fvm.Context, txnState storage.TransactionPreparer) fvm.ProcedureExecutor { 62 ret := _m.Called(ctx, txnState) 63 64 var r0 fvm.ProcedureExecutor 65 if rf, ok := ret.Get(0).(func(fvm.Context, storage.TransactionPreparer) fvm.ProcedureExecutor); ok { 66 r0 = rf(ctx, txnState) 67 } else { 68 if ret.Get(0) != nil { 69 r0 = ret.Get(0).(fvm.ProcedureExecutor) 70 } 71 } 72 73 return r0 74 } 75 76 // ShouldDisableMemoryAndInteractionLimits provides a mock function with given fields: ctx 77 func (_m *Procedure) ShouldDisableMemoryAndInteractionLimits(ctx fvm.Context) bool { 78 ret := _m.Called(ctx) 79 80 var r0 bool 81 if rf, ok := ret.Get(0).(func(fvm.Context) bool); ok { 82 r0 = rf(ctx) 83 } else { 84 r0 = ret.Get(0).(bool) 85 } 86 87 return r0 88 } 89 90 // Type provides a mock function with given fields: 91 func (_m *Procedure) Type() fvm.ProcedureType { 92 ret := _m.Called() 93 94 var r0 fvm.ProcedureType 95 if rf, ok := ret.Get(0).(func() fvm.ProcedureType); ok { 96 r0 = rf() 97 } else { 98 r0 = ret.Get(0).(fvm.ProcedureType) 99 } 100 101 return r0 102 } 103 104 type mockConstructorTestingTNewProcedure interface { 105 mock.TestingT 106 Cleanup(func()) 107 } 108 109 // NewProcedure creates a new instance of Procedure. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 110 func NewProcedure(t mockConstructorTestingTNewProcedure) *Procedure { 111 mock := &Procedure{} 112 mock.Mock.Test(t) 113 114 t.Cleanup(func() { mock.AssertExpectations(t) }) 115 116 return mock 117 }