v0.10.0 d5d679d

video_source_mock_test.go RawHistoryFolder

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

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