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

Function TestUnwrap

errutil_api_test.go:12–20  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

10)
11
12func TestUnwrap(t *testing.T) {
13 tt := testutils.T{t}
14
15 e := fmt.Errorf("foo %w %w", fmt.Errorf("bar"), fmt.Errorf("baz"))
16
17 // Compatibility with go 1.20: Unwrap() on a multierror returns nil
18 // (per API documentation)
19 tt.Check(errors.Unwrap(e) == nil)
20}
21
22// More detailed testing of Join is in datadriven_test.go. Here we make
23// sure that the public API includes the stacktrace wrapper.

Callers

nothing calls this directly

Calls 2

CheckMethod · 0.95
UnwrapFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…