17 lines
254 B
Go
17 lines
254 B
Go
package timeout
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestGetBuffer(t *testing.T) {
|
|
pool := &BufferPool{}
|
|
buf := pool.Get()
|
|
assert.NotEqual(t, nil, buf)
|
|
pool.Put(buf)
|
|
buf2 := pool.Get()
|
|
assert.NotEqual(t, nil, buf2)
|
|
}
|