Skip to content

Commit

Permalink
frame.Copy test pass
Browse files Browse the repository at this point in the history
  • Loading branch information
oldma3095 committed Jan 7, 2025
1 parent 0d6736f commit 882509f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions frame_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,15 @@ func TestFrame(t *testing.T) {
require.NotNil(t, f7)
defer f7.Free()
align = 1
f7.SetHeight(f1.Height())
f7.SetPixelFormat(f1.PixelFormat())
f7.SetWidth(f1.Width())
f7.SetHeight(f6.Height())
f7.SetPixelFormat(f6.PixelFormat())
f7.SetWidth(f6.Width())
require.NoError(t, f7.AllocBuffer(align))
require.NoError(t, f7.AllocImage(align))
require.NoError(t, f1.Copy(f7))
f1b, err := f1.Data().Bytes(align)
require.NoError(t, f6.Copy(f7))
f6b, err := f6.Data().Bytes(align)
require.NoError(t, err)
f7b, err := f7.Data().Bytes(align)
require.NoError(t, err)
require.Equal(t, f1b, f7b)
require.Equal(t, f6b, f7b)
}

0 comments on commit 882509f

Please sign in to comment.