[pool] Replace queue with stack
This commit is contained in:
committed by
Jack Christensen
parent
30b91519a0
commit
89668fae42
@@ -0,0 +1,21 @@
|
||||
package puddle
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestResList_PanicsWithBugReportIfResourceDoesNotExist(t *testing.T) {
|
||||
arr := []*Resource[any]{
|
||||
new(Resource[any]),
|
||||
new(Resource[any]),
|
||||
new(Resource[any]),
|
||||
}
|
||||
|
||||
list := resList[any](arr)
|
||||
|
||||
assert.PanicsWithValue(t, "BUG: removeResource could not find res in slice", func() {
|
||||
list.remove(new(Resource[any]))
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user