(t *testing.T)
| 166 | } |
| 167 | |
| 168 | func TestImageCrop(t *testing.T) { |
| 169 | buf, err := initImage("test.jpg").Crop(800, 600, GravityNorth) |
| 170 | if err != nil { |
| 171 | t.Errorf("Cannot process the image: %s", err) |
| 172 | } |
| 173 | |
| 174 | err = assertSize(buf, 800, 600) |
| 175 | if err != nil { |
| 176 | t.Error(err) |
| 177 | } |
| 178 | |
| 179 | Write("testdata/test_crop_out.jpg", buf) |
| 180 | } |
| 181 | |
| 182 | func TestImageCropByWidth(t *testing.T) { |
| 183 | buf, err := initImage("test.jpg").CropByWidth(600) |
nothing calls this directly
no test coverage detected