mirror of
https://github.com/v2fly/v2ray-core.git
synced 2026-07-13 12:40:12 -04:00
test case for buffer string
This commit is contained in:
@@ -48,3 +48,13 @@ func TestBufferPrepend(t *testing.T) {
|
||||
buffer.Prepend([]byte{'u', 'v', 'w'})
|
||||
assert.Bytes(buffer.Value).Equals([]byte("uvwxyzabc"))
|
||||
}
|
||||
|
||||
func TestBufferString(t *testing.T) {
|
||||
v2testing.Current(t)
|
||||
|
||||
buffer := NewBuffer().Clear()
|
||||
defer buffer.Release()
|
||||
|
||||
buffer.AppendString("Test String")
|
||||
assert.String(buffer).Equals("Test String")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user