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

Function TestAdaptOsErrors

errbase/adapters_test.go:221–238  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

219}
220
221func TestAdaptOsErrors(t *testing.T) {
222 // The special os error types are preserved exactly.
223
224 tt := testutils.T{T: t}
225 var origErr error
226
227 origErr = &os.PathError{Op: "hello", Path: "world", Err: goErr.New("woo")}
228 newErr := network(t, origErr)
229 tt.CheckDeepEqual(newErr, origErr)
230
231 origErr = &os.LinkError{Op: "hello", Old: "world", New: "universe", Err: goErr.New("woo")}
232 newErr = network(t, origErr)
233 tt.CheckDeepEqual(newErr, origErr)
234
235 origErr = &os.SyscallError{Syscall: "hello", Err: goErr.New("woo")}
236 newErr = network(t, origErr)
237 tt.CheckDeepEqual(newErr, origErr)
238}

Callers

nothing calls this directly

Calls 2

CheckDeepEqualMethod · 0.95
networkFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…