MCPcopy Index your code
hub / github.com/devfeel/mapper / Test_Object_CheckExistsField

Function Test_Object_CheckExistsField

mapper_object_test.go:121–131  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

119}
120
121func Test_Object_CheckExistsField(t *testing.T) {
122 m := NewMapper()
123 m.Register(&testStruct{})
124 fieldName := "Name"
125 _, isOk := m.CheckExistsField(testValue.Elem(), fieldName)
126 if isOk {
127 t.Log("RunResult success:", fieldName)
128 } else {
129 t.Error("RunResult error: fieldName not exists", fieldName)
130 }
131}
132
133func BenchmarkObjectCheckExistsField(b *testing.B) {
134 m := NewMapper()

Callers

nothing calls this directly

Calls 3

NewMapperFunction · 0.85
RegisterMethod · 0.65
CheckExistsFieldMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…