MCPcopy
hub / github.com/h2non/bimg / TestImageEnlarge

Function TestImageEnlarge

image_test.go:140–152  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

138}
139
140func TestImageEnlarge(t *testing.T) {
141 buf, err := initImage("test.png").Enlarge(500, 375)
142 if err != nil {
143 t.Errorf("Cannot process the image: %#v", err)
144 }
145
146 err = assertSize(buf, 500, 375)
147 if err != nil {
148 t.Error(err)
149 }
150
151 Write("testdata/test_enlarge_out.jpg", buf)
152}
153
154func TestImageEnlargeAndCrop(t *testing.T) {
155 buf, err := initImage("test.png").EnlargeAndCrop(800, 480)

Callers

nothing calls this directly

Calls 4

initImageFunction · 0.85
assertSizeFunction · 0.85
WriteFunction · 0.85
EnlargeMethod · 0.80

Tested by

no test coverage detected