github.com/viant/toolbox@v0.34.5/writer_at_test.go (about) 1 package toolbox_test 2 3 import ( 4 "github.com/stretchr/testify/assert" 5 "github.com/viant/toolbox" 6 "testing" 7 ) 8 9 func TestWriterAt_WriteAt(t *testing.T) { 10 writer := toolbox.NewByteWriterAt() 11 writer.WriteAt([]byte{0x2}, 1) 12 writer.WriteAt([]byte{0x1}, 0) 13 writer.WriteAt([]byte{0x3}, 2) 14 assert.Equal(t, []byte{0x1, 0x02, 0x3}, writer.Buffer) 15 }