mirror of
https://github.com/gofiber/fiber.git
synced 2025-05-02 05:34:25 +00:00
* 🐛 bug: fix EnableSplittingOnParsers is not functional
* remove wrong testcase
* add support for external xml decoders
* improve test coverage
* fix linter
* update
* add reset methods
* improve test coverage
* merge Form and MultipartForm methods
* fix linter
* split reset and putting steps
* fix linter
29 lines
769 B
Go
29 lines
769 B
Go
package binder
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func Test_GetAndPutToThePool(t *testing.T) {
|
|
t.Parallel()
|
|
|
|
// Panics in case we get from another pool
|
|
require.Panics(t, func() {
|
|
_ = GetFromThePool[*HeaderBinding](&CookieBinderPool)
|
|
})
|
|
|
|
// We get from the pool
|
|
binder := GetFromThePool[*HeaderBinding](&HeaderBinderPool)
|
|
PutToThePool(&HeaderBinderPool, binder)
|
|
|
|
_ = GetFromThePool[*RespHeaderBinding](&RespHeaderBinderPool)
|
|
_ = GetFromThePool[*QueryBinding](&QueryBinderPool)
|
|
_ = GetFromThePool[*FormBinding](&FormBinderPool)
|
|
_ = GetFromThePool[*URIBinding](&URIBinderPool)
|
|
_ = GetFromThePool[*XMLBinding](&XMLBinderPool)
|
|
_ = GetFromThePool[*JSONBinding](&JSONBinderPool)
|
|
_ = GetFromThePool[*CBORBinding](&CBORBinderPool)
|
|
}
|