test: better message for different empty slices (#6920)
Given two empty slices, one that is equal to nil and one that is not,
AssertDeepEquals used to produce this confusing output:
[[]] !(deep)= [[]]
After this change, it produces:
[[]string(nil)] !(deep)= [[]string{}]
This commit is contained in:
parent
efbc2ad89b
commit
521eb55d1e
|
|
@ -118,7 +118,7 @@ func AssertEquals(t *testing.T, one interface{}, two interface{}) {
|
|||
func AssertDeepEquals(t *testing.T, one interface{}, two interface{}) {
|
||||
t.Helper()
|
||||
if !reflect.DeepEqual(one, two) {
|
||||
t.Fatalf("[%+v] !(deep)= [%+v]", one, two)
|
||||
t.Fatalf("[%#v] !(deep)= [%#v]", one, two)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue