Skip to content

Commit

Permalink
An image test that doesn't fail due to unknwon anti-alias/resize arte…
Browse files Browse the repository at this point in the history
…fact
  • Loading branch information
andydotxyz committed May 12, 2023
1 parent d01ee32 commit d2ad751
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions cmd/fyne/internal/commands/package_test.go
Expand Up @@ -11,7 +11,6 @@ import (
"github.com/stretchr/testify/assert"

"fyne.io/fyne/v2/cmd/fyne/internal/metadata"
"fyne.io/fyne/v2/test"
)

func Test_calculateExeName(t *testing.T) {
Expand Down Expand Up @@ -86,7 +85,16 @@ func Test_processMacOSIcon(t *testing.T) {
}
processed := processMacOSIcon(icon)

test.AssertImageMatches(t, "icon-darwin.png", processed)
assert.Equal(t, 1024, processed.Bounds().Dx())
assert.Equal(t, 1024, processed.Bounds().Dy())
_, _, _, a := processed.At(3, 3).RGBA() // border
assert.Equal(t, uint32(0), a)
_, _, _, a = processed.At(125, 125).RGBA() // inside cut out corner
assert.Equal(t, uint32(0), a)
_, _, _, a = processed.At(900, 900).RGBA()
assert.Equal(t, uint32(0), a)
_, _, _, a = processed.At(1020, 1020).RGBA()
assert.Equal(t, uint32(0), a)
}

func Test_MergeMetata(t *testing.T) {
Expand Down

0 comments on commit d2ad751

Please sign in to comment.