MCPcopy Create free account
hub / github.com/imgproxy/imgproxy / TestResizeFill

Method TestResizeFill

processing/crop_test.go:145–350  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

143}
144
145func (s *CropTestSuite) TestResizeFill() {
146 widerSize := testSize{100, 26}
147 tallerSize := testSize{26, 100}
148
149 testCases := []testCase[resizeFillGravityTestCase]{
150 // When target has less vertical space
151 {
152 opts: resizeFillGravityTestCase{
153 gravity: processing.GravityCenter,
154 size: widerSize,
155 },
156 outSize: widerSize,
157 },
158 {
159 opts: resizeFillGravityTestCase{
160 gravity: processing.GravityNorth,
161 size: widerSize,
162 },
163 outSize: widerSize,
164 },
165 {
166 opts: resizeFillGravityTestCase{
167 gravity: processing.GravitySouth,
168 size: widerSize,
169 },
170 outSize: widerSize,
171 },
172 {
173 opts: resizeFillGravityTestCase{
174 gravity: processing.GravityNorthEast,
175 size: widerSize,
176 },
177 outSize: widerSize,
178 },
179 {
180 opts: resizeFillGravityTestCase{
181 gravity: processing.GravitySouthEast,
182 size: widerSize,
183 },
184 outSize: widerSize,
185 },
186 {
187 opts: resizeFillGravityTestCase{
188 gravity: processing.GravitySouthWest,
189 size: widerSize,
190 },
191 outSize: widerSize,
192 },
193 {
194 opts: resizeFillGravityTestCase{
195 gravity: processing.GravityNorthWest,
196 size: widerSize,
197 },
198 outSize: widerSize,
199 },
200
201 // When target has less horizontal space
202 {

Callers

nothing calls this directly

Calls 3

RunMethod · 0.80
processImageAndCheckMethod · 0.80
StringMethod · 0.45

Tested by

no test coverage detected