MCPcopy
hub / github.com/expr-lang/expr / IsType

Function IsType

internal/testify/require/require.go:1102–1110  ·  view source on GitHub ↗

IsType asserts that the specified objects are of the same type.

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

Source from the content-addressed store, hash-verified

1100
1101// IsType asserts that the specified objects are of the same type.
1102func IsType(t TestingT, expectedType interface{}, object interface{}, msgAndArgs ...interface{}) {
1103 if h, ok := t.(tHelper); ok {
1104 h.Helper()
1105 }
1106 if assert.IsType(t, expectedType, object, msgAndArgs...) {
1107 return
1108 }
1109 t.FailNow()
1110}
1111
1112// IsTypef asserts that the specified objects are of the same type.
1113func IsTypef(t TestingT, expectedType interface{}, object interface{}, msg string, args ...interface{}) {

Callers 9

TestIssue270Function · 0.92
TestIssue_570Function · 0.92
TestDeref_nilFunction · 0.92
IsTypeMethod · 0.70
TestIsTypeFunction · 0.70

Calls 3

IsTypeFunction · 0.92
FailNowMethod · 0.65
HelperMethod · 0.45

Tested by 8

TestIssue270Function · 0.74
TestIssue_570Function · 0.74
TestDeref_nilFunction · 0.74
TestIsTypeFunction · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…