MCPcopy
hub / github.com/coder/websocket / Contains

Function Contains

internal/test/assert/assert.go:39–46  ·  view source on GitHub ↗

Contains asserts the fmt.Sprint(v) contains sub.

(t testing.TB, v any, sub string)

Source from the content-addressed store, hash-verified

37
38// Contains asserts the fmt.Sprint(v) contains sub.
39func Contains(t testing.TB, v any, sub string) {
40 t.Helper()
41
42 s := fmt.Sprint(v)
43 if !strings.Contains(s, sub) {
44 t.Fatalf("expected %q to contain %q", s, sub)
45 }
46}
47
48// ErrorIs asserts errors.Is(got, exp)
49func ErrorIs(t testing.TB, exp, got error) {

Callers 6

TestConnFunction · 0.92
TestAcceptFunction · 0.92
TestBadDialsFunction · 0.92
TestDialRedirectFunction · 0.92
TestGoRecoverFunction · 0.92

Calls

no outgoing calls

Tested by 6

TestConnFunction · 0.74
TestAcceptFunction · 0.74
TestBadDialsFunction · 0.74
TestDialRedirectFunction · 0.74
TestGoRecoverFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…