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

Function TestImageExtractZero

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

Source from the content-addressed store, hash-verified

124}
125
126func TestImageExtractZero(t *testing.T) {
127 buf, err := initImage("test.jpg").Extract(0, 0, 300, 200)
128 if err != nil {
129 t.Errorf("Cannot process the image: %s", err)
130 }
131
132 err = assertSize(buf, 300, 200)
133 if err != nil {
134 t.Error(err)
135 }
136
137 Write("testdata/test_extract_zero_out.jpg", buf)
138}
139
140func TestImageEnlarge(t *testing.T) {
141 buf, err := initImage("test.png").Enlarge(500, 375)

Callers

nothing calls this directly

Calls 4

initImageFunction · 0.85
assertSizeFunction · 0.85
WriteFunction · 0.85
ExtractMethod · 0.80

Tested by

no test coverage detected