mirror of
https://github.com/v2ray/v2ray-core.git
synced 2026-11-25 23:22:44 +00:00
rewrite alloc.buffer
This commit is contained in:
51 files changed
+391
-299
No files matched your search
@@ -3,6 +3,7 @@ package io_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"crypto/rand"
|
||||
"v2ray.com/core/common/alloc"
|
||||
. "v2ray.com/core/common/io"
|
||||
"v2ray.com/core/testing/assert"
|
||||
@@ -12,6 +13,8 @@ func TestBufferedReader(t *testing.T) {
|
||||
assert := assert.On(t)
|
||||
|
||||
content := alloc.NewBuffer()
|
||||
content.FillFrom(rand.Reader)
|
||||
|
||||
len := content.Len()
|
||||
|
||||
reader := NewBufferedReader(content)
|
||||
|
||||
Reference in new issue
Block a user