MCPcopy Index your code
hub / github.com/expr-lang/expr / NotContains

Function NotContains

internal/testify/assert/assertions.go:949–964  ·  view source on GitHub ↗

NotContains asserts that the specified string, list(array, slice...) or map does NOT contain the specified substring or element. assert.NotContains(t, "Hello World", "Earth") assert.NotContains(t, ["Hello", "World"], "Earth") assert.NotContains(t, {"Hello": "World"}, "Earth")

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

Source from the content-addressed store, hash-verified

947// assert.NotContains(t, ["Hello", "World"], "Earth")
948// assert.NotContains(t, {"Hello": "World"}, "Earth")
949func NotContains(t TestingT, s, contains interface{}, msgAndArgs ...interface{}) bool {
950 if h, ok := t.(tHelper); ok {
951 h.Helper()
952 }
953
954 ok, found := containsElement(s, contains)
955 if !ok {
956 return Fail(t, fmt.Sprintf("%#v could not be applied builtin len()", s), msgAndArgs...)
957 }
958 if found {
959 return Fail(t, fmt.Sprintf("%#v should not contain %#v", s, contains), msgAndArgs...)
960 }
961
962 return true
963
964}
965
966// Subset asserts that the specified list(array, slice...) or map contains all
967// elements given in the specified subset list(array, slice...) or map.

Callers 5

NotContainsFunction · 0.92
NotContainsfFunction · 0.70
TestContainsNotContainsFunction · 0.70
NotContainsMethod · 0.70

Calls 4

containsElementFunction · 0.85
SprintfMethod · 0.80
FailFunction · 0.70
HelperMethod · 0.45

Tested by 2

TestContainsNotContainsFunction · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…