Contains asserts the fmt.Sprint(v) contains sub.
(t testing.TB, v any, sub string)
| 37 | |
| 38 | // Contains asserts the fmt.Sprint(v) contains sub. |
| 39 | func 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) |
| 49 | func ErrorIs(t testing.TB, exp, got error) { |
no outgoing calls
searching dependent graphs…