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

Function Test_Object_IsTimeField

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

Source from the content-addressed store, hash-verified

362}
363
364func Test_Object_IsTimeField(t *testing.T) {
365 m := NewMapper()
366 t1 := time.Now()
367 if m.GetDefaultTimeWrapper().IsType(reflect.ValueOf(t1)) {
368 t.Log("check time.Now ok")
369 } else {
370 t.Error("check time.Now error")
371 }
372
373 var t2 JSONTime
374 t2 = JSONTime(time.Now())
375 if m.GetDefaultTimeWrapper().IsType(reflect.ValueOf(t2)) {
376 t.Log("check mapper.Time ok")
377 } else {
378 t.Error("check mapper.Time error")
379 }
380}
381
382func Test_Object_MapToJson_JsonToMap(t *testing.T) {
383 m := NewMapper()

Callers

nothing calls this directly

Calls 4

NewMapperFunction · 0.85
JSONTimeTypeAlias · 0.85
IsTypeMethod · 0.65
GetDefaultTimeWrapperMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…