diff --git a/assert/assertions.go b/assert/assertions.go index fbaccde..00ff8d2 100644 --- a/assert/assertions.go +++ b/assert/assertions.go @@ -104,11 +104,11 @@ the problem actually occurred in calling code.*/ // failed. func CallerInfo() []string { - pc := uintptr(0) - file := "" - line := 0 - ok := false - name := "" + var pc uintptr + var ok bool + var file string + var line int + var name string callers := []string{} for i := 0; ; i++ { diff --git a/mock/mock_test.go b/mock/mock_test.go index bfa123f..fcbc4f6 100644 --- a/mock/mock_test.go +++ b/mock/mock_test.go @@ -1325,6 +1325,7 @@ func Test_Arguments_Diff_WithArgMatcher(t *testing.T) { assert.Contains(t, diff, `(bool=false) not matched by func(int) bool`) diff, count = args.Diff([]interface{}{"string", 123, false}) + assert.Equal(t, 1, count) assert.Contains(t, diff, `(int=123) matched by func(int) bool`) diff, count = args.Diff([]interface{}{"string", 123, true})