main c541a90

native_memory_mock_test.go RawHistoryFolder

1// Code generated by mockery; DO NOT EDIT.
2// github.com/vektra/mockery
3// template: testify
4
5package pam
6
7import (
8	"unsafe"
9
10	mock "github.com/stretchr/testify/mock"
11)
12
13// newMocknativeMemory creates a new instance of mocknativeMemory. 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 newMocknativeMemory(t interface {
16	mock.TestingT
17	Cleanup(func())
18}) *mocknativeMemory {
19	if helper, ok := t.(interface{ Helper() }); ok {
20		helper.Helper()
21	}
22
23	mock := &mocknativeMemory{}
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// mocknativeMemory is an autogenerated mock type for the nativeMemory type
37type mocknativeMemory struct {
38	mock.Mock
39}
40
41type mocknativeMemory_Expecter struct {
42	mock *mock.Mock
43}
44
45func (_m *mocknativeMemory) EXPECT() *mocknativeMemory_Expecter {
46	return &mocknativeMemory_Expecter{mock: &_m.Mock}
47}
48
49// alloc provides a mock function for the type mocknativeMemory
50func (_mock *mocknativeMemory) alloc(size uintptr) (unsafe.Pointer, error) {
51	ret := _mock.Called(size)
52
53	if len(ret) == 0 {
54		panic("no return value specified for alloc")
55	}
56
57	var r0 unsafe.Pointer
58	var r1 error
59	if returnFunc, ok := ret.Get(0).(func(uintptr) (unsafe.Pointer, error)); ok {
60		return returnFunc(size)
61	}
62	if returnFunc, ok := ret.Get(0).(func(uintptr) unsafe.Pointer); ok {
63		r0 = returnFunc(size)
64	} else {
65		r0 = ret.Get(0).(unsafe.Pointer)
66	}
67	if returnFunc, ok := ret.Get(1).(func(uintptr) error); ok {
68		r1 = returnFunc(size)
69	} else {
70		r1 = ret.Error(1)
71	}
72	return r0, r1
73}
74
75// mocknativeMemory_alloc_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'alloc'
76type mocknativeMemory_alloc_Call struct {
77	*mock.Call
78}
79
80// alloc is a helper method to define mock.On call
81//   - size uintptr
82func (_e *mocknativeMemory_Expecter) alloc(size any) *mocknativeMemory_alloc_Call {
83	return &mocknativeMemory_alloc_Call{Call: _e.mock.On("alloc", size)}
84}
85
86func (_c *mocknativeMemory_alloc_Call) Run(run func(size uintptr)) *mocknativeMemory_alloc_Call {
87	_c.Call.Run(func(args mock.Arguments) {
88		var arg0 uintptr
89		if args[0] != nil {
90			arg0 = args[0].(uintptr)
91		}
92		run(
93			arg0,
94		)
95	})
96	return _c
97}
98
99func (_c *mocknativeMemory_alloc_Call) Return(v unsafe.Pointer, err error) *mocknativeMemory_alloc_Call {
100	_c.Call.Return(v, err)
101	return _c
102}
103
104func (_c *mocknativeMemory_alloc_Call) RunAndReturn(run func(size uintptr) (unsafe.Pointer, error)) *mocknativeMemory_alloc_Call {
105	_c.Call.Return(run)
106	return _c
107}
108
109// free provides a mock function for the type mocknativeMemory
110func (_mock *mocknativeMemory) free(pointer unsafe.Pointer) {
111	_mock.Called(pointer)
112	return
113}
114
115// mocknativeMemory_free_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'free'
116type mocknativeMemory_free_Call struct {
117	*mock.Call
118}
119
120// free is a helper method to define mock.On call
121//   - pointer unsafe.Pointer
122func (_e *mocknativeMemory_Expecter) free(pointer any) *mocknativeMemory_free_Call {
123	return &mocknativeMemory_free_Call{Call: _e.mock.On("free", pointer)}
124}
125
126func (_c *mocknativeMemory_free_Call) Run(run func(pointer unsafe.Pointer)) *mocknativeMemory_free_Call {
127	_c.Call.Run(func(args mock.Arguments) {
128		var arg0 unsafe.Pointer
129		if args[0] != nil {
130			arg0 = args[0].(unsafe.Pointer)
131		}
132		run(
133			arg0,
134		)
135	})
136	return _c
137}
138
139func (_c *mocknativeMemory_free_Call) Return() *mocknativeMemory_free_Call {
140	_c.Call.Return()
141	return _c
142}
143
144func (_c *mocknativeMemory_free_Call) RunAndReturn(run func(pointer unsafe.Pointer)) *mocknativeMemory_free_Call {
145	_c.Run(run)
146	return _c
147}

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 1

Tags 1

↑↓ moveenter openesc close