()
| 45 | } |
| 46 | |
| 47 | func (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 | |
| 88 | func TestPadding(t *testing.T) { |
| 89 | suite.Run(t, new(PaddingTestSuite)) |
nothing calls this directly
no test coverage detected