From f37ebe549bdc1ed6f75f91a1fc31b9aae534b9d2 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Mon, 29 Jan 2024 20:51:56 +0900 Subject: [PATCH] internal/atlas: bug fix: fix tests Updates #2897 --- internal/atlas/image_test.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/internal/atlas/image_test.go b/internal/atlas/image_test.go index ef38db386..96f7257a7 100644 --- a/internal/atlas/image_test.go +++ b/internal/atlas/image_test.go @@ -811,12 +811,11 @@ func TestIteratingImagesToPutOnSourceBackend(t *testing.T) { } func TestGC(t *testing.T) { - c0 := atlas.DeferredFuncCountForTesting() img := atlas.NewImage(16, 16, atlas.ImageTypeRegular) img.WritePixels(make([]byte, 4*16*16), image.Rect(0, 0, 16, 16)) - _ = img + runtime.KeepAlive(img) + c0 := atlas.DeferredFuncCountForTesting() runtime.GC() - c1 := atlas.DeferredFuncCountForTesting() if got, want := c1, c0+1; got != want { t.Errorf("got: %d, want: %d", got, want)