1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-12-27 04:25:44 -05:00

remove buffer.WriteBytes

This commit is contained in:
Darien Raymond
2018-11-14 22:55:20 +01:00
parent ff7e5a7cdb
commit 6c7dcc35ab
12 changed files with 89 additions and 32 deletions

View File

@@ -17,9 +17,9 @@ func TestBytesReaderWriteTo(t *testing.T) {
pReader, pWriter := pipe.New(pipe.WithSizeLimit(1024))
reader := &BufferedReader{Reader: pReader}
b1 := New()
b1.WriteBytes('a', 'b', 'c')
b1.WriteString("abc")
b2 := New()
b2.WriteBytes('e', 'f', 'g')
b2.WriteString("efg")
assert(pWriter.WriteMultiBuffer(NewMultiBufferValue(b1, b2)), IsNil)
pWriter.Close()
@@ -44,9 +44,9 @@ func TestBytesReaderMultiBuffer(t *testing.T) {
pReader, pWriter := pipe.New(pipe.WithSizeLimit(1024))
reader := &BufferedReader{Reader: pReader}
b1 := New()
b1.WriteBytes('a', 'b', 'c')
b1.WriteString("abc")
b2 := New()
b2.WriteBytes('e', 'f', 'g')
b2.WriteString("efg")
assert(pWriter.WriteMultiBuffer(NewMultiBufferValue(b1, b2)), IsNil)
pWriter.Close()