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

Method TestResizeToFillDown

processing/processing_test.go:309–330  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

307}
308
309func (s *ProcessingTestSuite) TestResizeToFillDown() {
310 testCases := []testCase[sizeTestCase]{
311 {opts: sizeTestCase{width: 50, height: 50}, outSize: testSize{50, 50}},
312 {opts: sizeTestCase{width: 50, height: 20}, outSize: testSize{50, 20}},
313 {opts: sizeTestCase{width: 20, height: 50}, outSize: testSize{20, 50}},
314 {opts: sizeTestCase{width: 300, height: 300}, outSize: testSize{100, 100}},
315 {opts: sizeTestCase{width: 300, height: 125}, outSize: testSize{200, 83}},
316 {opts: sizeTestCase{width: 250, height: 300}, outSize: testSize{83, 100}},
317 {opts: sizeTestCase{width: 0, height: 50}, outSize: testSize{100, 50}},
318 {opts: sizeTestCase{width: 50, height: 0}, outSize: testSize{50, 25}},
319 {opts: sizeTestCase{width: 0, height: 200}, outSize: testSize{200, 100}},
320 {opts: sizeTestCase{width: 300, height: 0}, outSize: testSize{200, 100}},
321 }
322
323 for _, tc := range testCases {
324 s.Run(tc.opts.ShortName(), func() {
325 tc.opts.resizingType = processing.ResizeFillDown
326
327 s.processImageAndCheck(tc)
328 })
329 }
330}
331
332func (s *ProcessingTestSuite) TestResizeToFillDownEnlarge() {
333 testCases := []testCase[sizeTestCase]{

Callers

nothing calls this directly

Calls 3

RunMethod · 0.80
ShortNameMethod · 0.80
processImageAndCheckMethod · 0.80

Tested by

no test coverage detected