fix issue in unit testing case for package gconv
@@ -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)
})
}
