MCPcopy Index your code
hub / github.com/expr-lang/expr / TestErrorContains

Function TestErrorContains

internal/testify/require/requirements_test.go:211–220  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

209}
210
211func TestErrorContains(t *testing.T) {
212
213 ErrorContains(t, errors.New("some error: another error"), "some error")
214
215 mockT := new(MockT)
216 ErrorContains(mockT, errors.New("some error"), "different error")
217 if !mockT.Failed {
218 t.Error("Check should fail")
219 }
220}
221
222func TestEqualError(t *testing.T) {
223

Callers

nothing calls this directly

Calls 2

ErrorContainsFunction · 0.70
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…