mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 11:18:54 +01:00
graphics: Fix tests
This commit is contained in:
parent
1b1b996817
commit
0ab46b1780
@ -151,7 +151,6 @@ func TestColorMConcatSelf(t *testing.T) {
|
||||
m := ColorM{}
|
||||
for i := 0; i < 4; i++ {
|
||||
for j := 0; j < 5; j++ {
|
||||
println(i, j, float64((i+j)%5+1))
|
||||
m.SetElement(i, j, float64((i+j)%5+1))
|
||||
}
|
||||
}
|
||||
|
@ -230,12 +230,12 @@ func TestImageScale(t *testing.T) {
|
||||
return
|
||||
}
|
||||
|
||||
for j := 0; j < h*2; j++ {
|
||||
for i := 0; i < w*2; i++ {
|
||||
for j := 0; j < h*scale; j++ {
|
||||
for i := 0; i < w*scale; i++ {
|
||||
c0 := img0.At(i/scale, j/scale).(color.RGBA)
|
||||
c1 := img1.At(i, j).(color.RGBA)
|
||||
if c0 != c1 {
|
||||
t.Errorf("img0.At(%[1]d, %[2]d) should equal to img1.At(%[3]d, %[4]d) (with scale %[5]d) but not: %[6]v vs %[7]v", i/2, j/2, i, j, scale, c0, c1)
|
||||
t.Fatalf("img0.At(%[1]d, %[2]d) should equal to img1.At(%[3]d, %[4]d) (with scale %[5]d) but not: %[6]v vs %[7]v", i/2, j/2, i, j, scale, c0, c1)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user