// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package wayland import ( mock "github.com/stretchr/testify/mock" "golang.org/x/sys/unix" ) // newMockacquirePoller creates a new instance of mockacquirePoller. 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 newMockacquirePoller(t interface { mock.TestingT Cleanup(func()) }) *mockacquirePoller { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &mockacquirePoller{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // mockacquirePoller is an autogenerated mock type for the acquirePoller type type mockacquirePoller struct { mock.Mock } type mockacquirePoller_Expecter struct { mock *mock.Mock } func (_m *mockacquirePoller) EXPECT() *mockacquirePoller_Expecter { return &mockacquirePoller_Expecter{mock: &_m.Mock} } // poll provides a mock function for the type mockacquirePoller func (_mock *mockacquirePoller) poll(pollFds []unix.PollFd, n int) (int, error) { ret := _mock.Called(pollFds, n) if len(ret) == 0 { panic("no return value specified for poll") } var r0 int var r1 error if returnFunc, ok := ret.Get(0).(func([]unix.PollFd, int) (int, error)); ok { return returnFunc(pollFds, n) } if returnFunc, ok := ret.Get(0).(func([]unix.PollFd, int) int); ok { r0 = returnFunc(pollFds, n) } else { r0 = ret.Get(0).(int) } if returnFunc, ok := ret.Get(1).(func([]unix.PollFd, int) error); ok { r1 = returnFunc(pollFds, n) } else { r1 = ret.Error(1) } return r0, r1 } // mockacquirePoller_poll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'poll' type mockacquirePoller_poll_Call struct { *mock.Call } // poll is a helper method to define mock.On call // - pollFds []unix.PollFd // - n int func (_e *mockacquirePoller_Expecter) poll(pollFds any, n any) *mockacquirePoller_poll_Call { return &mockacquirePoller_poll_Call{Call: _e.mock.On("poll", pollFds, n)} } func (_c *mockacquirePoller_poll_Call) Run(run func(pollFds []unix.PollFd, n int)) *mockacquirePoller_poll_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 []unix.PollFd if args[0] != nil { arg0 = args[0].([]unix.PollFd) } var arg1 int if args[1] != nil { arg1 = args[1].(int) } run( arg0, arg1, ) }) return _c } func (_c *mockacquirePoller_poll_Call) Return(n1 int, err error) *mockacquirePoller_poll_Call { _c.Call.Return(n1, err) return _c } func (_c *mockacquirePoller_poll_Call) RunAndReturn(run func(pollFds []unix.PollFd, n int) (int, error)) *mockacquirePoller_poll_Call { _c.Call.Return(run) return _c }