mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 03:38:55 +01:00
graphics: Bug fix: wrong for loops in TestImageMipmap*
This commit is contained in:
parent
db1030a6d4
commit
d25d184ed7
@ -56,6 +56,7 @@ func update(screen *ebiten.Image) error {
|
|||||||
|
|
||||||
// Move the image to the screen's center.
|
// Move the image to the screen's center.
|
||||||
op.GeoM.Translate(screenWidth/2, screenHeight/2)
|
op.GeoM.Translate(screenWidth/2, screenHeight/2)
|
||||||
|
|
||||||
screen.DrawImage(gophersImage, op)
|
screen.DrawImage(gophersImage, op)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -1037,7 +1037,7 @@ func TestImageMipmap(t *testing.T) {
|
|||||||
wantDst.DrawImage(l2, op)
|
wantDst.DrawImage(l2, op)
|
||||||
|
|
||||||
for j := 0; j < h; j++ {
|
for j := 0; j < h; j++ {
|
||||||
for i := 0; i < h; i++ {
|
for i := 0; i < w; i++ {
|
||||||
got := gotDst.At(i, j).(color.RGBA)
|
got := gotDst.At(i, j).(color.RGBA)
|
||||||
want := wantDst.At(i, j).(color.RGBA)
|
want := wantDst.At(i, j).(color.RGBA)
|
||||||
if !sameColors(got, want, 1) {
|
if !sameColors(got, want, 1) {
|
||||||
@ -1084,7 +1084,7 @@ func TestImageMipmapNegativeDet(t *testing.T) {
|
|||||||
|
|
||||||
allZero := true
|
allZero := true
|
||||||
for j := 0; j < h; j++ {
|
for j := 0; j < h; j++ {
|
||||||
for i := 0; i < h; i++ {
|
for i := 0; i < w; i++ {
|
||||||
got := gotDst.At(i, j).(color.RGBA)
|
got := gotDst.At(i, j).(color.RGBA)
|
||||||
want := wantDst.At(i, j).(color.RGBA)
|
want := wantDst.At(i, j).(color.RGBA)
|
||||||
if !sameColors(got, want, 1) {
|
if !sameColors(got, want, 1) {
|
||||||
|
Loading…
Reference in New Issue
Block a user