()
| 492 | } |
| 493 | |
| 494 | func (s *CropTestSuite) TestCropGravityPriority() { |
| 495 | cropSize := testSize{50, 50} |
| 496 | |
| 497 | r1 := s.processImage(cropTestCase{ |
| 498 | gravity: processing.GravityNorth, cropSize: cropSize, |
| 499 | }) |
| 500 | defer r1.Close() |
| 501 | |
| 502 | r2 := s.processImage(cropTestCase{ |
| 503 | cropGravity: processing.GravityNorth, cropSize: cropSize, |
| 504 | }) |
| 505 | defer r2.Close() |
| 506 | |
| 507 | r3 := s.processImage(cropTestCase{ |
| 508 | gravity: processing.GravitySouth, cropGravity: processing.GravityNorth, cropSize: cropSize, |
| 509 | }) |
| 510 | defer r3.Close() |
| 511 | |
| 512 | s.Require().True(testutil.ReadersEqual(s.T(), r1.Reader(), r2.Reader())) |
| 513 | s.Require().True(testutil.ReadersEqual(s.T(), r1.Reader(), r3.Reader())) |
| 514 | } |
| 515 | |
| 516 | func TestCrop(t *testing.T) { |
| 517 | suite.Run(t, new(CropTestSuite)) |
nothing calls this directly
no test coverage detected