mirror of
https://gitee.com/johng/gf
synced 2026-07-06 13:42:46 +08:00
improve time string parsing for invalid datetime
This commit is contained in:
@ -43,8 +43,8 @@ func Test_Types(t *testing.T) {
|
||||
"binary": []byte("abcdefgh"),
|
||||
"date": "2018-10-24",
|
||||
"time": "10:00:01",
|
||||
"decimal": 123.456,
|
||||
"double": 123.456,
|
||||
"decimal": -123.456,
|
||||
"double": -123.456,
|
||||
"bit": 2,
|
||||
"tinyint": true,
|
||||
"bool": false,
|
||||
@ -61,7 +61,7 @@ func Test_Types(t *testing.T) {
|
||||
gtest.Assert(one["binary"].String(), data["binary"])
|
||||
gtest.Assert(one["date"].String(), data["date"])
|
||||
gtest.Assert(one["time"].String(), data["time"])
|
||||
gtest.Assert(one["decimal"].String(), 123.46)
|
||||
gtest.Assert(one["decimal"].String(), -123.46)
|
||||
gtest.Assert(one["double"].String(), data["double"])
|
||||
gtest.Assert(one["bit"].Int(), data["bit"])
|
||||
gtest.Assert(one["tinyint"].Bool(), data["tinyint"])
|
||||
|
||||
Reference in New Issue
Block a user