ebiten: skip slow tests on 32bit Windows

Updates #2332
Updates #2382
This commit is contained in:
Hajime Hoshi 2022-10-18 01:02:42 +09:00
parent da5f5ea327
commit 6e9e57b3bd

View File

@ -26,6 +26,7 @@ import (
"runtime"
"testing"
"time"
"unsafe"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/examples/resources/images"
@ -50,6 +51,10 @@ func skipTooSlowTests(t *testing.T) bool {
t.Skip("too slow or fragile on Wasm")
return true
}
if runtime.GOOS == "windows" && unsafe.Sizeof(uintptr(0)) == 4 {
t.Skip("out of memory often happens on 32bit Windows (#2332)")
return true
}
return false
}
@ -3649,6 +3654,10 @@ func TestImageBlendOperation(t *testing.T) {
}
func TestImageBlendFactor(t *testing.T) {
if skipTooSlowTests(t) {
return
}
const w, h = 16, 1
dst := ebiten.NewImage(w, h)
src := ebiten.NewImage(w, h)