mirror of
https://gitee.com/johng/gf
synced 2026-06-06 02:25:47 +08:00
test: add unit tests regarding issue 2901 (#2930)
This commit is contained in:
committed by
GitHub
parent
6cddfdb313
commit
d49dccb147
@ -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)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user