test: add unit tests regarding issue 2901 (#2930)

This commit is contained in:
the harder the luckier
2023-09-05 19:30:54 +08:00
committed by GitHub
parent 6cddfdb313
commit d49dccb147

View File

@ -78,3 +78,17 @@ func Test_Time_Slice_Attribute(t *testing.T) {
t.Assert(s.Arr[1], "2021-01-12 12:34:57")
})
}
func Test_Issue2901(t *testing.T) {
type GameApp2 struct {
ForceUpdateTime *time.Time
}
gtest.C(t, func(t *gtest.T) {
src := map[string]interface{}{
"FORCE_UPDATE_TIME": time.Now(),
}
m := GameApp2{}
err := gconv.Scan(src, &m)
t.AssertNil(err)
})
}