Debian Codegraph @

generate/testdata/golden.image.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 image "image"
13 color "image/color"
14 runtime "runtime"
15 unsafe "unsafe"
16 )
17
18 type MockImage interface {
19 image.Image
20 oglemock.MockObject
21 }
22
23 type mockImage struct {
24 controller oglemock.Controller
25 description string
26 }
27
28 func NewMockImage(
29 c oglemock.Controller,
30 desc string) MockImage {
31 return &mockImage{
32 controller: c,
33 description: desc,
34 }
35 }
36
37 func (m *mockImage) Oglemock_Id() uintptr {
38 return uintptr(unsafe.Pointer(m))
39 }
40
41 func (m *mockImage) Oglemock_Description() string {
42 return m.description
43 }
44
45 func (m *mockImage) At(p0 int, p1 int) (o0 color.Color) {
46 // Get a file name and line number for the caller.
47 _, file, line, _ := runtime.Caller(1)
48
49 // Hand the call off to the controller, which does most of the work.
50 retVals := m.controller.HandleMethodCall(
51 m,
52 "At",
53 file,
54 line,
55 []interface{}{p0, p1})
56
57 if len(retVals) != 1 {
58 panic(fmt.Sprintf("mockImage.At: invalid return values: %v", retVals))
59 }
60
61 // o0 color.Color
62 if retVals[0] != nil {
63 o0 = retVals[0].(color.Color)
64 }
65
66 return
67 }
68
69 func (m *mockImage) Bounds() (o0 image.Rectangle) {
70 // Get a file name and line number for the caller.
71 _, file, line, _ := runtime.Caller(1)
72
73 // Hand the call off to the controller, which does most of the work.
74 retVals := m.controller.HandleMethodCall(
75 m,
76 "Bounds",
77 file,
78 line,
79 []interface{}{})
80
81 if len(retVals) != 1 {
82 panic(fmt.Sprintf("mockImage.Bounds: invalid return values: %v", retVals))
83 }
84
85 // o0 image.Rectangle
86 if retVals[0] != nil {
87 o0 = retVals[0].(image.Rectangle)
88 }
89
90 return
91 }
92
93 func (m *mockImage) ColorModel() (o0 color.Model) {
94 // Get a file name and line number for the caller.
95 _, file, line, _ := runtime.Caller(1)
96
97 // Hand the call off to the controller, which does most of the work.
98 retVals := m.controller.HandleMethodCall(
99 m,
100 "ColorModel",
101 file,
102 line,
103 []interface{}{})
104
105 if len(retVals) != 1 {
106 panic(fmt.Sprintf("mockImage.ColorModel: invalid return values: %v", retVals))
107 }
108
109 // o0 color.Model
110 if retVals[0] != nil {
111 o0 = retVals[0].(color.Model)
112 }
113
114 return
115 }
116
117 type MockPalettedImage interface {
118 image.PalettedImage
119 oglemock.MockObject
120 }
121
122 type mockPalettedImage struct {
123 controller oglemock.Controller
124 description string
125 }
126
127 func NewMockPalettedImage(
128 c oglemock.Controller,
129 desc string) MockPalettedImage {
130 return &mockPalettedImage{
131 controller: c,
132 description: desc,
133 }
134 }
135
136 func (m *mockPalettedImage) Oglemock_Id() uintptr {
137 return uintptr(unsafe.Pointer(m))
138 }
139
140 func (m *mockPalettedImage) Oglemock_Description() string {
141 return m.description
142 }
143
144 func (m *mockPalettedImage) At(p0 int, p1 int) (o0 color.Color) {
145 // Get a file name and line number for the caller.
146 _, file, line, _ := runtime.Caller(1)
147
148 // Hand the call off to the controller, which does most of the work.
149 retVals := m.controller.HandleMethodCall(
150 m,
151 "At",
152 file,
153 line,
154 []interface{}{p0, p1})
155
156 if len(retVals) != 1 {
157 panic(fmt.Sprintf("mockPalettedImage.At: invalid return values: %v", retVals))
158 }
159
160 // o0 color.Color
161 if retVals[0] != nil {
162 o0 = retVals[0].(color.Color)
163 }
164
165 return
166 }
167
168 func (m *mockPalettedImage) Bounds() (o0 image.Rectangle) {
169 // Get a file name and line number for the caller.
170 _, file, line, _ := runtime.Caller(1)
171
172 // Hand the call off to the controller, which does most of the work.
173 retVals := m.controller.HandleMethodCall(
174 m,
175 "Bounds",
176 file,
177 line,
178 []interface{}{})
179
180 if len(retVals) != 1 {
181 panic(fmt.Sprintf("mockPalettedImage.Bounds: invalid return values: %v", retVals))
182 }
183
184 // o0 image.Rectangle
185 if retVals[0] != nil {
186 o0 = retVals[0].(image.Rectangle)
187 }
188
189 return
190 }
191
192 func (m *mockPalettedImage) ColorIndexAt(p0 int, p1 int) (o0 uint8) {
193 // Get a file name and line number for the caller.
194 _, file, line, _ := runtime.Caller(1)
195
196 // Hand the call off to the controller, which does most of the work.
197 retVals := m.controller.HandleMethodCall(
198 m,
199 "ColorIndexAt",
200 file,
201 line,
202 []interface{}{p0, p1})
203
204 if len(retVals) != 1 {
205 panic(fmt.Sprintf("mockPalettedImage.ColorIndexAt: invalid return values: %v", retVals))
206 }
207
208 // o0 uint8
209 if retVals[0] != nil {
210 o0 = retVals[0].(uint8)
211 }
212
213 return
214 }
215
216 func (m *mockPalettedImage) ColorModel() (o0 color.Model) {
217 // Get a file name and line number for the caller.
218 _, file, line, _ := runtime.Caller(1)
219
220 // Hand the call off to the controller, which does most of the work.
221 retVals := m.controller.HandleMethodCall(
222 m,
223 "ColorModel",
224 file,
225 line,
226 []interface{}{})
227
228 if len(retVals) != 1 {
229 panic(fmt.Sprintf("mockPalettedImage.ColorModel: invalid return values: %v", retVals))
230 }
231
232 // o0 color.Model
233 if retVals[0] != nil {
234 o0 = retVals[0].(color.Model)
235 }
236
237 return
238 }