()
| 136 | } |
| 137 | |
| 138 | func (s *ProcessingTestSuite) TestResizeToFitEnlarge() { |
| 139 | testCases := []testCase[sizeTestCase]{ |
| 140 | {opts: sizeTestCase{width: 50, height: 50}, outSize: testSize{50, 25}}, |
| 141 | {opts: sizeTestCase{width: 50, height: 20}, outSize: testSize{40, 20}}, |
| 142 | {opts: sizeTestCase{width: 20, height: 50}, outSize: testSize{20, 10}}, |
| 143 | {opts: sizeTestCase{width: 300, height: 300}, outSize: testSize{300, 150}}, |
| 144 | {opts: sizeTestCase{width: 300, height: 125}, outSize: testSize{250, 125}}, |
| 145 | {opts: sizeTestCase{width: 250, height: 300}, outSize: testSize{250, 125}}, |
| 146 | {opts: sizeTestCase{width: 0, height: 50}, outSize: testSize{100, 50}}, |
| 147 | {opts: sizeTestCase{width: 50, height: 0}, outSize: testSize{50, 25}}, |
| 148 | {opts: sizeTestCase{width: 0, height: 200}, outSize: testSize{400, 200}}, |
| 149 | {opts: sizeTestCase{width: 300, height: 0}, outSize: testSize{300, 150}}, |
| 150 | } |
| 151 | |
| 152 | for _, tc := range testCases { |
| 153 | s.Run(tc.opts.ShortName(), func() { |
| 154 | tc.opts.resizingType = processing.ResizeFit |
| 155 | tc.opts.enlarge = true |
| 156 | |
| 157 | s.processImageAndCheck(tc) |
| 158 | }) |
| 159 | } |
| 160 | } |
| 161 | |
| 162 | func (s *ProcessingTestSuite) TestResizeToFitExtend() { |
| 163 | testCases := []testCase[sizeTestCase]{ |
nothing calls this directly
no test coverage detected