mirror of https://github.com/stretchr/testify.git
Fix param order in ObjectsAreEqualValues after type conversion
parent
64623bb832
commit
5d8c1da624
|
@ -54,7 +54,7 @@ func ObjectsAreEqualValues(expected, actual interface{}) bool {
|
||||||
expectedValue := reflect.ValueOf(expected)
|
expectedValue := reflect.ValueOf(expected)
|
||||||
if expectedValue.Type().ConvertibleTo(actualType) {
|
if expectedValue.Type().ConvertibleTo(actualType) {
|
||||||
// Attempt comparison after type conversion
|
// Attempt comparison after type conversion
|
||||||
if reflect.DeepEqual(actual, expectedValue.Convert(actualType).Interface()) {
|
if reflect.DeepEqual(expectedValue.Convert(actualType).Interface(), actual) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue