2019-04-22 02:59:20 +00:00

22 lines
322 B
Go

package bytes
import (
"testing"
)
func TestBuffer(t *testing.T) {
p := NewPool(2, 10)
b := p.Get()
if b.Bytes() == nil || len(b.Bytes()) == 0 {
t.FailNow()
}
b = p.Get()
if b.Bytes() == nil || len(b.Bytes()) == 0 {
t.FailNow()
}
b = p.Get()
if b.Bytes() == nil || len(b.Bytes()) == 0 {
t.FailNow()
}
}