mirror of
https://github.com/stretchr/testify.git
synced 2025-07-13 07:39:48 +00:00
Show type of the object instead just "Object" string
The `Implements` test was just showing a string instead the name of the object that was not implementing the interface. Now the type of the object is shown.
This commit is contained in:
parent
82616deabd
commit
635a01b704
@ -214,7 +214,7 @@ func Implements(t TestingT, interfaceObject interface{}, object interface{}, msg
|
||||
interfaceType := reflect.TypeOf(interfaceObject).Elem()
|
||||
|
||||
if !reflect.TypeOf(object).Implements(interfaceType) {
|
||||
return Fail(t, fmt.Sprintf("Object must implement %v", interfaceType), msgAndArgs...)
|
||||
return Fail(t, fmt.Sprintf("%T must implement %v", object, interfaceType), msgAndArgs...)
|
||||
}
|
||||
|
||||
return true
|
||||
|
Loading…
x
Reference in New Issue
Block a user