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{})
| 1448 | // require.NotContains(t, ["Hello", "World"], "Earth") |
| 1449 | // require.NotContains(t, {"Hello": "World"}, "Earth") |
| 1450 | func 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. |