github.com/jackc/puddle@v1.3.0/internal_test.go (about) 1 package puddle 2 3 import ( 4 "testing" 5 6 "github.com/stretchr/testify/assert" 7 ) 8 9 func TestRemoveResourcePanicsWithBugReportIfResourceDoesNotExist(t *testing.T) { 10 s := []*Resource{new(Resource), new(Resource), new(Resource)} 11 assert.PanicsWithValue(t, "BUG: removeResource could not find res in slice", func() { removeResource(s, new(Resource)) }) 12 }