MCPcopy
hub / github.com/stretchr/testify / IsType

Method IsType

assert/assertion_forward.go:908–913  ·  view source on GitHub ↗

IsType asserts that the specified objects are of the same type. a.IsType(&MyStruct{}, &MyStruct{})

(expectedType interface{}, object interface{}, msgAndArgs ...interface{})

Source from the content-addressed store, hash-verified

906//
907// a.IsType(&MyStruct{}, &MyStruct{})
908func (a *Assertions) IsType(expectedType interface{}, object interface{}, msgAndArgs ...interface{}) bool {
909 if h, ok := a.t.(tHelper); ok {
910 h.Helper()
911 }
912 return IsType(a.t, expectedType, object, msgAndArgs...)
913}
914
915// IsTypef asserts that the specified objects are of the same type.
916//

Callers 1

TestIsTypeWrapperFunction · 0.45

Calls 2

IsTypeFunction · 0.70
HelperMethod · 0.65

Tested by 1

TestIsTypeWrapperFunction · 0.36