mirror of
https://github.com/stretchr/testify.git
synced 2025-04-27 21:24:09 +00:00
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.
This commit is contained in:
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…
x
Reference in New Issue
Block a user