// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package drm import ( mock "github.com/stretchr/testify/mock" ) // newMockimageAllocator creates a new instance of mockimageAllocator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func newMockimageAllocator(t interface { mock.TestingT Cleanup(func()) }) *mockimageAllocator { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &mockimageAllocator{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // mockimageAllocator is an autogenerated mock type for the imageAllocator type type mockimageAllocator struct { mock.Mock } type mockimageAllocator_Expecter struct { mock *mock.Mock } func (_m *mockimageAllocator) EXPECT() *mockimageAllocator_Expecter { return &mockimageAllocator_Expecter{mock: &_m.Mock} } // close provides a mock function for the type mockimageAllocator func (_mock *mockimageAllocator) close() { _mock.Called() return } // mockimageAllocator_close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'close' type mockimageAllocator_close_Call struct { *mock.Call } // close is a helper method to define mock.On call func (_e *mockimageAllocator_Expecter) close() *mockimageAllocator_close_Call { return &mockimageAllocator_close_Call{Call: _e.mock.On("close")} } func (_c *mockimageAllocator_close_Call) Run(run func()) *mockimageAllocator_close_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *mockimageAllocator_close_Call) Return() *mockimageAllocator_close_Call { _c.Call.Return() return _c } func (_c *mockimageAllocator_close_Call) RunAndReturn(run func()) *mockimageAllocator_close_Call { _c.Run(run) return _c } // create provides a mock function for the type mockimageAllocator func (_mock *mockimageAllocator) create(width int, height int, format uint32, modifiers []uint64) (imageBuffer, error) { ret := _mock.Called(width, height, format, modifiers) if len(ret) == 0 { panic("no return value specified for create") } var r0 imageBuffer var r1 error if returnFunc, ok := ret.Get(0).(func(int, int, uint32, []uint64) (imageBuffer, error)); ok { return returnFunc(width, height, format, modifiers) } if returnFunc, ok := ret.Get(0).(func(int, int, uint32, []uint64) imageBuffer); ok { r0 = returnFunc(width, height, format, modifiers) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(imageBuffer) } } if returnFunc, ok := ret.Get(1).(func(int, int, uint32, []uint64) error); ok { r1 = returnFunc(width, height, format, modifiers) } else { r1 = ret.Error(1) } return r0, r1 } // mockimageAllocator_create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'create' type mockimageAllocator_create_Call struct { *mock.Call } // create is a helper method to define mock.On call // - width int // - height int // - format uint32 // - modifiers []uint64 func (_e *mockimageAllocator_Expecter) create(width any, height any, format any, modifiers any) *mockimageAllocator_create_Call { return &mockimageAllocator_create_Call{Call: _e.mock.On("create", width, height, format, modifiers)} } func (_c *mockimageAllocator_create_Call) Run(run func(width int, height int, format uint32, modifiers []uint64)) *mockimageAllocator_create_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 int if args[0] != nil { arg0 = args[0].(int) } var arg1 int if args[1] != nil { arg1 = args[1].(int) } var arg2 uint32 if args[2] != nil { arg2 = args[2].(uint32) } var arg3 []uint64 if args[3] != nil { arg3 = args[3].([]uint64) } run( arg0, arg1, arg2, arg3, ) }) return _c } func (_c *mockimageAllocator_create_Call) Return(imageBufferMoqParam imageBuffer, err error) *mockimageAllocator_create_Call { _c.Call.Return(imageBufferMoqParam, err) return _c } func (_c *mockimageAllocator_create_Call) RunAndReturn(run func(width int, height int, format uint32, modifiers []uint64) (imageBuffer, error)) *mockimageAllocator_create_Call { _c.Call.Return(run) return _c }