mirror of https://github.com/stretchr/testify.git
Add Last Ditch Equals Comparison
Fixes a problem where int/float of the same value would return not equal. This may also fix other comparisons in the future.pull/14/merge
parent
6d9d998d04
commit
36fef36bf3
|
@ -25,6 +25,11 @@ func ObjectsAreEqual(a, b interface{}) bool {
|
|||
return true
|
||||
}
|
||||
|
||||
// Last ditch effort
|
||||
if fmt.Sprintf("%#v", a) == fmt.Sprintf("%#v", b) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue