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

Method TestExtendAspectRatio

processing/extend_test.go:292–450  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

290}
291
292func (s *ExtendTestSuite) TestExtendAspectRatio() {
293 targetSize := testSize{300, 600}
294 expectedSize := testSize{200, 400}
295
296 //nolint:dupl
297 testCases := []testCase[extendArTestCase]{
298 {
299 opts: extendArTestCase{
300 gravity: processing.GravityCenter,
301 size: targetSize,
302 },
303 outSize: expectedSize,
304 },
305 {
306 opts: extendArTestCase{
307 gravity: processing.GravityNorth,
308 size: targetSize,
309 },
310 outSize: expectedSize,
311 },
312 {
313 opts: extendArTestCase{
314 gravity: processing.GravitySouth,
315 size: targetSize,
316 },
317 outSize: expectedSize,
318 },
319 {
320 opts: extendArTestCase{
321 gravity: processing.GravityEast,
322 size: targetSize,
323 },
324 outSize: expectedSize,
325 },
326 {
327 opts: extendArTestCase{
328 gravity: processing.GravityWest,
329 size: targetSize,
330 },
331 outSize: expectedSize,
332 },
333 {
334 opts: extendArTestCase{
335 gravity: processing.GravityNorthEast,
336 size: targetSize,
337 },
338 outSize: expectedSize,
339 },
340 {
341 opts: extendArTestCase{
342 gravity: processing.GravitySouthEast,
343 size: targetSize,
344 },
345 outSize: expectedSize,
346 },
347 {
348 opts: extendArTestCase{
349 gravity: processing.GravitySouthWest,

Callers

nothing calls this directly

Calls 3

RunMethod · 0.80
processImageAndCheckMethod · 0.80
StringMethod · 0.45

Tested by

no test coverage detected