github.com/koko1123/flow-go-1@v0.29.6/fvm/environment/mock/meter.go (about)

     1  // Code generated by mockery v2.13.1. DO NOT EDIT.
     2  
     3  package mock
     4  
     5  import (
     6  	common "github.com/onflow/cadence/runtime/common"
     7  
     8  	meter "github.com/koko1123/flow-go-1/fvm/meter"
     9  
    10  	mock "github.com/stretchr/testify/mock"
    11  )
    12  
    13  // Meter is an autogenerated mock type for the Meter type
    14  type Meter struct {
    15  	mock.Mock
    16  }
    17  
    18  // ComputationIntensities provides a mock function with given fields:
    19  func (_m *Meter) ComputationIntensities() meter.MeteredComputationIntensities {
    20  	ret := _m.Called()
    21  
    22  	var r0 meter.MeteredComputationIntensities
    23  	if rf, ok := ret.Get(0).(func() meter.MeteredComputationIntensities); ok {
    24  		r0 = rf()
    25  	} else {
    26  		if ret.Get(0) != nil {
    27  			r0 = ret.Get(0).(meter.MeteredComputationIntensities)
    28  		}
    29  	}
    30  
    31  	return r0
    32  }
    33  
    34  // ComputationUsed provides a mock function with given fields:
    35  func (_m *Meter) ComputationUsed() uint64 {
    36  	ret := _m.Called()
    37  
    38  	var r0 uint64
    39  	if rf, ok := ret.Get(0).(func() uint64); ok {
    40  		r0 = rf()
    41  	} else {
    42  		r0 = ret.Get(0).(uint64)
    43  	}
    44  
    45  	return r0
    46  }
    47  
    48  // MemoryEstimate provides a mock function with given fields:
    49  func (_m *Meter) MemoryEstimate() uint64 {
    50  	ret := _m.Called()
    51  
    52  	var r0 uint64
    53  	if rf, ok := ret.Get(0).(func() uint64); ok {
    54  		r0 = rf()
    55  	} else {
    56  		r0 = ret.Get(0).(uint64)
    57  	}
    58  
    59  	return r0
    60  }
    61  
    62  // MeterComputation provides a mock function with given fields: _a0, _a1
    63  func (_m *Meter) MeterComputation(_a0 common.ComputationKind, _a1 uint) error {
    64  	ret := _m.Called(_a0, _a1)
    65  
    66  	var r0 error
    67  	if rf, ok := ret.Get(0).(func(common.ComputationKind, uint) error); ok {
    68  		r0 = rf(_a0, _a1)
    69  	} else {
    70  		r0 = ret.Error(0)
    71  	}
    72  
    73  	return r0
    74  }
    75  
    76  // MeterEmittedEvent provides a mock function with given fields: byteSize
    77  func (_m *Meter) MeterEmittedEvent(byteSize uint64) error {
    78  	ret := _m.Called(byteSize)
    79  
    80  	var r0 error
    81  	if rf, ok := ret.Get(0).(func(uint64) error); ok {
    82  		r0 = rf(byteSize)
    83  	} else {
    84  		r0 = ret.Error(0)
    85  	}
    86  
    87  	return r0
    88  }
    89  
    90  // MeterMemory provides a mock function with given fields: usage
    91  func (_m *Meter) MeterMemory(usage common.MemoryUsage) error {
    92  	ret := _m.Called(usage)
    93  
    94  	var r0 error
    95  	if rf, ok := ret.Get(0).(func(common.MemoryUsage) error); ok {
    96  		r0 = rf(usage)
    97  	} else {
    98  		r0 = ret.Error(0)
    99  	}
   100  
   101  	return r0
   102  }
   103  
   104  // TotalEmittedEventBytes provides a mock function with given fields:
   105  func (_m *Meter) TotalEmittedEventBytes() uint64 {
   106  	ret := _m.Called()
   107  
   108  	var r0 uint64
   109  	if rf, ok := ret.Get(0).(func() uint64); ok {
   110  		r0 = rf()
   111  	} else {
   112  		r0 = ret.Get(0).(uint64)
   113  	}
   114  
   115  	return r0
   116  }
   117  
   118  type mockConstructorTestingTNewMeter interface {
   119  	mock.TestingT
   120  	Cleanup(func())
   121  }
   122  
   123  // NewMeter creates a new instance of Meter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
   124  func NewMeter(t mockConstructorTestingTNewMeter) *Meter {
   125  	mock := &Meter{}
   126  	mock.Mock.Test(t)
   127  
   128  	t.Cleanup(func() { mock.AssertExpectations(t) })
   129  
   130  	return mock
   131  }