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

Method TestResultSizeLimit

processing/processing_test.go:406–815  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

404}
405
406func (s *ProcessingTestSuite) TestResultSizeLimit() {
407 testCases := []testCase[sizeTestCase]{
408 {
409 opts: sizeTestCase{
410 limit: 1000,
411 width: 100,
412 height: 100,
413 resizingType: processing.ResizeFit,
414 },
415 outSize: testSize{100, 50},
416 },
417 {
418 opts: sizeTestCase{
419 limit: 50,
420 width: 100,
421 height: 100,
422 resizingType: processing.ResizeFit,
423 },
424 outSize: testSize{50, 25},
425 },
426 {
427 opts: sizeTestCase{
428 limit: 50,
429 width: 0,
430 height: 0,
431 resizingType: processing.ResizeFit,
432 },
433 outSize: testSize{50, 25},
434 },
435 {
436 opts: sizeTestCase{
437 limit: 100,
438 width: 0,
439 height: 100,
440 resizingType: processing.ResizeFit,
441 },
442 outSize: testSize{100, 50},
443 },
444 {
445 opts: sizeTestCase{
446 limit: 50,
447 width: 150,
448 height: 0,
449 resizingType: processing.ResizeFit,
450 },
451 outSize: testSize{50, 25},
452 },
453 {
454 opts: sizeTestCase{
455 limit: 100,
456 width: 1000,
457 height: 1000,
458 resizingType: processing.ResizeFit,
459 },
460 outSize: testSize{100, 50},
461 },
462 {
463 opts: sizeTestCase{

Callers

nothing calls this directly

Calls 3

RunMethod · 0.80
processImageAndCheckMethod · 0.80
StringMethod · 0.45

Tested by

no test coverage detected