Create & Init Project...
This commit is contained in:
21
app/service/main/broadcast/libs/bytes/buffer_test.go
Normal file
21
app/service/main/broadcast/libs/bytes/buffer_test.go
Normal file
@ -0,0 +1,21 @@
|
||||
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()
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user