From 4ab97ad2500087036bff6d11be4cb254fbb9e2ce Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Thu, 25 Apr 2019 10:51:49 +0900 Subject: [PATCH] graphics: Add TestImageZeroSizedMipmap --- image_test.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/image_test.go b/image_test.go index 745c3dc2f..81f97da8e 100644 --- a/image_test.go +++ b/image_test.go @@ -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) +}