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

Function TestNotContainsWrapper

assert/forward_assertions_test.go:223–243  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

221}
222
223func TestNotContainsWrapper(t *testing.T) {
224 t.Parallel()
225
226 assert := New(new(testing.T))
227 list := []string{"Foo", "Bar"}
228
229 if !assert.NotContains("Hello World", "Hello!") {
230 t.Error("NotContains should return true: \"Hello World\" does not contain \"Hello!\"")
231 }
232 if assert.NotContains("Hello World", "Hello") {
233 t.Error("NotContains should return false: \"Hello World\" contains \"Hello\"")
234 }
235
236 if !assert.NotContains(list, "Foo!") {
237 t.Error("NotContains should return true: \"[\"Foo\", \"Bar\"]\" does not contain \"Foo!\"")
238 }
239 if assert.NotContains(list, "Foo") {
240 t.Error("NotContains should return false: \"[\"Foo\", \"Bar\"]\" contains \"Foo\"")
241 }
242
243}
244
245func TestConditionWrapper(t *testing.T) {
246 t.Parallel()

Callers

nothing calls this directly

Calls 3

NewFunction · 0.70
NotContainsMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected