MCPcopy Create free account
hub / github.com/devfeel/mapper / Test_IsTimeField

Function Test_IsTimeField

mapper_test.go:413–428  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

411}
412
413func Test_IsTimeField(t *testing.T) {
414 t1 := time.Now()
415 if standardMapper.GetDefaultTimeWrapper().IsType(reflect.ValueOf(t1)) {
416 t.Log("check time.Now ok")
417 } else {
418 t.Error("check time.Now error")
419 }
420
421 var t2 JSONTime
422 t2 = JSONTime(time.Now())
423 if standardMapper.GetDefaultTimeWrapper().IsType(reflect.ValueOf(t2)) {
424 t.Log("check mapper.Time ok")
425 } else {
426 t.Error("check mapper.Time error")
427 }
428}
429
430func Test_MapToJson_JsonToMap(t *testing.T) {
431 fromMap := createMap()

Callers

nothing calls this directly

Calls 3

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…