syncobj_device_mock_test.go RawHistoryFolder

1// Code generated by mockery; DO NOT EDIT.
2// github.com/vektra/mockery
3// template: testify
4
5package wayland
6
7import (
8	"os"
9
10	mock "github.com/stretchr/testify/mock"
11)
12
13// newMocksyncobjDevice creates a new instance of mocksyncobjDevice. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
14// The first argument is typically a *testing.T value.
15func newMocksyncobjDevice(t interface {
16	mock.TestingT
17	Cleanup(func())
18}) *mocksyncobjDevice {
19	if helper, ok := t.(interface{ Helper() }); ok {
20		helper.Helper()
21	}
22
23	mock := &mocksyncobjDevice{}
24	mock.Mock.Test(t)
25
26	t.Cleanup(func() {
27		if helper, ok := t.(interface{ Helper() }); ok {
28			helper.Helper()
29		}
30		mock.AssertExpectations(t)
31	})
32
33	return mock
34}
35
36// mocksyncobjDevice is an autogenerated mock type for the syncobjDevice type
37type mocksyncobjDevice struct {
38	mock.Mock
39}
40
41type mocksyncobjDevice_Expecter struct {
42	mock *mock.Mock
43}
44
45func (_m *mocksyncobjDevice) EXPECT() *mocksyncobjDevice_Expecter {
46	return &mocksyncobjDevice_Expecter{mock: &_m.Mock}
47}
48
49// destroy provides a mock function for the type mocksyncobjDevice
50func (_mock *mocksyncobjDevice) destroy(h uint32) error {
51	ret := _mock.Called(h)
52
53	if len(ret) == 0 {
54		panic("no return value specified for destroy")
55	}
56
57	var r0 error
58	if returnFunc, ok := ret.Get(0).(func(uint32) error); ok {
59		r0 = returnFunc(h)
60	} else {
61		r0 = ret.Error(0)
62	}
63	return r0
64}
65
66// mocksyncobjDevice_destroy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'destroy'
67type mocksyncobjDevice_destroy_Call struct {
68	*mock.Call
69}
70
71// destroy is a helper method to define mock.On call
72//   - h uint32
73func (_e *mocksyncobjDevice_Expecter) destroy(h any) *mocksyncobjDevice_destroy_Call {
74	return &mocksyncobjDevice_destroy_Call{Call: _e.mock.On("destroy", h)}
75}
76
77func (_c *mocksyncobjDevice_destroy_Call) Run(run func(h uint32)) *mocksyncobjDevice_destroy_Call {
78	_c.Call.Run(func(args mock.Arguments) {
79		var arg0 uint32
80		if args[0] != nil {
81			arg0 = args[0].(uint32)
82		}
83		run(
84			arg0,
85		)
86	})
87	return _c
88}
89
90func (_c *mocksyncobjDevice_destroy_Call) Return(err error) *mocksyncobjDevice_destroy_Call {
91	_c.Call.Return(err)
92	return _c
93}
94
95func (_c *mocksyncobjDevice_destroy_Call) RunAndReturn(run func(h uint32) error) *mocksyncobjDevice_destroy_Call {
96	_c.Call.Return(run)
97	return _c
98}
99
100// eventfd provides a mock function for the type mocksyncobjDevice
101func (_mock *mocksyncobjDevice) eventfd(h uint32, point uint64, efd int) error {
102	ret := _mock.Called(h, point, efd)
103
104	if len(ret) == 0 {
105		panic("no return value specified for eventfd")
106	}
107
108	var r0 error
109	if returnFunc, ok := ret.Get(0).(func(uint32, uint64, int) error); ok {
110		r0 = returnFunc(h, point, efd)
111	} else {
112		r0 = ret.Error(0)
113	}
114	return r0
115}
116
117// mocksyncobjDevice_eventfd_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'eventfd'
118type mocksyncobjDevice_eventfd_Call struct {
119	*mock.Call
120}
121
122// eventfd is a helper method to define mock.On call
123//   - h uint32
124//   - point uint64
125//   - efd int
126func (_e *mocksyncobjDevice_Expecter) eventfd(h any, point any, efd any) *mocksyncobjDevice_eventfd_Call {
127	return &mocksyncobjDevice_eventfd_Call{Call: _e.mock.On("eventfd", h, point, efd)}
128}
129
130func (_c *mocksyncobjDevice_eventfd_Call) Run(run func(h uint32, point uint64, efd int)) *mocksyncobjDevice_eventfd_Call {
131	_c.Call.Run(func(args mock.Arguments) {
132		var arg0 uint32
133		if args[0] != nil {
134			arg0 = args[0].(uint32)
135		}
136		var arg1 uint64
137		if args[1] != nil {
138			arg1 = args[1].(uint64)
139		}
140		var arg2 int
141		if args[2] != nil {
142			arg2 = args[2].(int)
143		}
144		run(
145			arg0,
146			arg1,
147			arg2,
148		)
149	})
150	return _c
151}
152
153func (_c *mocksyncobjDevice_eventfd_Call) Return(err error) *mocksyncobjDevice_eventfd_Call {
154	_c.Call.Return(err)
155	return _c
156}
157
158func (_c *mocksyncobjDevice_eventfd_Call) RunAndReturn(run func(h uint32, point uint64, efd int) error) *mocksyncobjDevice_eventfd_Call {
159	_c.Call.Return(run)
160	return _c
161}
162
163// exportSyncFile provides a mock function for the type mocksyncobjDevice
164func (_mock *mocksyncobjDevice) exportSyncFile(h uint32, point uint64) (*os.File, error) {
165	ret := _mock.Called(h, point)
166
167	if len(ret) == 0 {
168		panic("no return value specified for exportSyncFile")
169	}
170
171	var r0 *os.File
172	var r1 error
173	if returnFunc, ok := ret.Get(0).(func(uint32, uint64) (*os.File, error)); ok {
174		return returnFunc(h, point)
175	}
176	if returnFunc, ok := ret.Get(0).(func(uint32, uint64) *os.File); ok {
177		r0 = returnFunc(h, point)
178	} else {
179		if ret.Get(0) != nil {
180			r0 = ret.Get(0).(*os.File)
181		}
182	}
183	if returnFunc, ok := ret.Get(1).(func(uint32, uint64) error); ok {
184		r1 = returnFunc(h, point)
185	} else {
186		r1 = ret.Error(1)
187	}
188	return r0, r1
189}
190
191// mocksyncobjDevice_exportSyncFile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'exportSyncFile'
192type mocksyncobjDevice_exportSyncFile_Call struct {
193	*mock.Call
194}
195
196// exportSyncFile is a helper method to define mock.On call
197//   - h uint32
198//   - point uint64
199func (_e *mocksyncobjDevice_Expecter) exportSyncFile(h any, point any) *mocksyncobjDevice_exportSyncFile_Call {
200	return &mocksyncobjDevice_exportSyncFile_Call{Call: _e.mock.On("exportSyncFile", h, point)}
201}
202
203func (_c *mocksyncobjDevice_exportSyncFile_Call) Run(run func(h uint32, point uint64)) *mocksyncobjDevice_exportSyncFile_Call {
204	_c.Call.Run(func(args mock.Arguments) {
205		var arg0 uint32
206		if args[0] != nil {
207			arg0 = args[0].(uint32)
208		}
209		var arg1 uint64
210		if args[1] != nil {
211			arg1 = args[1].(uint64)
212		}
213		run(
214			arg0,
215			arg1,
216		)
217	})
218	return _c
219}
220
221func (_c *mocksyncobjDevice_exportSyncFile_Call) Return(file *os.File, err error) *mocksyncobjDevice_exportSyncFile_Call {
222	_c.Call.Return(file, err)
223	return _c
224}
225
226func (_c *mocksyncobjDevice_exportSyncFile_Call) RunAndReturn(run func(h uint32, point uint64) (*os.File, error)) *mocksyncobjDevice_exportSyncFile_Call {
227	_c.Call.Return(run)
228	return _c
229}
230
231// fdToHandle provides a mock function for the type mocksyncobjDevice
232func (_mock *mocksyncobjDevice) fdToHandle(fd int) (uint32, error) {
233	ret := _mock.Called(fd)
234
235	if len(ret) == 0 {
236		panic("no return value specified for fdToHandle")
237	}
238
239	var r0 uint32
240	var r1 error
241	if returnFunc, ok := ret.Get(0).(func(int) (uint32, error)); ok {
242		return returnFunc(fd)
243	}
244	if returnFunc, ok := ret.Get(0).(func(int) uint32); ok {
245		r0 = returnFunc(fd)
246	} else {
247		r0 = ret.Get(0).(uint32)
248	}
249	if returnFunc, ok := ret.Get(1).(func(int) error); ok {
250		r1 = returnFunc(fd)
251	} else {
252		r1 = ret.Error(1)
253	}
254	return r0, r1
255}
256
257// mocksyncobjDevice_fdToHandle_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'fdToHandle'
258type mocksyncobjDevice_fdToHandle_Call struct {
259	*mock.Call
260}
261
262// fdToHandle is a helper method to define mock.On call
263//   - fd int
264func (_e *mocksyncobjDevice_Expecter) fdToHandle(fd any) *mocksyncobjDevice_fdToHandle_Call {
265	return &mocksyncobjDevice_fdToHandle_Call{Call: _e.mock.On("fdToHandle", fd)}
266}
267
268func (_c *mocksyncobjDevice_fdToHandle_Call) Run(run func(fd int)) *mocksyncobjDevice_fdToHandle_Call {
269	_c.Call.Run(func(args mock.Arguments) {
270		var arg0 int
271		if args[0] != nil {
272			arg0 = args[0].(int)
273		}
274		run(
275			arg0,
276		)
277	})
278	return _c
279}
280
281func (_c *mocksyncobjDevice_fdToHandle_Call) Return(v uint32, err error) *mocksyncobjDevice_fdToHandle_Call {
282	_c.Call.Return(v, err)
283	return _c
284}
285
286func (_c *mocksyncobjDevice_fdToHandle_Call) RunAndReturn(run func(fd int) (uint32, error)) *mocksyncobjDevice_fdToHandle_Call {
287	_c.Call.Return(run)
288	return _c
289}
290
291// signal provides a mock function for the type mocksyncobjDevice
292func (_mock *mocksyncobjDevice) signal(h uint32, point uint64) error {
293	ret := _mock.Called(h, point)
294
295	if len(ret) == 0 {
296		panic("no return value specified for signal")
297	}
298
299	var r0 error
300	if returnFunc, ok := ret.Get(0).(func(uint32, uint64) error); ok {
301		r0 = returnFunc(h, point)
302	} else {
303		r0 = ret.Error(0)
304	}
305	return r0
306}
307
308// mocksyncobjDevice_signal_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'signal'
309type mocksyncobjDevice_signal_Call struct {
310	*mock.Call
311}
312
313// signal is a helper method to define mock.On call
314//   - h uint32
315//   - point uint64
316func (_e *mocksyncobjDevice_Expecter) signal(h any, point any) *mocksyncobjDevice_signal_Call {
317	return &mocksyncobjDevice_signal_Call{Call: _e.mock.On("signal", h, point)}
318}
319
320func (_c *mocksyncobjDevice_signal_Call) Run(run func(h uint32, point uint64)) *mocksyncobjDevice_signal_Call {
321	_c.Call.Run(func(args mock.Arguments) {
322		var arg0 uint32
323		if args[0] != nil {
324			arg0 = args[0].(uint32)
325		}
326		var arg1 uint64
327		if args[1] != nil {
328			arg1 = args[1].(uint64)
329		}
330		run(
331			arg0,
332			arg1,
333		)
334	})
335	return _c
336}
337
338func (_c *mocksyncobjDevice_signal_Call) Return(err error) *mocksyncobjDevice_signal_Call {
339	_c.Call.Return(err)
340	return _c
341}
342
343func (_c *mocksyncobjDevice_signal_Call) RunAndReturn(run func(h uint32, point uint64) error) *mocksyncobjDevice_signal_Call {
344	_c.Call.Return(run)
345	return _c
346}
347
348// signalled provides a mock function for the type mocksyncobjDevice
349func (_mock *mocksyncobjDevice) signalled(h uint32, point uint64) (bool, error) {
350	ret := _mock.Called(h, point)
351
352	if len(ret) == 0 {
353		panic("no return value specified for signalled")
354	}
355
356	var r0 bool
357	var r1 error
358	if returnFunc, ok := ret.Get(0).(func(uint32, uint64) (bool, error)); ok {
359		return returnFunc(h, point)
360	}
361	if returnFunc, ok := ret.Get(0).(func(uint32, uint64) bool); ok {
362		r0 = returnFunc(h, point)
363	} else {
364		r0 = ret.Get(0).(bool)
365	}
366	if returnFunc, ok := ret.Get(1).(func(uint32, uint64) error); ok {
367		r1 = returnFunc(h, point)
368	} else {
369		r1 = ret.Error(1)
370	}
371	return r0, r1
372}
373
374// mocksyncobjDevice_signalled_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'signalled'
375type mocksyncobjDevice_signalled_Call struct {
376	*mock.Call
377}
378
379// signalled is a helper method to define mock.On call
380//   - h uint32
381//   - point uint64
382func (_e *mocksyncobjDevice_Expecter) signalled(h any, point any) *mocksyncobjDevice_signalled_Call {
383	return &mocksyncobjDevice_signalled_Call{Call: _e.mock.On("signalled", h, point)}
384}
385
386func (_c *mocksyncobjDevice_signalled_Call) Run(run func(h uint32, point uint64)) *mocksyncobjDevice_signalled_Call {
387	_c.Call.Run(func(args mock.Arguments) {
388		var arg0 uint32
389		if args[0] != nil {
390			arg0 = args[0].(uint32)
391		}
392		var arg1 uint64
393		if args[1] != nil {
394			arg1 = args[1].(uint64)
395		}
396		run(
397			arg0,
398			arg1,
399		)
400	})
401	return _c
402}
403
404func (_c *mocksyncobjDevice_signalled_Call) Return(b bool, err error) *mocksyncobjDevice_signalled_Call {
405	_c.Call.Return(b, err)
406	return _c
407}
408
409func (_c *mocksyncobjDevice_signalled_Call) RunAndReturn(run func(h uint32, point uint64) (bool, error)) *mocksyncobjDevice_signalled_Call {
410	_c.Call.Return(run)
411	return _c
412}

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 25

Tags 10

↑↓ moveenter openesc close