Use deep spew in serialization test & go obj diff

This commit is contained in:
Tim Hockin
2015-03-05 20:55:32 -08:00
parent cee14ab51b
commit b3304c49ad
2 changed files with 9 additions and 5 deletions

View File

@@ -67,9 +67,10 @@ func ObjectDiff(a, b interface{}) string {
// can't figure out why reflect.DeepEqual is returning false and nothing is
// showing you differences. This will.
func ObjectGoPrintDiff(a, b interface{}) string {
s := spew.ConfigState{DisableMethods: true}
return StringDiff(
spew.Sprintf("%#v", a),
spew.Sprintf("%#v", b),
s.Sprintf("%#v", a),
s.Sprintf("%#v", b),
)
}