diff --git a/assert/assertions_test.go b/assert/assertions_test.go index 607e9c3..db447d3 100644 --- a/assert/assertions_test.go +++ b/assert/assertions_test.go @@ -97,6 +97,10 @@ func TestEqual(t *testing.T) { if !Equal(mockT, int64(123), uint64(123)) { t.Error("Equal should return true") } + funcA := func() int { return 42 } + if !Equal(mockT, funcA, funcA) { + t.Error("Equal should return true") + } } @@ -199,6 +203,11 @@ func TestNotEqual(t *testing.T) { if !NotEqual(mockT, nil, new(AssertionTesterConformingObject)) { t.Error("NotEqual should return true") } + funcA := func() int { return 23 } + funcB := func() int { return 42 } + if !NotEqual(mockT, funcA, funcB) { + t.Error("NotEqual should return true") + } if NotEqual(mockT, "Hello World", "Hello World") { t.Error("NotEqual should return false")