Skip to content

Commit

Permalink
graphics: Add TestImageZeroSizedMipmap
Browse files Browse the repository at this point in the history
  • Loading branch information
hajimehoshi committed Apr 25, 2019
1 parent 31c8bd8 commit bd2e9a2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions image_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

0 comments on commit bd2e9a2

Please # to comment.