1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-09-30 07:46:41 -04:00

test case for buffer string

This commit is contained in:
v2ray 2016-04-29 23:47:42 +02:00
parent 5390e8efff
commit 0c6a14c27b

View File

@ -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")
}