You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
322 B
21 lines
322 B
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() |
|
} |
|
}
|
|
|