main f2d166b

image_allocator_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	mock "github.com/stretchr/testify/mock"
9)
10
11// 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.
12// The first argument is typically a *testing.T value.
13func newMockimageAllocator(t interface {
14	mock.TestingT
15	Cleanup(func())
16}) *mockimageAllocator {
17	if helper, ok := t.(interface{ Helper() }); ok {
18		helper.Helper()
19	}
20
21	mock := &mockimageAllocator{}
22	mock.Mock.Test(t)
23
24	t.Cleanup(func() {
25		if helper, ok := t.(interface{ Helper() }); ok {
26			helper.Helper()
27		}
28		mock.AssertExpectations(t)
29	})
30
31	return mock
32}
33
34// mockimageAllocator is an autogenerated mock type for the imageAllocator type
35type mockimageAllocator struct {
36	mock.Mock
37}
38
39type mockimageAllocator_Expecter struct {
40	mock *mock.Mock
41}
42
43func (_m *mockimageAllocator) EXPECT() *mockimageAllocator_Expecter {
44	return &mockimageAllocator_Expecter{mock: &_m.Mock}
45}
46
47// close provides a mock function for the type mockimageAllocator
48func (_mock *mockimageAllocator) close() {
49	_mock.Called()
50	return
51}
52
53// mockimageAllocator_close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'close'
54type mockimageAllocator_close_Call struct {
55	*mock.Call
56}
57
58// close is a helper method to define mock.On call
59func (_e *mockimageAllocator_Expecter) close() *mockimageAllocator_close_Call {
60	return &mockimageAllocator_close_Call{Call: _e.mock.On("close")}
61}
62
63func (_c *mockimageAllocator_close_Call) Run(run func()) *mockimageAllocator_close_Call {
64	_c.Call.Run(func(args mock.Arguments) {
65		run()
66	})
67	return _c
68}
69
70func (_c *mockimageAllocator_close_Call) Return() *mockimageAllocator_close_Call {
71	_c.Call.Return()
72	return _c
73}
74
75func (_c *mockimageAllocator_close_Call) RunAndReturn(run func()) *mockimageAllocator_close_Call {
76	_c.Run(run)
77	return _c
78}
79
80// create provides a mock function for the type mockimageAllocator
81func (_mock *mockimageAllocator) create(width int, height int, format uint32, modifiers []uint64) (imageBuffer, error) {
82	ret := _mock.Called(width, height, format, modifiers)
83
84	if len(ret) == 0 {
85		panic("no return value specified for create")
86	}
87
88	var r0 imageBuffer
89	var r1 error
90	if returnFunc, ok := ret.Get(0).(func(int, int, uint32, []uint64) (imageBuffer, error)); ok {
91		return returnFunc(width, height, format, modifiers)
92	}
93	if returnFunc, ok := ret.Get(0).(func(int, int, uint32, []uint64) imageBuffer); ok {
94		r0 = returnFunc(width, height, format, modifiers)
95	} else {
96		if ret.Get(0) != nil {
97			r0 = ret.Get(0).(imageBuffer)
98		}
99	}
100	if returnFunc, ok := ret.Get(1).(func(int, int, uint32, []uint64) error); ok {
101		r1 = returnFunc(width, height, format, modifiers)
102	} else {
103		r1 = ret.Error(1)
104	}
105	return r0, r1
106}
107
108// mockimageAllocator_create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'create'
109type mockimageAllocator_create_Call struct {
110	*mock.Call
111}
112
113// create is a helper method to define mock.On call
114//   - width int
115//   - height int
116//   - format uint32
117//   - modifiers []uint64
118func (_e *mockimageAllocator_Expecter) create(width any, height any, format any, modifiers any) *mockimageAllocator_create_Call {
119	return &mockimageAllocator_create_Call{Call: _e.mock.On("create", width, height, format, modifiers)}
120}
121
122func (_c *mockimageAllocator_create_Call) Run(run func(width int, height int, format uint32, modifiers []uint64)) *mockimageAllocator_create_Call {
123	_c.Call.Run(func(args mock.Arguments) {
124		var arg0 int
125		if args[0] != nil {
126			arg0 = args[0].(int)
127		}
128		var arg1 int
129		if args[1] != nil {
130			arg1 = args[1].(int)
131		}
132		var arg2 uint32
133		if args[2] != nil {
134			arg2 = args[2].(uint32)
135		}
136		var arg3 []uint64
137		if args[3] != nil {
138			arg3 = args[3].([]uint64)
139		}
140		run(
141			arg0,
142			arg1,
143			arg2,
144			arg3,
145		)
146	})
147	return _c
148}
149
150func (_c *mockimageAllocator_create_Call) Return(imageBufferMoqParam imageBuffer, err error) *mockimageAllocator_create_Call {
151	_c.Call.Return(imageBufferMoqParam, err)
152	return _c
153}
154
155func (_c *mockimageAllocator_create_Call) RunAndReturn(run func(width int, height int, format uint32, modifiers []uint64) (imageBuffer, error)) *mockimageAllocator_create_Call {
156	_c.Call.Return(run)
157	return _c
158}

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