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

Function IsNotType

assert/assertions.go:478–486  ·  view source on GitHub ↗

IsNotType asserts that the specified objects are not of the same type. assert.IsNotType(t, &NotMyStruct{}, &MyStruct{})

(t TestingT, theType, object interface{}, msgAndArgs ...interface{})

Source from the content-addressed store, hash-verified

476//
477// assert.IsNotType(t, &NotMyStruct{}, &MyStruct{})
478func IsNotType(t TestingT, theType, object interface{}, msgAndArgs ...interface{}) bool {
479 if !isType(theType, object) {
480 return true
481 }
482 if h, ok := t.(tHelper); ok {
483 h.Helper()
484 }
485 return Fail(t, fmt.Sprintf("Object type expected to be different than %T", theType), msgAndArgs...)
486}
487
488// Equal asserts that two objects are equal.
489//

Callers 4

IsNotTypeFunction · 0.92
IsNotTypefFunction · 0.70
TestNotIsTypeFunction · 0.70
IsNotTypeMethod · 0.70

Calls 3

isTypeFunction · 0.85
FailFunction · 0.70
HelperMethod · 0.65

Tested by 1

TestNotIsTypeFunction · 0.56