v0.1.0 d9218d6

kms_mock_test.go RawHistoryFolder

1// Code generated by mockery; DO NOT EDIT.
2// github.com/vektra/mockery
3// template: testify
4
5package drm
6
7import (
8	"github.com/bnema/neferwl/internal/ports"
9	mock "github.com/stretchr/testify/mock"
10)
11
12// newMockkms creates a new instance of mockkms. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
13// The first argument is typically a *testing.T value.
14func newMockkms(t interface {
15	mock.TestingT
16	Cleanup(func())
17}) *mockkms {
18	if helper, ok := t.(interface{ Helper() }); ok {
19		helper.Helper()
20	}
21
22	mock := &mockkms{}
23	mock.Mock.Test(t)
24
25	t.Cleanup(func() {
26		if helper, ok := t.(interface{ Helper() }); ok {
27			helper.Helper()
28		}
29		mock.AssertExpectations(t)
30	})
31
32	return mock
33}
34
35// mockkms is an autogenerated mock type for the kms type
36type mockkms struct {
37	mock.Mock
38}
39
40type mockkms_Expecter struct {
41	mock *mock.Mock
42}
43
44func (_m *mockkms) EXPECT() *mockkms_Expecter {
45	return &mockkms_Expecter{mock: &_m.Mock}
46}
47
48// addFB provides a mock function for the type mockkms
49func (_mock *mockkms) addFB(b *ports.DMABuf, format uint32) (uint32, error) {
50	ret := _mock.Called(b, format)
51
52	if len(ret) == 0 {
53		panic("no return value specified for addFB")
54	}
55
56	var r0 uint32
57	var r1 error
58	if returnFunc, ok := ret.Get(0).(func(*ports.DMABuf, uint32) (uint32, error)); ok {
59		return returnFunc(b, format)
60	}
61	if returnFunc, ok := ret.Get(0).(func(*ports.DMABuf, uint32) uint32); ok {
62		r0 = returnFunc(b, format)
63	} else {
64		r0 = ret.Get(0).(uint32)
65	}
66	if returnFunc, ok := ret.Get(1).(func(*ports.DMABuf, uint32) error); ok {
67		r1 = returnFunc(b, format)
68	} else {
69		r1 = ret.Error(1)
70	}
71	return r0, r1
72}
73
74// mockkms_addFB_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'addFB'
75type mockkms_addFB_Call struct {
76	*mock.Call
77}
78
79// addFB is a helper method to define mock.On call
80//   - b *ports.DMABuf
81//   - format uint32
82func (_e *mockkms_Expecter) addFB(b any, format any) *mockkms_addFB_Call {
83	return &mockkms_addFB_Call{Call: _e.mock.On("addFB", b, format)}
84}
85
86func (_c *mockkms_addFB_Call) Run(run func(b *ports.DMABuf, format uint32)) *mockkms_addFB_Call {
87	_c.Call.Run(func(args mock.Arguments) {
88		var arg0 *ports.DMABuf
89		if args[0] != nil {
90			arg0 = args[0].(*ports.DMABuf)
91		}
92		var arg1 uint32
93		if args[1] != nil {
94			arg1 = args[1].(uint32)
95		}
96		run(
97			arg0,
98			arg1,
99		)
100	})
101	return _c
102}
103
104func (_c *mockkms_addFB_Call) Return(v uint32, err error) *mockkms_addFB_Call {
105	_c.Call.Return(v, err)
106	return _c
107}
108
109func (_c *mockkms_addFB_Call) RunAndReturn(run func(b *ports.DMABuf, format uint32) (uint32, error)) *mockkms_addFB_Call {
110	_c.Call.Return(run)
111	return _c
112}
113
114// commit provides a mock function for the type mockkms
115func (_mock *mockkms) commit(req *atomicReq, flags uint32, userData uint64) error {
116	ret := _mock.Called(req, flags, userData)
117
118	if len(ret) == 0 {
119		panic("no return value specified for commit")
120	}
121
122	var r0 error
123	if returnFunc, ok := ret.Get(0).(func(*atomicReq, uint32, uint64) error); ok {
124		r0 = returnFunc(req, flags, userData)
125	} else {
126		r0 = ret.Error(0)
127	}
128	return r0
129}
130
131// mockkms_commit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'commit'
132type mockkms_commit_Call struct {
133	*mock.Call
134}
135
136// commit is a helper method to define mock.On call
137//   - req *atomicReq
138//   - flags uint32
139//   - userData uint64
140func (_e *mockkms_Expecter) commit(req any, flags any, userData any) *mockkms_commit_Call {
141	return &mockkms_commit_Call{Call: _e.mock.On("commit", req, flags, userData)}
142}
143
144func (_c *mockkms_commit_Call) Run(run func(req *atomicReq, flags uint32, userData uint64)) *mockkms_commit_Call {
145	_c.Call.Run(func(args mock.Arguments) {
146		var arg0 *atomicReq
147		if args[0] != nil {
148			arg0 = args[0].(*atomicReq)
149		}
150		var arg1 uint32
151		if args[1] != nil {
152			arg1 = args[1].(uint32)
153		}
154		var arg2 uint64
155		if args[2] != nil {
156			arg2 = args[2].(uint64)
157		}
158		run(
159			arg0,
160			arg1,
161			arg2,
162		)
163	})
164	return _c
165}
166
167func (_c *mockkms_commit_Call) Return(err error) *mockkms_commit_Call {
168	_c.Call.Return(err)
169	return _c
170}
171
172func (_c *mockkms_commit_Call) RunAndReturn(run func(req *atomicReq, flags uint32, userData uint64) error) *mockkms_commit_Call {
173	_c.Call.Return(run)
174	return _c
175}
176
177// createBlob provides a mock function for the type mockkms
178func (_mock *mockkms) createBlob(data []byte) (uint32, error) {
179	ret := _mock.Called(data)
180
181	if len(ret) == 0 {
182		panic("no return value specified for createBlob")
183	}
184
185	var r0 uint32
186	var r1 error
187	if returnFunc, ok := ret.Get(0).(func([]byte) (uint32, error)); ok {
188		return returnFunc(data)
189	}
190	if returnFunc, ok := ret.Get(0).(func([]byte) uint32); ok {
191		r0 = returnFunc(data)
192	} else {
193		r0 = ret.Get(0).(uint32)
194	}
195	if returnFunc, ok := ret.Get(1).(func([]byte) error); ok {
196		r1 = returnFunc(data)
197	} else {
198		r1 = ret.Error(1)
199	}
200	return r0, r1
201}
202
203// mockkms_createBlob_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'createBlob'
204type mockkms_createBlob_Call struct {
205	*mock.Call
206}
207
208// createBlob is a helper method to define mock.On call
209//   - data []byte
210func (_e *mockkms_Expecter) createBlob(data any) *mockkms_createBlob_Call {
211	return &mockkms_createBlob_Call{Call: _e.mock.On("createBlob", data)}
212}
213
214func (_c *mockkms_createBlob_Call) Run(run func(data []byte)) *mockkms_createBlob_Call {
215	_c.Call.Run(func(args mock.Arguments) {
216		var arg0 []byte
217		if args[0] != nil {
218			arg0 = args[0].([]byte)
219		}
220		run(
221			arg0,
222		)
223	})
224	return _c
225}
226
227func (_c *mockkms_createBlob_Call) Return(v uint32, err error) *mockkms_createBlob_Call {
228	_c.Call.Return(v, err)
229	return _c
230}
231
232func (_c *mockkms_createBlob_Call) RunAndReturn(run func(data []byte) (uint32, error)) *mockkms_createBlob_Call {
233	_c.Call.Return(run)
234	return _c
235}
236
237// destroyBlob provides a mock function for the type mockkms
238func (_mock *mockkms) destroyBlob(id uint32) error {
239	ret := _mock.Called(id)
240
241	if len(ret) == 0 {
242		panic("no return value specified for destroyBlob")
243	}
244
245	var r0 error
246	if returnFunc, ok := ret.Get(0).(func(uint32) error); ok {
247		r0 = returnFunc(id)
248	} else {
249		r0 = ret.Error(0)
250	}
251	return r0
252}
253
254// mockkms_destroyBlob_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'destroyBlob'
255type mockkms_destroyBlob_Call struct {
256	*mock.Call
257}
258
259// destroyBlob is a helper method to define mock.On call
260//   - id uint32
261func (_e *mockkms_Expecter) destroyBlob(id any) *mockkms_destroyBlob_Call {
262	return &mockkms_destroyBlob_Call{Call: _e.mock.On("destroyBlob", id)}
263}
264
265func (_c *mockkms_destroyBlob_Call) Run(run func(id uint32)) *mockkms_destroyBlob_Call {
266	_c.Call.Run(func(args mock.Arguments) {
267		var arg0 uint32
268		if args[0] != nil {
269			arg0 = args[0].(uint32)
270		}
271		run(
272			arg0,
273		)
274	})
275	return _c
276}
277
278func (_c *mockkms_destroyBlob_Call) Return(err error) *mockkms_destroyBlob_Call {
279	_c.Call.Return(err)
280	return _c
281}
282
283func (_c *mockkms_destroyBlob_Call) RunAndReturn(run func(id uint32) error) *mockkms_destroyBlob_Call {
284	_c.Call.Return(run)
285	return _c
286}
287
288// getBlob provides a mock function for the type mockkms
289func (_mock *mockkms) getBlob(id uint32) ([]byte, error) {
290	ret := _mock.Called(id)
291
292	if len(ret) == 0 {
293		panic("no return value specified for getBlob")
294	}
295
296	var r0 []byte
297	var r1 error
298	if returnFunc, ok := ret.Get(0).(func(uint32) ([]byte, error)); ok {
299		return returnFunc(id)
300	}
301	if returnFunc, ok := ret.Get(0).(func(uint32) []byte); ok {
302		r0 = returnFunc(id)
303	} else {
304		if ret.Get(0) != nil {
305			r0 = ret.Get(0).([]byte)
306		}
307	}
308	if returnFunc, ok := ret.Get(1).(func(uint32) error); ok {
309		r1 = returnFunc(id)
310	} else {
311		r1 = ret.Error(1)
312	}
313	return r0, r1
314}
315
316// mockkms_getBlob_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'getBlob'
317type mockkms_getBlob_Call struct {
318	*mock.Call
319}
320
321// getBlob is a helper method to define mock.On call
322//   - id uint32
323func (_e *mockkms_Expecter) getBlob(id any) *mockkms_getBlob_Call {
324	return &mockkms_getBlob_Call{Call: _e.mock.On("getBlob", id)}
325}
326
327func (_c *mockkms_getBlob_Call) Run(run func(id uint32)) *mockkms_getBlob_Call {
328	_c.Call.Run(func(args mock.Arguments) {
329		var arg0 uint32
330		if args[0] != nil {
331			arg0 = args[0].(uint32)
332		}
333		run(
334			arg0,
335		)
336	})
337	return _c
338}
339
340func (_c *mockkms_getBlob_Call) Return(bytes []byte, err error) *mockkms_getBlob_Call {
341	_c.Call.Return(bytes, err)
342	return _c
343}
344
345func (_c *mockkms_getBlob_Call) RunAndReturn(run func(id uint32) ([]byte, error)) *mockkms_getBlob_Call {
346	_c.Call.Return(run)
347	return _c
348}
349
350// objProps provides a mock function for the type mockkms
351func (_mock *mockkms) objProps(obj uint32, typ uint32) (map[string][2]uint64, error) {
352	ret := _mock.Called(obj, typ)
353
354	if len(ret) == 0 {
355		panic("no return value specified for objProps")
356	}
357
358	var r0 map[string][2]uint64
359	var r1 error
360	if returnFunc, ok := ret.Get(0).(func(uint32, uint32) (map[string][2]uint64, error)); ok {
361		return returnFunc(obj, typ)
362	}
363	if returnFunc, ok := ret.Get(0).(func(uint32, uint32) map[string][2]uint64); ok {
364		r0 = returnFunc(obj, typ)
365	} else {
366		if ret.Get(0) != nil {
367			r0 = ret.Get(0).(map[string][2]uint64)
368		}
369	}
370	if returnFunc, ok := ret.Get(1).(func(uint32, uint32) error); ok {
371		r1 = returnFunc(obj, typ)
372	} else {
373		r1 = ret.Error(1)
374	}
375	return r0, r1
376}
377
378// mockkms_objProps_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'objProps'
379type mockkms_objProps_Call struct {
380	*mock.Call
381}
382
383// objProps is a helper method to define mock.On call
384//   - obj uint32
385//   - typ uint32
386func (_e *mockkms_Expecter) objProps(obj any, typ any) *mockkms_objProps_Call {
387	return &mockkms_objProps_Call{Call: _e.mock.On("objProps", obj, typ)}
388}
389
390func (_c *mockkms_objProps_Call) Run(run func(obj uint32, typ uint32)) *mockkms_objProps_Call {
391	_c.Call.Run(func(args mock.Arguments) {
392		var arg0 uint32
393		if args[0] != nil {
394			arg0 = args[0].(uint32)
395		}
396		var arg1 uint32
397		if args[1] != nil {
398			arg1 = args[1].(uint32)
399		}
400		run(
401			arg0,
402			arg1,
403		)
404	})
405	return _c
406}
407
408func (_c *mockkms_objProps_Call) Return(stringToUint64s map[string][2]uint64, err error) *mockkms_objProps_Call {
409	_c.Call.Return(stringToUint64s, err)
410	return _c
411}
412
413func (_c *mockkms_objProps_Call) RunAndReturn(run func(obj uint32, typ uint32) (map[string][2]uint64, error)) *mockkms_objProps_Call {
414	_c.Call.Return(run)
415	return _c
416}
417
418// planes provides a mock function for the type mockkms
419func (_mock *mockkms) planes() ([]planeRes, error) {
420	ret := _mock.Called()
421
422	if len(ret) == 0 {
423		panic("no return value specified for planes")
424	}
425
426	var r0 []planeRes
427	var r1 error
428	if returnFunc, ok := ret.Get(0).(func() ([]planeRes, error)); ok {
429		return returnFunc()
430	}
431	if returnFunc, ok := ret.Get(0).(func() []planeRes); ok {
432		r0 = returnFunc()
433	} else {
434		if ret.Get(0) != nil {
435			r0 = ret.Get(0).([]planeRes)
436		}
437	}
438	if returnFunc, ok := ret.Get(1).(func() error); ok {
439		r1 = returnFunc()
440	} else {
441		r1 = ret.Error(1)
442	}
443	return r0, r1
444}
445
446// mockkms_planes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'planes'
447type mockkms_planes_Call struct {
448	*mock.Call
449}
450
451// planes is a helper method to define mock.On call
452func (_e *mockkms_Expecter) planes() *mockkms_planes_Call {
453	return &mockkms_planes_Call{Call: _e.mock.On("planes")}
454}
455
456func (_c *mockkms_planes_Call) Run(run func()) *mockkms_planes_Call {
457	_c.Call.Run(func(args mock.Arguments) {
458		run()
459	})
460	return _c
461}
462
463func (_c *mockkms_planes_Call) Return(planeResMoqParams []planeRes, err error) *mockkms_planes_Call {
464	_c.Call.Return(planeResMoqParams, err)
465	return _c
466}
467
468func (_c *mockkms_planes_Call) RunAndReturn(run func() ([]planeRes, error)) *mockkms_planes_Call {
469	_c.Call.Return(run)
470	return _c
471}
472
473// rmFB provides a mock function for the type mockkms
474func (_mock *mockkms) rmFB(id uint32) error {
475	ret := _mock.Called(id)
476
477	if len(ret) == 0 {
478		panic("no return value specified for rmFB")
479	}
480
481	var r0 error
482	if returnFunc, ok := ret.Get(0).(func(uint32) error); ok {
483		r0 = returnFunc(id)
484	} else {
485		r0 = ret.Error(0)
486	}
487	return r0
488}
489
490// mockkms_rmFB_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'rmFB'
491type mockkms_rmFB_Call struct {
492	*mock.Call
493}
494
495// rmFB is a helper method to define mock.On call
496//   - id uint32
497func (_e *mockkms_Expecter) rmFB(id any) *mockkms_rmFB_Call {
498	return &mockkms_rmFB_Call{Call: _e.mock.On("rmFB", id)}
499}
500
501func (_c *mockkms_rmFB_Call) Run(run func(id uint32)) *mockkms_rmFB_Call {
502	_c.Call.Run(func(args mock.Arguments) {
503		var arg0 uint32
504		if args[0] != nil {
505			arg0 = args[0].(uint32)
506		}
507		run(
508			arg0,
509		)
510	})
511	return _c
512}
513
514func (_c *mockkms_rmFB_Call) Return(err error) *mockkms_rmFB_Call {
515	_c.Call.Return(err)
516	return _c
517}
518
519func (_c *mockkms_rmFB_Call) RunAndReturn(run func(id uint32) error) *mockkms_rmFB_Call {
520	_c.Call.Return(run)
521	return _c
522}

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 23

Tags 10

↑↓ moveenter openesc close