- 添加了部分到家订单级促销
This commit is contained in:
@@ -3,6 +3,7 @@ package utils
|
||||
import (
|
||||
"encoding/json"
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
|
||||
func TestConv(t *testing.T) {
|
||||
@@ -69,3 +70,17 @@ func TestMarshal(t *testing.T) {
|
||||
t.Log(Format4Output(obj2, false))
|
||||
t.Log(Format4Output(Struct2FlatMap(obj2), false))
|
||||
}
|
||||
|
||||
func TestTime(t *testing.T) {
|
||||
for _, v := range [][]interface{}{
|
||||
[]interface{}{
|
||||
"2019-04-01",
|
||||
Str2Time("2019-04-01 00:00:00"),
|
||||
},
|
||||
} {
|
||||
data := Str2Time(v[0].(string))
|
||||
if data != v[1].(time.Time) {
|
||||
t.Fatal("Interface2Int64WithDefault failed")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user