Don't handle func comparisons

pull/153/head
Tyler Bunnell 2015-04-16 11:41:42 -06:00
parent 842aeb8181
commit 4f9c9aeeaa
3 changed files with 0 additions and 36 deletions

View File

@ -36,10 +36,6 @@ func ObjectsAreEqual(expected, actual interface{}) bool {
return true
}
if reflect.ValueOf(expected) == reflect.ValueOf(actual) {
return true
}
return false
}

View File

@ -115,10 +115,6 @@ func TestEqual(t *testing.T) {
if !Equal(mockT, uint64(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")
}
}
@ -406,19 +402,6 @@ func TestNotPanics(t *testing.T) {
}
func TestEqual_Funcs(t *testing.T) {
type f func() int
f1 := func() int { return 1 }
f2 := func() int { return 2 }
f1Copy := f1
Equal(t, f1Copy, f1, "Funcs are the same and should be considered equal")
NotEqual(t, f1, f2, "f1 and f2 are different")
}
func TestNoError(t *testing.T) {
mockT := new(testing.T)

View File

@ -259,21 +259,6 @@ func TestNotPanicsWrapper(t *testing.T) {
}
func TestEqualWrapper_Funcs(t *testing.T) {
assert := New(t)
type f func() int
var f1 f = func() int { return 1 }
var f2 f = func() int { return 2 }
var f1_copy f = f1
assert.Equal(f1_copy, f1, "Funcs are the same and should be considered equal")
assert.NotEqual(f1, f2, "f1 and f2 are different")
}
func TestNoErrorWrapper(t *testing.T) {
assert := New(t)
mockAssert := New(new(testing.T))