github.com/google/syzkaller@v0.0.0-20251211124644-a066d2bc4b02/pkg/coveragedb/mocks/Row.go (about) 1 // Code generated by mockery; DO NOT EDIT. 2 // github.com/vektra/mockery 3 // template: testify 4 5 package mocks 6 7 import ( 8 mock "github.com/stretchr/testify/mock" 9 ) 10 11 // NewRow creates a new instance of Row. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 12 // The first argument is typically a *testing.T value. 13 func NewRow(t interface { 14 mock.TestingT 15 Cleanup(func()) 16 }) *Row { 17 mock := &Row{} 18 mock.Mock.Test(t) 19 20 t.Cleanup(func() { mock.AssertExpectations(t) }) 21 22 return mock 23 } 24 25 // Row is an autogenerated mock type for the Row type 26 type Row struct { 27 mock.Mock 28 } 29 30 type Row_Expecter struct { 31 mock *mock.Mock 32 } 33 34 func (_m *Row) EXPECT() *Row_Expecter { 35 return &Row_Expecter{mock: &_m.Mock} 36 } 37 38 // ToStruct provides a mock function for the type Row 39 func (_mock *Row) ToStruct(p interface{}) error { 40 ret := _mock.Called(p) 41 42 if len(ret) == 0 { 43 panic("no return value specified for ToStruct") 44 } 45 46 var r0 error 47 if returnFunc, ok := ret.Get(0).(func(interface{}) error); ok { 48 r0 = returnFunc(p) 49 } else { 50 r0 = ret.Error(0) 51 } 52 return r0 53 } 54 55 // Row_ToStruct_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ToStruct' 56 type Row_ToStruct_Call struct { 57 *mock.Call 58 } 59 60 // ToStruct is a helper method to define mock.On call 61 // - p interface{} 62 func (_e *Row_Expecter) ToStruct(p interface{}) *Row_ToStruct_Call { 63 return &Row_ToStruct_Call{Call: _e.mock.On("ToStruct", p)} 64 } 65 66 func (_c *Row_ToStruct_Call) Run(run func(p interface{})) *Row_ToStruct_Call { 67 _c.Call.Run(func(args mock.Arguments) { 68 var arg0 interface{} 69 if args[0] != nil { 70 arg0 = args[0].(interface{}) 71 } 72 run( 73 arg0, 74 ) 75 }) 76 return _c 77 } 78 79 func (_c *Row_ToStruct_Call) Return(err error) *Row_ToStruct_Call { 80 _c.Call.Return(err) 81 return _c 82 } 83 84 func (_c *Row_ToStruct_Call) RunAndReturn(run func(p interface{}) error) *Row_ToStruct_Call { 85 _c.Call.Return(run) 86 return _c 87 }