graphics: Add TestImageZeroSizedMipmap

This commit is contained in:
Hajime Hoshi 2019-04-25 10:51:49 +09:00
parent 6022d8856e
commit 4ab97ad250

View File

@ -1670,3 +1670,13 @@ func TestImageTooSmallMipmap(t *testing.T) {
t.Errorf("got: %v, want: %v", got, want)
}
}
func TestImageZeroSizedMipmap(t *testing.T) {
const w, h = 16, 16
src, _ := NewImage(w, h, FilterDefault)
dst, _ := NewImage(w, h, FilterDefault)
op := &DrawImageOptions{}
op.Filter = FilterLinear
dst.DrawImage(src.SubImage(image.ZR).(*Image), op)
}