Merge pull request #210 from jcamenisch/master

Fix param order in ObjectsAreEqualValues after type conversion
pull/211/head
Ernesto Jiménez 2015-08-29 00:48:46 +01:00
commit 7c2b1e5640
1 changed files with 1 additions and 1 deletions

View File

@ -54,7 +54,7 @@ func ObjectsAreEqualValues(expected, actual interface{}) bool {
expectedValue := reflect.ValueOf(expected)
if expectedValue.Type().ConvertibleTo(actualType) {
// Attempt comparison after type conversion
if reflect.DeepEqual(actual, expectedValue.Convert(actualType).Interface()) {
if reflect.DeepEqual(expectedValue.Convert(actualType).Interface(), actual) {
return true
}
}