MCPcopy
hub / github.com/stretchr/testify / NotContains

Method NotContains

assert/assertion_forward.go:1149–1154  ·  view source on GitHub ↗

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

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

Source from the content-addressed store, hash-verified

1147// a.NotContains(["Hello", "World"], "Earth")
1148// a.NotContains({"Hello": "World"}, "Earth")
1149func (a *Assertions) NotContains(s interface{}, contains interface{}, msgAndArgs ...interface{}) bool {
1150 if h, ok := a.t.(tHelper); ok {
1151 h.Helper()
1152 }
1153 return NotContains(a.t, s, contains, msgAndArgs...)
1154}
1155
1156// NotContainsf asserts that the specified string, list(array, slice...) or map does NOT contain the
1157// specified substring or element.

Callers 1

TestNotContainsWrapperFunction · 0.45

Calls 2

NotContainsFunction · 0.70
HelperMethod · 0.65

Tested by 1

TestNotContainsWrapperFunction · 0.36