mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 03:38:55 +01:00
restorable: Fix tests (wrong assumption was used)
This commit is contained in:
parent
7b5ad46e49
commit
70f16daafd
@ -80,12 +80,8 @@ func fill(img *Image, r, g, b, a uint8) {
|
|||||||
|
|
||||||
func TestRestore(t *testing.T) {
|
func TestRestore(t *testing.T) {
|
||||||
img0 := NewImage(1, 1, false)
|
img0 := NewImage(1, 1, false)
|
||||||
// Clear images explicitly.
|
defer img0.Dispose()
|
||||||
// In this 'restorable' layer, reused texture might not be cleared.
|
|
||||||
fill(img0, 0, 0, 0, 0)
|
|
||||||
defer func() {
|
|
||||||
img0.Dispose()
|
|
||||||
}()
|
|
||||||
clr0 := color.RGBA{0x00, 0x00, 0x00, 0xff}
|
clr0 := color.RGBA{0x00, 0x00, 0x00, 0xff}
|
||||||
fill(img0, clr0.R, clr0.G, clr0.B, clr0.A)
|
fill(img0, clr0.R, clr0.G, clr0.B, clr0.A)
|
||||||
if err := ResolveStaleImages(); err != nil {
|
if err := ResolveStaleImages(); err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user