MCPcopy
hub / github.com/labstack/echo / TestBindUnmarshalParamAnonymousFieldPtrNil

Function TestBindUnmarshalParamAnonymousFieldPtrNil

bind_test.go:386–398  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

384}
385
386func TestBindUnmarshalParamAnonymousFieldPtrNil(t *testing.T) {
387 e := New()
388 req := httptest.NewRequest(http.MethodGet, "/?baz=1", nil)
389 rec := httptest.NewRecorder()
390 c := e.NewContext(req, rec)
391 result := struct {
392 *Bar
393 }{}
394 err := c.Bind(&result)
395 if assert.NoError(t, err) {
396 assert.Nil(t, result.Bar)
397 }
398}
399
400func TestBindUnmarshalParamAnonymousFieldPtrCustomTag(t *testing.T) {
401 e := New()

Callers

nothing calls this directly

Calls 3

BindMethod · 0.95
NewFunction · 0.85
NewContextMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…