Skip to content

Commit

Permalink
Update unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tonimelisma committed May 28, 2021
1 parent c725324 commit 94826ab
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 20 deletions.
20 changes: 0 additions & 20 deletions vips/image_golden_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -637,26 +637,6 @@ func TestImage_QuantTable(t *testing.T) {
nil, ep)
}

func TestImage_animationGIF(t *testing.T) {
ep := &ExportParams{
Format: ImageTypeGIF,
Quality: 75,
}
goldenTest(t, resources+"gif-animated.gif",
func(img *ImageRef) error { return nil },
nil, ep)
}

func TestImage_animationWebP(t *testing.T) {
ep := &ExportParams{
Format: ImageTypeWEBP,
Quality: 75,
}
goldenTest(t, resources+"webp-animated.webp",
func(img *ImageRef) error { return nil },
nil, ep)
}

func goldenTest(t *testing.T, file string, exec func(img *ImageRef) error, validate func(img *ImageRef), params *ExportParams) []byte {
Startup(nil)

Expand Down
1 change: 1 addition & 0 deletions vips/image_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -690,6 +690,7 @@ func TestToBytes(t *testing.T) {
require.NoError(t, err)

buf1, err := image.ToBytes()
assert.NoError(t, err)
assert.Equal(t, 6220800, len(buf1))
}

Expand Down

0 comments on commit 94826ab

Please sign in to comment.