fix issue in unit testing case for package gconv

This commit is contained in:
Jack
2020-11-30 09:07:44 +08:00
parent 790a651ac1
commit 5a0326f666

View File

@ -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)
})
}