Debian Codegraph @

generate/testdata/golden.complicated_pkg.go

raw symbols SCIP
1 // This file was auto-generated using createmock. See the following page for
2 // more information:
3 //
4 // https://github.com/jacobsa/oglemock
5 //
6
7 package pkg
8
9 import (
10 fmt "fmt"
11 oglemock "github.com/jacobsa/oglemock"
12 complicated_pkg "github.com/jacobsa/oglemock/generate/testdata/complicated_pkg"
13 tony "github.com/jacobsa/oglemock/generate/testdata/renamed_pkg"
14 image "image"
15 io "io"
16 net "net"
17 runtime "runtime"
18 unsafe "unsafe"
19 )
20
21 type MockComplicatedThing interface {
22 complicated_pkg.ComplicatedThing
23 oglemock.MockObject
24 }
25
26 type mockComplicatedThing struct {
27 controller oglemock.Controller
28 description string
29 }
30
31 func NewMockComplicatedThing(
32 c oglemock.Controller,
33 desc string) MockComplicatedThing {
34 return &mockComplicatedThing{
35 controller: c,
36 description: desc,
37 }
38 }
39
40 func (m *mockComplicatedThing) Oglemock_Id() uintptr {
41 return uintptr(unsafe.Pointer(m))
42 }
43
44 func (m *mockComplicatedThing) Oglemock_Description() string {
45 return m.description
46 }
47
48 func (m *mockComplicatedThing) Arrays(p0 [3]string) (o0 [3]int, o1 error) {
49 // Get a file name and line number for the caller.
50 _, file, line, _ := runtime.Caller(1)
51
52 // Hand the call off to the controller, which does most of the work.
53 retVals := m.controller.HandleMethodCall(
54 m,
55 "Arrays",
56 file,
57 line,
58 []interface{}{p0})
59
60 if len(retVals) != 2 {
61 panic(fmt.Sprintf("mockComplicatedThing.Arrays: invalid return values: %v", retVals))
62 }
63
64 // o0 [3]int
65 if retVals[0] != nil {
66 o0 = retVals[0].([3]int)
67 }
68
69 // o1 error
70 if retVals[1] != nil {
71 o1 = retVals[1].(error)
72 }
73
74 return
75 }
76
77 func (m *mockComplicatedThing) Channels(p0 chan chan<- <-chan net.Conn) (o0 chan int) {
78 // Get a file name and line number for the caller.
79 _, file, line, _ := runtime.Caller(1)
80
81 // Hand the call off to the controller, which does most of the work.
82 retVals := m.controller.HandleMethodCall(
83 m,
84 "Channels",
85 file,
86 line,
87 []interface{}{p0})
88
89 if len(retVals) != 1 {
90 panic(fmt.Sprintf("mockComplicatedThing.Channels: invalid return values: %v", retVals))
91 }
92
93 // o0 chan int
94 if retVals[0] != nil {
95 o0 = retVals[0].(chan int)
96 }
97
98 return
99 }
100
101 func (m *mockComplicatedThing) EmptyInterface(p0 interface{}) (o0 interface{}, o1 error) {
102 // Get a file name and line number for the caller.
103 _, file, line, _ := runtime.Caller(1)
104
105 // Hand the call off to the controller, which does most of the work.
106 retVals := m.controller.HandleMethodCall(
107 m,
108 "EmptyInterface",
109 file,
110 line,
111 []interface{}{p0})
112
113 if len(retVals) != 2 {
114 panic(fmt.Sprintf("mockComplicatedThing.EmptyInterface: invalid return values: %v", retVals))
115 }
116
117 // o0 interface { }
118 if retVals[0] != nil {
119 o0 = retVals[0].(interface{})
120 }
121
122 // o1 error
123 if retVals[1] != nil {
124 o1 = retVals[1].(error)
125 }
126
127 return
128 }
129
130 func (m *mockComplicatedThing) Functions(p0 func(int, image.Image) int) (o0 func(string, int) net.Conn) {
131 // Get a file name and line number for the caller.
132 _, file, line, _ := runtime.Caller(1)
133
134 // Hand the call off to the controller, which does most of the work.
135 retVals := m.controller.HandleMethodCall(
136 m,
137 "Functions",
138 file,
139 line,
140 []interface{}{p0})
141
142 if len(retVals) != 1 {
143 panic(fmt.Sprintf("mockComplicatedThing.Functions: invalid return values: %v", retVals))
144 }
145
146 // o0 func(string, int) (net.Conn)
147 if retVals[0] != nil {
148 o0 = retVals[0].(func(string, int) net.Conn)
149 }
150
151 return
152 }
153
154 func (m *mockComplicatedThing) Maps(p0 map[string]*int) (o0 map[int]*string, o1 error) {
155 // Get a file name and line number for the caller.
156 _, file, line, _ := runtime.Caller(1)
157
158 // Hand the call off to the controller, which does most of the work.
159 retVals := m.controller.HandleMethodCall(
160 m,
161 "Maps",
162 file,
163 line,
164 []interface{}{p0})
165
166 if len(retVals) != 2 {
167 panic(fmt.Sprintf("mockComplicatedThing.Maps: invalid return values: %v", retVals))
168 }
169
170 // o0 map[int]*string
171 if retVals[0] != nil {
172 o0 = retVals[0].(map[int]*string)
173 }
174
175 // o1 error
176 if retVals[1] != nil {
177 o1 = retVals[1].(error)
178 }
179
180 return
181 }
182
183 func (m *mockComplicatedThing) NamedScalarType(p0 complicated_pkg.Byte) (o0 []complicated_pkg.Byte, o1 error) {
184 // Get a file name and line number for the caller.
185 _, file, line, _ := runtime.Caller(1)
186
187 // Hand the call off to the controller, which does most of the work.
188 retVals := m.controller.HandleMethodCall(
189 m,
190 "NamedScalarType",
191 file,
192 line,
193 []interface{}{p0})
194
195 if len(retVals) != 2 {
196 panic(fmt.Sprintf("mockComplicatedThing.NamedScalarType: invalid return values: %v", retVals))
197 }
198
199 // o0 []complicated_pkg.Byte
200 if retVals[0] != nil {
201 o0 = retVals[0].([]complicated_pkg.Byte)
202 }
203
204 // o1 error
205 if retVals[1] != nil {
206 o1 = retVals[1].(error)
207 }
208
209 return
210 }
211
212 func (m *mockComplicatedThing) Pointers(p0 *int, p1 *net.Conn, p2 **io.Reader) (o0 *int, o1 error) {
213 // Get a file name and line number for the caller.
214 _, file, line, _ := runtime.Caller(1)
215
216 // Hand the call off to the controller, which does most of the work.
217 retVals := m.controller.HandleMethodCall(
218 m,
219 "Pointers",
220 file,
221 line,
222 []interface{}{p0, p1, p2})
223
224 if len(retVals) != 2 {
225 panic(fmt.Sprintf("mockComplicatedThing.Pointers: invalid return values: %v", retVals))
226 }
227
228 // o0 *int
229 if retVals[0] != nil {
230 o0 = retVals[0].(*int)
231 }
232
233 // o1 error
234 if retVals[1] != nil {
235 o1 = retVals[1].(error)
236 }
237
238 return
239 }
240
241 func (m *mockComplicatedThing) RenamedPackage(p0 tony.SomeUint8Alias) {
242 // Get a file name and line number for the caller.
243 _, file, line, _ := runtime.Caller(1)
244
245 // Hand the call off to the controller, which does most of the work.
246 retVals := m.controller.HandleMethodCall(
247 m,
248 "RenamedPackage",
249 file,
250 line,
251 []interface{}{p0})
252
253 if len(retVals) != 0 {
254 panic(fmt.Sprintf("mockComplicatedThing.RenamedPackage: invalid return values: %v", retVals))
255 }
256
257 return
258 }
259
260 func (m *mockComplicatedThing) Slices(p0 []string) (o0 []int, o1 error) {
261 // Get a file name and line number for the caller.
262 _, file, line, _ := runtime.Caller(1)
263
264 // Hand the call off to the controller, which does most of the work.
265 retVals := m.controller.HandleMethodCall(
266 m,
267 "Slices",
268 file,
269 line,
270 []interface{}{p0})
271
272 if len(retVals) != 2 {
273 panic(fmt.Sprintf("mockComplicatedThing.Slices: invalid return values: %v", retVals))
274 }
275
276 // o0 []int
277 if retVals[0] != nil {
278 o0 = retVals[0].([]int)
279 }
280
281 // o1 error
282 if retVals[1] != nil {
283 o1 = retVals[1].(error)
284 }
285
286 return
287 }
288
289 func (m *mockComplicatedThing) Variadic(p0 int, p1 ...net.Conn) (o0 int) {
290 // Get a file name and line number for the caller.
291 _, file, line, _ := runtime.Caller(1)
292
293 // Hand the call off to the controller, which does most of the work.
294 retVals := m.controller.HandleMethodCall(
295 m,
296 "Variadic",
297 file,
298 line,
299 []interface{}{p0, p1})
300
301 if len(retVals) != 1 {
302 panic(fmt.Sprintf("mockComplicatedThing.Variadic: invalid return values: %v", retVals))
303 }
304
305 // o0 int
306 if retVals[0] != nil {
307 o0 = retVals[0].(int)
308 }
309
310 return
311 }