mirror of
https://github.com/stretchr/testify.git
synced 2025-05-31 11:42:44 +00:00
in `ObjectsAreEqual`, `expectedValue.Convert(actualType)` was being called when `actualType.ConvertibleTo(reflect.TypeOf(expected))` was true. This was a problem for situations such as when expected was an int and actual was a string, since ints are `ConvertibleTo` strings, but the reverse is not true. Changing the ConvertibleTo check to `expectedValue.Type().ConvertibleTo(actualType)` solves the issue.