mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
graphics: Add TestImageSize1
This commit is contained in:
parent
e1640f5ae0
commit
a99c632cb7
@ -693,7 +693,19 @@ func TestImageOutsideUpperLeft(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestImage4096(t *testing.T) {
|
||||
func TestImageSize1(t *testing.T) {
|
||||
src, _ := NewImage(1, 1, FilterNearest)
|
||||
dst, _ := NewImage(1, 1, FilterNearest)
|
||||
src.Fill(color.White)
|
||||
dst.DrawImage(src, nil)
|
||||
got := color.RGBAModel.Convert(src.At(0, 0)).(color.RGBA)
|
||||
want := color.RGBAModel.Convert(color.White).(color.RGBA)
|
||||
if !sameColors(got, want, 1) {
|
||||
t.Errorf("got: %#v, want: %#v", got, want)
|
||||
}
|
||||
}
|
||||
|
||||
func TestImageSize4096(t *testing.T) {
|
||||
src, _ := NewImage(4096, 4096, FilterNearest)
|
||||
dst, _ := NewImage(4096, 4096, FilterNearest)
|
||||
pix := make([]byte, 4096*4096*4)
|
||||
|
Loading…
Reference in New Issue
Block a user