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

Method Containsf

require/require_forward.go:47–52  ·  view source on GitHub ↗

Containsf asserts that the specified string, list(array, slice...) or map contains the specified substring or element. a.Containsf("Hello World", "World", "error message %s", "formatted") a.Containsf(["Hello", "World"], "World", "error message %s", "formatted") a.Containsf({"Hello": "World"}, "H

(s interface{}, contains interface{}, msg string, args ...interface{})

Source from the content-addressed store, hash-verified

45// a.Containsf(["Hello", "World"], "World", "error message %s", "formatted")
46// a.Containsf({"Hello": "World"}, "Hello", "error message %s", "formatted")
47func (a *Assertions) Containsf(s interface{}, contains interface{}, msg string, args ...interface{}) {
48 if h, ok := a.t.(tHelper); ok {
49 h.Helper()
50 }
51 Containsf(a.t, s, contains, msg, args...)
52}
53
54// DirExists checks whether a directory exists in the given path. It also fails
55// if the path is a file rather a directory or there is an error checking whether it exists.

Callers

nothing calls this directly

Calls 2

ContainsfFunction · 0.70
HelperMethod · 0.65

Tested by

no test coverage detected