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

Function Contains

internal/testify/require/require.go:41–49  ·  view source on GitHub ↗

Contains asserts that the specified string, list(array, slice...) or map contains the specified substring or element. assert.Contains(t, "Hello World", "World") assert.Contains(t, ["Hello", "World"], "World") assert.Contains(t, {"Hello": "World"}, "Hello")

(t TestingT, s interface{}, contains interface{}, msgAndArgs ...interface{})

Source from the content-addressed store, hash-verified

39// assert.Contains(t, ["Hello", "World"], "World")
40// assert.Contains(t, {"Hello": "World"}, "Hello")
41func Contains(t TestingT, s interface{}, contains interface{}, msgAndArgs ...interface{}) {
42 if h, ok := t.(tHelper); ok {
43 h.Helper()
44 }
45 if assert.Contains(t, s, contains, msgAndArgs...) {
46 return
47 }
48 t.FailNow()
49}
50
51// Containsf asserts that the specified string, list(array, slice...) or map contains the
52// specified substring or element.

Callers 15

TestExpr_wierd_casesFunction · 0.92
TestCompile_call_on_nilFunction · 0.92
TestCheck_typesFunction · 0.92
TestIssue739Function · 0.92
TestIssue461Function · 0.92
TestVM_OpcodeOperationsFunction · 0.92
TestVM_MemoryBudgetFunction · 0.92

Calls 3

ContainsFunction · 0.92
FailNowMethod · 0.65
HelperMethod · 0.45

Tested by 15

TestExpr_wierd_casesFunction · 0.74
TestCompile_call_on_nilFunction · 0.74
TestCheck_typesFunction · 0.74
TestIssue739Function · 0.74
TestIssue461Function · 0.74
TestVM_OpcodeOperationsFunction · 0.74
TestVM_MemoryBudgetFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…