mirror of https://github.com/stretchr/testify.git
parent
1c7f4ef084
commit
02b2656991
|
@ -104,11 +104,11 @@ the problem actually occurred in calling code.*/
|
||||||
// failed.
|
// failed.
|
||||||
func CallerInfo() []string {
|
func CallerInfo() []string {
|
||||||
|
|
||||||
pc := uintptr(0)
|
var pc uintptr
|
||||||
file := ""
|
var ok bool
|
||||||
line := 0
|
var file string
|
||||||
ok := false
|
var line int
|
||||||
name := ""
|
var name string
|
||||||
|
|
||||||
callers := []string{}
|
callers := []string{}
|
||||||
for i := 0; ; i++ {
|
for i := 0; ; i++ {
|
||||||
|
|
|
@ -1325,6 +1325,7 @@ func Test_Arguments_Diff_WithArgMatcher(t *testing.T) {
|
||||||
assert.Contains(t, diff, `(bool=false) not matched by func(int) bool`)
|
assert.Contains(t, diff, `(bool=false) not matched by func(int) bool`)
|
||||||
|
|
||||||
diff, count = args.Diff([]interface{}{"string", 123, false})
|
diff, count = args.Diff([]interface{}{"string", 123, false})
|
||||||
|
assert.Equal(t, 1, count)
|
||||||
assert.Contains(t, diff, `(int=123) matched by func(int) bool`)
|
assert.Contains(t, diff, `(int=123) matched by func(int) bool`)
|
||||||
|
|
||||||
diff, count = args.Diff([]interface{}{"string", 123, true})
|
diff, count = args.Diff([]interface{}{"string", 123, true})
|
||||||
|
|
Loading…
Reference in New Issue