mirror of
https://gitee.com/johng/gf
synced 2026-06-07 02:12:11 +08:00
fix issue in unit testing case for package gconv
This commit is contained in:
@ -753,8 +753,11 @@ func Test_Slice_PrivateAttribute_All(t *testing.T) {
|
||||
}
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
user := &User{1, "john", []interface{}{2}}
|
||||
//t.Assert(gconv.Interfaces(user), g.Slice{1, []interface{}{2}})
|
||||
t.Assert(gconv.Interfaces(user), g.Slice{"id", 1, "ad", g.Slice{2}})
|
||||
s := gconv.Interfaces(user)
|
||||
t.Assert(len(s), 4)
|
||||
// g.Slice{"id", 1, "ad", g.Slice{2}}
|
||||
t.Assert(s[0] == "id" || s[0] == "ad", true)
|
||||
t.Assert(s[1] == 1 || s[3] == 1, true)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user