()
| 208 | } |
| 209 | |
| 210 | func (s *ProcessingTestSuite) TestResizeToFill() { |
| 211 | testCases := []testCase[sizeTestCase]{ |
| 212 | {opts: sizeTestCase{width: 50, height: 50}, outSize: testSize{50, 50}}, |
| 213 | {opts: sizeTestCase{width: 50, height: 20}, outSize: testSize{50, 20}}, |
| 214 | {opts: sizeTestCase{width: 20, height: 50}, outSize: testSize{20, 50}}, |
| 215 | {opts: sizeTestCase{width: 300, height: 300}, outSize: testSize{200, 100}}, |
| 216 | {opts: sizeTestCase{width: 300, height: 50}, outSize: testSize{200, 50}}, |
| 217 | {opts: sizeTestCase{width: 100, height: 300}, outSize: testSize{100, 100}}, |
| 218 | {opts: sizeTestCase{width: 0, height: 50}, outSize: testSize{100, 50}}, |
| 219 | {opts: sizeTestCase{width: 50, height: 0}, outSize: testSize{50, 25}}, |
| 220 | {opts: sizeTestCase{width: 0, height: 200}, outSize: testSize{200, 100}}, |
| 221 | {opts: sizeTestCase{width: 300, height: 0}, outSize: testSize{200, 100}}, |
| 222 | } |
| 223 | |
| 224 | for _, tc := range testCases { |
| 225 | s.Run(tc.opts.ShortName(), func() { |
| 226 | tc.opts.resizingType = processing.ResizeFill |
| 227 | |
| 228 | s.processImageAndCheck(tc) |
| 229 | }) |
| 230 | } |
| 231 | } |
| 232 | |
| 233 | func (s *ProcessingTestSuite) TestResizeToFillEnlarge() { |
| 234 | testCases := []testCase[sizeTestCase]{ |
nothing calls this directly
no test coverage detected