()
| 307 | } |
| 308 | |
| 309 | func (s *ProcessingTestSuite) TestResizeToFillDown() { |
| 310 | testCases := []testCase[sizeTestCase]{ |
| 311 | {opts: sizeTestCase{width: 50, height: 50}, outSize: testSize{50, 50}}, |
| 312 | {opts: sizeTestCase{width: 50, height: 20}, outSize: testSize{50, 20}}, |
| 313 | {opts: sizeTestCase{width: 20, height: 50}, outSize: testSize{20, 50}}, |
| 314 | {opts: sizeTestCase{width: 300, height: 300}, outSize: testSize{100, 100}}, |
| 315 | {opts: sizeTestCase{width: 300, height: 125}, outSize: testSize{200, 83}}, |
| 316 | {opts: sizeTestCase{width: 250, height: 300}, outSize: testSize{83, 100}}, |
| 317 | {opts: sizeTestCase{width: 0, height: 50}, outSize: testSize{100, 50}}, |
| 318 | {opts: sizeTestCase{width: 50, height: 0}, outSize: testSize{50, 25}}, |
| 319 | {opts: sizeTestCase{width: 0, height: 200}, outSize: testSize{200, 100}}, |
| 320 | {opts: sizeTestCase{width: 300, height: 0}, outSize: testSize{200, 100}}, |
| 321 | } |
| 322 | |
| 323 | for _, tc := range testCases { |
| 324 | s.Run(tc.opts.ShortName(), func() { |
| 325 | tc.opts.resizingType = processing.ResizeFillDown |
| 326 | |
| 327 | s.processImageAndCheck(tc) |
| 328 | }) |
| 329 | } |
| 330 | } |
| 331 | |
| 332 | func (s *ProcessingTestSuite) TestResizeToFillDownEnlarge() { |
| 333 | testCases := []testCase[sizeTestCase]{ |
nothing calls this directly
no test coverage detected