test case for buffer string

pull/131/head
v2ray 2016-04-29 23:47:42 +02:00
parent 5390e8efff
commit 0c6a14c27b
1 changed files with 10 additions and 0 deletions

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