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

Method Contains

internal/testify/require/require_forward.go:35–40  ·  view source on GitHub ↗

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

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

Source from the content-addressed store, hash-verified

33// a.Contains(["Hello", "World"], "World")
34// a.Contains({"Hello": "World"}, "Hello")
35func (a *Assertions) Contains(s interface{}, contains interface{}, msgAndArgs ...interface{}) {
36 if h, ok := a.t.(tHelper); ok {
37 h.Helper()
38 }
39 Contains(a.t, s, contains, msgAndArgs...)
40}
41
42// Containsf asserts that the specified string, list(array, slice...) or map contains the
43// specified substring or element.

Callers 10

TestNodeBudgetFunction · 0.45
TestNodeBudgetDisabledFunction · 0.45
TestIssue844Function · 0.45
TestIssue567Function · 0.45
DefaultEnvFunction · 0.45
TestContainsWrapperFunction · 0.45
TestProgram_DisassembleFunction · 0.45
TestVM_LimitsFunction · 0.45
RunMethod · 0.45

Calls 2

ContainsFunction · 0.70
HelperMethod · 0.45

Tested by 8

TestNodeBudgetFunction · 0.36
TestNodeBudgetDisabledFunction · 0.36
TestIssue844Function · 0.36
TestIssue567Function · 0.36
TestContainsWrapperFunction · 0.36
TestProgram_DisassembleFunction · 0.36
TestVM_LimitsFunction · 0.36