Skip to content

Commit

Permalink
Fixes go vet
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbyttow committed Jan 29, 2018
1 parent 11f2c10 commit c8b69d4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
28 changes: 14 additions & 14 deletions leak_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,23 +74,23 @@ func TestCleanup(t *testing.T) {

LeakTest(func() {
var wg sync.WaitGroup
for i, transform := range transforms {
for i, tr := range transforms {
wg.Add(1)
go func(i int) {
go func(i int, tr transform) {
defer wg.Done()

buf, err := vips.NewTransform().
LoadFile("fixtures/canyon.jpg").
ResizeStrategy(transform.Resize).
Resize(transform.Width, transform.Height).
Flip(transform.Flip).
Kernel(transform.Kernel).
Format(transform.Format).
GaussBlur(transform.Blur).
Interpolator(transform.Interp).
Zoom(transform.Zoom, transform.Zoom).
Quality(transform.Quality).
Compression(transform.Compression).
ResizeStrategy(tr.Resize).
Resize(tr.Width, tr.Height).
Flip(tr.Flip).
Kernel(tr.Kernel).
Format(tr.Format).
GaussBlur(tr.Blur).
Interpolator(tr.Interp).
Zoom(tr.Zoom, tr.Zoom).
Quality(tr.Quality).
Compression(tr.Compression).
OutputBytes().
Apply()
require.NoError(t, err)
Expand All @@ -99,8 +99,8 @@ func TestCleanup(t *testing.T) {
require.NoError(t, err)
defer image.Close()

assert.Equal(t, transform.Format, image.Format())
}(i)
assert.Equal(t, tr.Format, image.Format())
}(i, tr)
}
wg.Wait()
})
Expand Down
2 changes: 1 addition & 1 deletion regression_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func TestEmbed(t *testing.T) {

func TestFlatten(t *testing.T) {
goldenTest(t, "fixtures/shapes.png", func(tx *vips.Transform) {
tx.BackgroundColor(vips.Color{255, 192, 203})
tx.BackgroundColor(vips.Color{R: 255, G: 192, B: 203})
})
}

Expand Down

0 comments on commit c8b69d4

Please sign in to comment.