Skip to content

Commit

Permalink
internal/atlas: bug fix: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hajimehoshi committed Jan 29, 2024
1 parent 9a8dde6 commit f37ebe5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions internal/atlas/image_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f37ebe5

Please sign in to comment.