MCPcopy
hub / github.com/gin-gonic/gin / TestMappingPrivateField

Function TestMappingPrivateField

binding/form_mapping_test.go:121–128  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

119}
120
121func TestMappingPrivateField(t *testing.T) {
122 var s struct {
123 f int `form:"field"`
124 }
125 err := mappingByPtr(&s, formSource{"field": {"6"}}, "form")
126 require.NoError(t, err)
127 assert.Equal(t, 0, s.f)
128}
129
130func TestMappingUnknownFieldType(t *testing.T) {
131 var s struct {

Callers

nothing calls this directly

Calls 1

mappingByPtrFunction · 0.85

Tested by

no test coverage detected