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

Function NotContains

require/require.go:1450–1458  ·  view source on GitHub ↗

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

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

Source from the content-addressed store, hash-verified

1448// require.NotContains(t, ["Hello", "World"], "Earth")
1449// require.NotContains(t, {"Hello": "World"}, "Earth")
1450func NotContains(t TestingT, s interface{}, contains interface{}, msgAndArgs ...interface{}) {
1451 if h, ok := t.(tHelper); ok {
1452 h.Helper()
1453 }
1454 if assert.NotContains(t, s, contains, msgAndArgs...) {
1455 return
1456 }
1457 t.FailNow()
1458}
1459
1460// NotContainsf asserts that the specified string, list(array, slice...) or map does NOT contain the
1461// specified substring or element.

Callers 2

NotContainsMethod · 0.70
TestNotContainsFunction · 0.70

Calls 3

NotContainsFunction · 0.92
HelperMethod · 0.65
FailNowMethod · 0.65

Tested by 1

TestNotContainsFunction · 0.56