MCPcopy Index your code
hub / github.com/cockroachdb/errors / TestErrorPredicates

Function TestErrorPredicates

oserror/oserror_test.go:25–32  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

23)
24
25func TestErrorPredicates(t *testing.T) {
26 tt := testutils.T{T: t}
27
28 tt.Check(IsPermission(errors.Wrap(os.ErrPermission, "woo")))
29 tt.Check(IsExist(errors.Wrap(os.ErrExist, "woo")))
30 tt.Check(IsNotExist(errors.Wrap(os.ErrNotExist, "woo")))
31 tt.Check(IsTimeout(errors.Wrap(&myTimeout{}, "woo")))
32}
33
34type myTimeout struct{}
35

Callers

nothing calls this directly

Calls 6

CheckMethod · 0.95
WrapFunction · 0.92
IsPermissionFunction · 0.85
IsExistFunction · 0.85
IsNotExistFunction · 0.85
IsTimeoutFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…