IsType asserts that the specified objects are of the same type. require.IsType(t, &MyStruct{}, &MyStruct{})
(t TestingT, expectedType interface{}, object interface{}, msgAndArgs ...interface{})
| 1141 | // |
| 1142 | // require.IsType(t, &MyStruct{}, &MyStruct{}) |
| 1143 | func IsType(t TestingT, expectedType interface{}, object interface{}, msgAndArgs ...interface{}) { |
| 1144 | if h, ok := t.(tHelper); ok { |
| 1145 | h.Helper() |
| 1146 | } |
| 1147 | if assert.IsType(t, expectedType, object, msgAndArgs...) { |
| 1148 | return |
| 1149 | } |
| 1150 | t.FailNow() |
| 1151 | } |
| 1152 | |
| 1153 | // IsTypef asserts that the specified objects are of the same type. |
| 1154 | // |