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

Method TestPadding

processing/padding_test.go:47–86  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

45}
46
47func (s *PaddingTestSuite) TestPadding() {
48 testCases := []testCase[paddingTestCase]{
49 {
50 opts: paddingTestCase{
51 dpr: 0.5,
52 paddingLeft: 10,
53 paddingTop: 20,
54 paddingRight: 30,
55 paddingBottom: 40,
56 },
57 outSize: testSize{120, 80},
58 },
59 {
60 opts: paddingTestCase{
61 dpr: 1,
62 paddingLeft: 10,
63 paddingTop: 20,
64 paddingRight: 30,
65 paddingBottom: 40,
66 },
67 outSize: testSize{240, 160},
68 },
69 {
70 opts: paddingTestCase{
71 dpr: 2,
72 paddingLeft: 10,
73 paddingTop: 20,
74 paddingRight: 30,
75 paddingBottom: 40,
76 },
77 outSize: testSize{480, 320},
78 },
79 }
80
81 for _, tc := range testCases {
82 s.Run(tc.opts.String(), func() {
83 s.processImageAndCheck(tc)
84 })
85 }
86}
87
88func TestPadding(t *testing.T) {
89 suite.Run(t, new(PaddingTestSuite))

Callers

nothing calls this directly

Calls 3

RunMethod · 0.80
processImageAndCheckMethod · 0.80
StringMethod · 0.45

Tested by

no test coverage detected